RE: [PHP-DEV] Coercive Scalar Type Hints RFC
| From: | François Laupretre | Date: | Tue, 24 Feb 2015 07:37:25 +0000 |
| Subject: | RE: [PHP-DEV] Coercive Scalar Type Hints RFC | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-83638@lists.php.net to get a copy of this message | ||
> De : Anthony Ferrara [mailto:ircmaxell@gmail.com]
>
> The first thing, PHP's own phar generator included in the make file
> fails due to the new restricted hints (based on the patch provided).
> (I had to rebuild with --disable-phar to get it to build).
>
> Let me make that perfectly clear: under these changes you cannot do a
> default compile of PHP due to BC breaks.
Wrong point. In this case, restrictions don't break existing code, but allow detecting a bug
(SplFileInfo(NULL)).
The PR comment explains this already.
> So yeah, to say "major BC issues" is the literal definition of an
> understatement.
I'm not sure, as it seems all these errors are probably coming from 2 bugs in symfony code. And
don't tell me sending a bool as first arg to strpos() is not a bug. So, we're just helping
them to find bugs in their code. Nothing so terrible, imo.
Additionaly, in the final implementation, these errors will be generated as E_DEPRECATED, which will
make it much more clear for the developer.
Regards
François