On 15/01/2015 15:25, Pavel Kouřil wrote:
The potential issues with this are pretty real, to be honest. Simple
things like moving a method from one class to another (let's say to
parent or descendant) and getting to another typing context may cause
unpredictable behavior if the user forgets to have declare() in both
files.
Agreed there are gotchas but not only with declare().
Many things can go wrong when you move a function somewhere else, for
example you might leave `use` statements behind and suddenly a `catch
(FooException $e)` will fail to match exceptions or something sneaky
like that. I don't necessarily think that's enough to kill the feature.
Note that you can only get problems going from weak to strict context by
the way, the other way around should not cause any issues, code would
just work when it otherwise would have triggered strict errors. Since
you usually move code into places you own, I'd assume you know it if you
are using strict typing.
Cheers
--
Jordi Boggiano
@seldaek - http://nelm.io/jordi
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php