Re: Evaluate arguments of new for classes without constructors

From: Date: Sat, 12 Mar 2016 17:54:26 +0000
Subject: Re: Evaluate arguments of new for classes without constructors
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-91644@lists.php.net to get a copy of this message
> On Mar 12, 2016, at 11:27, Sara Golemon <pollita@php.net> wrote: > >> HHVM does not implement "new" in this way, they always evaluate the arguments. >> > Which, if it helps, means that we already know a lot of frameworks > /don't/ break as a result of fixing this behavior. > >> As this is technically a BC affecting change (even if of the lowest >> impact), I'm running it past the list first. >> > Technically a BC break that justifies waiting till a major version. > Given the extremely specific requirements to hit this edge case > however, passing side-effect args to a non-existent constructor, I > personally think a minor version is fine. Of curiosity, what effect (if any) might this have on ReflectionClass::newInstance(), ::newInstanceArgs(), and ::newInstanceWithoutConstructor()? (I ask because some existing DI systems, such as Aura.Di, rely on those for creating objects.) -- Paul M. Jones pmjones88@gmail.com http://paul-m-jones.com Modernizing Legacy Applications in PHP https://leanpub.com/mlaphp Solving the N+1 Problem in PHP https://leanpub.com/sn1php

« previous php.internals (#91644) next »