Coder Social home page Coder Social logo

Comments (4)

barryvdh avatar barryvdh commented on July 29, 2024 1

Well we should probably fix that indeed. Not sure how though.

from twigbridge.

bytestream avatar bytestream commented on July 29, 2024

@MaxKorlaar Thanks for logging this. If you have any thoughts on the below, please comment :)

@barryvdh We'd have to handle it here -

if (Template::METHOD_CALL !== $type and is_a($object, 'Illuminate\Database\Eloquent\Model')) {

It's been a while since I looked at this but could we not just change is_a($object, 'Illuminate\Database\Eloquent\Model') to $object instanceof ArrayAccess. The is_a code has been here pretty much sicne the beginning. I've just copied it around in my previous PRs.

Not sure why twigphp/Twig#1863 was rejected / closed which did what I'm suggesting. Possibly - twigphp/Twig#106 (comment)

from twigbridge.

bytestream avatar bytestream commented on July 29, 2024

See #398

from twigbridge.

bytestream avatar bytestream commented on July 29, 2024

I've decided to just override base_template_class when I'm using a security policy.

abstract class Template extends \Twig\Template
{
    /**
     * {@inheritdoc}
     */
    public function display(array $context, array $blocks = [])
    {
        \Twig\Template::display($context, $blocks);
    }
}

from twigbridge.

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.