Re: [PHP-DEV] [RFC][DISCUSSION] Deprecation of fallback to root scope

2018-02-03 Thread Aaron Piotrowski
> On Feb 3, 2018, at 11:04 AM, Sara Golemon wrote: >> > I like the three phase approach. Gives frameworks/libraries/users > ridiculous amounts of time to clean up their code, the route to clean > code is clear and the updates are scriptable (I'll bet PHPCS can do > this already), and at the end

Re: [PHP-DEV] [RFC][DISCUSSION] Deprecation of fallback to root scope

2018-02-03 Thread Sara Golemon
On Sat, Feb 3, 2018 at 11:31 AM, Levi Morrison wrote: > In my opinion we should emit E_STRICT until we know when the feature > will be removed. At that point we can promote it to E_DEPRECATED and > specifically cite when it will be removed. In any case, E_NOTICE does > not seem appropriate. > I li

Re: [PHP-DEV] [RFC][DISCUSSION] Deprecation of fallback to root scope

2018-02-03 Thread Marcio Almada
2018-02-03 14:46 GMT-02:00 Marcio Almada : > > 2018-02-03 6:27 GMT-02:00 Wes : > >> Hello PHPeople. I just published the RFC "Deprecation of fallback to root >> scope". >> >> It is quite a substantial change, but as you can read in the RFC, can be a >> (basically) transparent one. >> I'm referring

Re: [PHP-DEV] [RFC][DISCUSSION] Deprecation of fallback to root scope

2018-02-03 Thread Marcio Almada
2018-02-03 6:27 GMT-02:00 Wes : > Hello PHPeople. I just published the RFC "Deprecation of fallback to root > scope". > > It is quite a substantial change, but as you can read in the RFC, can be a > (basically) transparent one. > I'm referring to the possibility to shim it in userland. Essentially

Re: [PHP-DEV] [RFC][DISCUSSION] Deprecation of fallback to root scope

2018-02-03 Thread Levi Morrison
On Sat, Feb 3, 2018 at 3:22 AM, Wes wrote: > No idea, I'm not really sure what's the difference between E_STRICT and > E_DEPRECATED. > Yeah the shim is just a rough POC (completely forgot that define() can > define in namespaces). > Nicolas Grekas on twitter also suggested that we should introduce

Re: [PHP-DEV] [RFC][DISCUSSION] Deprecation of fallback to root scope

2018-02-03 Thread Marco Pivetta
On Sat, Feb 3, 2018 at 1:15 PM, Wes wrote: > question was: > > Do I get that right that it will then no longer be possible to mock > functions from the root namespace during tests? > > At least when the functions are "use"d or are explicitly namespaced... > > Being able to mock functions like "

Re: [PHP-DEV] [RFC][DISCUSSION] Deprecation of fallback to root scope

2018-02-03 Thread Wes
question was: > Do I get that right that it will then no longer be possible to mock functions from the root namespace during tests? > At least when the functions are "use"d or are explicitly namespaced... > Being able to mock functions like "date" or "time" or "mt_rand" is currently extremely hel

Re: [PHP-DEV] [RFC][DISCUSSION] Deprecation of fallback to root scope

2018-02-03 Thread Wes
No idea, I'm not really sure what's the difference between E_STRICT and E_DEPRECATED. Yeah the shim is just a rough POC (completely forgot that define() can define in namespaces). Nicolas Grekas on twitter also suggested that we should introduce function_alias() that works like class_alias(). With

Re: [PHP-DEV] [RFC][DISCUSSION] Deprecation of fallback to root scope

2018-02-03 Thread Niklas Keller
+1 Why should it emit an E_NOTICE instead of E_DEPRECATED? The code for the shim should probably use define() for constants instead of eval(). Regards, Niklas

Re: [PHP-DEV] [RFC][DISCUSSION] Deprecation of fallback to root scope

2018-02-03 Thread Wes
I get that people want to do that, it's so comfortable. But is it really a good idea? When I have that kind of problem, I use: class Foo{ protected $date = "date"; function getDate(){ return ($this->date)(); } } $mockFoo = new class extends Foo{ protected $date = "my_fake_dat

[PHP-DEV] [DISCUSSION] Fast build process at GitHub

2018-02-03 Thread Gabriel Caruso
Hello Internals, I would like to announce a PR that I did in our GitHub, speeding up in almost 75% our tests there. PR: https://github.com/php/php-src/pull/3058 Thanks for your time, -- Gabriel Caruso

Re: [PHP-DEV] [RFC][DISCUSSION] Deprecation of fallback to root scope

2018-02-03 Thread Marco Pivetta
Overall, huge improvement, and also simplifies things quite a lot from a developer PoV by requiring to add explicit references, so this is 100% thumbs up. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Sat, Feb 3, 2018 at 9:27 AM, Wes wrote: > Hello PHPeople. I just

[PHP-DEV] [RFC][DISCUSSION] Deprecation of fallback to root scope

2018-02-03 Thread Wes
Hello PHPeople. I just published the RFC "Deprecation of fallback to root scope". It is quite a substantial change, but as you can read in the RFC, can be a (basically) transparent one. I'm referring to the possibility to shim it in userland. Essentially, this would move the feature from core to u