End of PHP 7.2 FTBFS marathon
QA is a very important part of my daily work, and since PHP 7.2 is available in Fedora rawhide, we have to ensure everything works as expected with this new version.
As already explained, Koschei is our QA tool, used to monitor the full PHP stack, including ~60 extensions and ~500 libraries.
After the initial build of PHP 7.2.0RC3 in rawhide (September 29th) we have around one hundred FTBFS packages (Failed To Build From Sources).
Today everything is ok, all FTBFS have been fixed.
Most PHP extensions are now compatible with PHP 7.2, excepted
- XDebug, but version 2.6.0-dev works and a beta should be released soon
- Timecop, this have been reported upstream, searching for a fix.
Lot of packages were broken because they sadly still rely on the old deprecated mcrypt extension.
Despite I'm fighting for years to be able to remove it (see about libmcrypt and php-mcrypt), we still need it, so I have created the new php-pecl-mcrypt package from the PECL cemetery. This is obviously only a temporary solution, this extension is deprecated, un-maintained and should die.
3. Upstream patches
Most of PHP projects consider fix for new PHP version as standard bugfix, which means, could be done in a simple minor version, without requiring any major change.
So, some projects have already made the few minor changes needed, but have not yet released new version including theses changes. So the work was only about finding these fix, and applying them in the Fedora packages.
4. Pull Requests
Most projects are not yet monitoring PHP 7.2 (not enabled in travis) so were not really aware of needed changes.
So, of course, the first work was to report this failure upstream, and usually providing a possible fix (PR).
Some are already merged, some are still waiting for review.
5. Skip some
For a very few packages, as no real good fix exists for now, we have to temporarily skip some tests with 7.2. Most are about the session change, which breaks unit tests (session_start() failing) without any real impact on the real usage.
6. Common errors
The more common errors, requiring a fix, are :
- count on not countable (and NULL is not countable)
- stricter prototype checking, fix for #73987, originally applied in 7.1.2RC1 then reverted as introduce a small BC break.
- object is a reserved keywork
We are ready for PHP 7.2 in Fedora, and as usually, we done this the Fedora way: upstream first.
I also consider that having most extensions / libraries ready is a important criteria for the new version adoption by users.