On 19 November 2014 14:27, Rowan Collins <rowan.coll...@gmail.com> wrote:
> Alain Williams wrote on 19/11/2014 13:46: > >> On Wed, Nov 19, 2014 at 02:41:54PM +0100, Remi Collet wrote: >> >>> -----BEGIN PGP SIGNED MESSAGE----- >>> Hash: SHA1 >>> >>> Le 19/11/2014 00:11, Levi Morrison a écrit : >>> >>>> [1]: https://wiki.php.net/rfc/remove_php4_constructors >>>> >>> This will just kill PEAR and most of available libraries on PEAR forge. >>> >>> Yes they are still some use of them >>> Yes keeping PHP 4 for PEAR is a bad idea >>> >> Maybe this would spur PEAR to moving to a modern PHP, they could always >> maintain >> a separate PEAR legacy. PHP 4 support ended some 6 years ago. >> >> > PEAR is not a single organisation who can mass update all the modules; the > guidelines could be updated, if they haven't been already, but there would > still be a whole repository full of libraries which used this. > > Now, whether that's acceptable or not, I don't know, but it does highlight > the size of the compatibility break. > It would be quite easy to write a tool to detect classes that use the old style, and even automatically fix them in most cases. As BC breaks go, this is about as minimal as it gets for package maintainers. Note that, for users who are insane enough to expect to maintain PHP4-7 support in a single codebase, it's also easily possible to work with both styles even after this change is introduced: class Foo { function Foo() { // invoked as the ctor in PHP4 $this->__construct(); } function __construct() { // invoked as the ctor in PHP5/7 } }