Giter Site home page Giter Site logo

Comments (3)

koxu1996 avatar koxu1996 commented on June 10, 2024 1

@hofrob @machour I use this extension in my personal project, so I can confirm it's fully working. As I mentioned the code was copied from craftcms and adjusted to pass all tests. It seems these three lines are irrelevant:

if ($object instanceof ElementInterface) {
    self::_includeElementInTemplateCaches($object);
}

... but weird code inside is not executed - instanceof returns false. It's really interesting that you can provide any class name, even non-existing one and PHP won't leave you error nor warning.

To sum up extension is not broken and it'is working fine, but contain few unnecessary lines which doesn't matter. I'll prepare PR to get rid of them.

@hofrob nice catch btw.

from yii2-twig.

machour avatar machour commented on June 10, 2024

I can confirm that the 2.2.x branch looks really odd..

I don't see that much oddness in 2.1.1, could you try downgrading to that version and see what's what?
https://github.com/yiisoft/yii2-twig/tree/2.1.1

from yii2-twig.

hofrob avatar hofrob commented on June 10, 2024

Thanks for the quick replys! Will try 2.1.1 and report back. At first glance this does look better.

The version we used had the erroraenous comparison instanceof Object (which causes getters to be executed twice) and I was about to do a PR until I saw yii\twig\Template in the master branch.

If I have something worth contributing, I will do that.

from yii2-twig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.