Le 18/02/2014 18:48, Trevor Parscal a écrit : > PHP 5.4 added a few important features[1], namely traits, shorthand array > syntax, and function array dereferencing. I've heard that 5.3 is nearing > end of life. > > I propose we drop support for PHP 5.3 soon, if possible.
Hello, One of the requirement we have enforced is that MediaWiki must be installable on Debian stable. The current stable version ships 5.4 now so that is a fulfilled requirement. Ubuntu Precise LTS has php 5.3. We have a MediaWiki LTS as well, so people can use that instead of the latest version. We want MediaWiki to be installable on as many hosting services as possible. I do not have any metric, but hopefully most services come with php 5.4 nowadays. As for Ubuntu, if someone hosting service still use php 5.3, they can use the MediaWiki LTS version. A requirement Wikimedia has nowadays is that the code MUST be supported with HipHop Virtual Machine. As an example, I do not think it implements the SPL classes. So that needs to be carefully checked. Another very important point is whether we want to actually use 5.4 new features. Reviewing the list of 5.3 new features: * namespaces : we did not see a good use case for them * Late Static Bindings : consensus that it is merely a workaround for badly designed code * jump labels : dinosaur will eat you http://www.xkcd.com/292/ ( I like goto myself and yeah they have valid use cases ). * Closures (lambda/anonymous) : that made the code easier to follow when using callbacks since the callbacks code is next to the caller. * __callStatic() __invoke() : never seen that used in our code * Constants declared with 'const' : we use define() * short ternary operator '?:' : haven't seen it * nested exceptions : maybe we end up using them somehow. Not sure. * circular refs garbage collection : it is enabled by default Of course you have some new functions and build-in classes. But beside that, we barely use any 5.3 new features. I do not think this thread is a good opportunity to bikeshed/talk/reach consensus about 5.4 features. That is eventually a can of worm that would need to be opened and some consensus reached for each features. The real blocker is hhvm matching 5.4 features. List of new features: http://php.net/manual/en/migration53.new-features.php http://php.net/manual/en/migration54.new-features.php -- Antoine "hashar" Musso _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l