Php8.1

PHP 8.1 transition plan

For jammy the server team will be transitioning PHP to 8.1

Transition Tracker: https://people.canonical.com/~ubuntu-archive/transitions/html/html/php8.1.html

Since version 7.0, upstream PHP has adopted a regular release cadence, with one release per year. Each release is supported for 2 years, plus a third year of security critical fixes. jammy is the new Ubuntu LTS version, so adopting PHP 8.1 will bring fixes and extend the security support window beyond 8.0.

Import php8.1 Language Runtime

php8.1 has been imported from debian's php git repository. There are FTBFS issue(s) to be resolved.

Specifically, on armhf, it is erroring:

jump_arm_aapcs_elf_gas.S:57: Error: selected processor does not support `vstmia sp,{d8-d15}' in ARM mode
jump_arm_aapcs_elf_gas.S:68: Error: selected processor does not support `vldmia sp,{d8-d15}' in ARM mode

These code lines have pre-processor conditions to include for VFP_FP (i.e. using the ARM VFP unit, which is native-endian IEEE-754) and not SOFTFP (software floating point rather than FPU). This seems to match the recommendations for armel, and presumably need tweaked for armhf. (Maybe instead of vstmia and vldmia, the calls should be vstmia.64 and vldmia.64?)

Update PHP Default Version

The next step will be to import php-defaults 84 in place of our current php-defaults 82~0build1. This will set php8.1 as the default php version for impish, thus starting the actual transition.

Most or all of the PHP stack will need rebuilt at this point. This is phased due to package dependencies - for the php7.4 transition we started with php-propro, php-apcu, and php-msgpack; followed by php-apcu-bc, php-imagick, and php-igbinary; and then the rest of the stack. I anticipate php8.1's transition will proceed similarly.

Phase 0

  • √php8.1 in universe archive for -proposed, at least
  • √php-defaults to 8.1 in -proposed

Phase 1

  • √php-pear
  • √php-propro
  • √php-msgpack
  • √php-apcu

Phase 2

  • √php-apcu-bc:
    • 'bc' stands for backwards-compatibility (for php5) and I've seen comments indicating an intent to stop providing that going forward. I haven't found a canonical link, but for example see https://lists.archlinux.org/pipermail/arch-dev-public/2021-January/030259.html

    • Still is being pulled in for doctrine, but possibly this will go away at some point.
    • After that, file a bug report requesting removal, and contact an archive admin to process it.
  • √ php-igbinary
  • √ php-memcache

Phase 3

  • √php-amqp
  • √php-raphf
  • √php-memcached
  • √php-redis
  • √mapserver
  • php-guzzlehttp-promises
    • √FTBFS: Failed opening required 'Theseer/Directoryscanner/autoload.php'
      • Might be intermittent build issue, trying a rebuild...

      • √ Likely was due to phpab or other dependency
    • Blocked on one arch by symfony
  • √php-net-url2

Phase 4

  • √php-cache-lite
  • √php-lua
  • √php-ast
  • √php-db
  • √php-excimer
  • √php-facedetect
  • √php-gearman
  • √php-geoip
  • √php-geos
  • √php-gmagick
  • √php-gnupg
  • √php-luasandbox
  • √php-oauth
  • √php-pcov
  • √php-pinba
  • √php-psr
  • √php-radius
  • √php-rrd
  • √php-sabredav
  • √php-solr
  • √php-ssh2
  • √php-stomp
  • √php-text-password
  • √php-uuid
  • √php-yac
  • √php-zmq
  • √php-http-request2
  • √pear-channels
  • √rss-bridge
  • √uwsgi
  • √sassphp
  • √remctl
  • √tideways
  • √wikidiff2
  • √xdebug
  • √php-crypt-gpg
  • symfony
    • Blocked by dependency on php-codecoverage (>= 9.2.7)

  • php-phpdocumentor-reflection-docblock:
    • √ Failed opening required 'Theseer/Directoryscanner/autoload.php
      • Might be intermittent build issue, trying a rebuild...

      • √ The phpdox link suggests the problem is an issue with the pear dependencies. Pear is used to download prerequisites from pear channels.
      • √ Likely was due to phpab or other dependency
    • Blocked on one arch by symfony
  • php-psr-log
    • √ Failed opening required 'Theseer/Directoryscanner/autoload.php
      • √ Likely was due to phpab or other dependency
    • Blocked on one arch by symfony
  • phpmd
    • √ Failed opening required 'Theseer/Directoryscanner/autoload.php
    • Caught in phpunit transition
  • phpunit-comparator
    • √ Failed opening required 'Theseer/Directoryscanner/autoload.php
    • Caught in phpunit transition
  • php-league-commonmark
    • √ Failed opening required 'Theseer/Directoryscanner/autoload.php
    • Caught in phpunit transition
  • pdepend
    • √ Failed opening required 'Theseer/Directoryscanner/autoload.php
    • Caught in phpunit transition
  • php-ds
    • error: macro "_ZEND_ARG_INFO_FLAGS" requires 3 arguments, but only 2 given
    • error: ‘_ZEND_ARG_INFO_FLAGS’ undeclared here (not in a function); did you mean ‘ZEND_ARG_INFO’?
    • These sound like some of the ZEND macro fixes we had to do for php8.0. Check upstream for patches or a newer version of the package. Or see if something's in Debian already. If not, fix is straightforward and similar to other patching we did for php8.0.
    • Likely needs https://github.com/php-ds/ext-ds/commit/0780117251734532dd292aa719ed20548c93e703 (See https://github.com/php-ds/ext-ds/issues/175#issuecomment-923444953), however this does not appear to be a full fix, as even with this applied there are additional errors for some other function calls. I suspect it will need another patch along these lines to fix the remaining calls that are not php8.1-ready.

  • php-mailparse
    • error: macro "php_stream_memory_open" passed 3 arguments, but takes just 2
    • Debian has a new upstream release 3.1.2. in git as of Nov 9th, whose release notes say "Fix for PHP 8.1", so probably best to sync this from Debian once it's in experimental or unstable.
  • php-mongodb
    • error: ‘zend_class_serialize_deny’ undeclared (first use in this function); did you mean ‘zend_ce_serializable’?
    • √ Check upstream & debian for patch. (Several patches are required in fact...)

    • Probably just another API deprecation that needs updated

    • Debian has 1.10.0 in their git tree

    • Needs 1.11.0 packaged
  • √ php-uploadprogress
    • √ armhf: FTBFS but no log; retried build
  • php-wmerrors
    • /usr/include/php/20210902/main/php_globals.h:29:29: error: ‘struct _php_core_globals’ has no member named ‘log_errors_max_len’
      • ./wmerrors.c: buffer_len = vspprintf(&buffer, PG(log_errors_max_len), format, my_args);

    • wmerrors.c:603:15: error: too many arguments to function ‘php_stream_open_for_zend_ex’
      • ret = php_stream_open_for_zend_ex(WMERRORS_G(error_script_file), &file_handle, STREAM_OPEN_FOR_INCLUDE);

      • The signature of this call has changed (see https://github.com/newrelic/newrelic-php-agent/issues/260). "added zend_stream_init_filename_ex() function, that takes filename as zend_string* the "filename" parameter of functions zend_stream_open(), php_stream_open_for_zend_ex() and callback zend_stream_open_function() has been removed (it's now passed as a "filename" field of the file_handle parameter)"

    • Upstream has no git commits for 2.5 yrs, nor bug tracker. No changes in Debian to consider, either.
    • May need to develop patch(es) ourselves to address the two above errors, and forward them up.
  • php-yaml
    • error: ‘ZEND_ATOL’ undeclared (first use in this function); did you mean ‘ZEND_AST_OR’?
    • There is an upstream version 2.2.2 advertising "php 8.1 fixes".
  • uwsgi-plugin-php
    • Pre-existing upload failure. Looks like it needs rebuilt against newer uwsgi?
    • This is a weird one to update because the source package is actually generated from the uwsgi package, so the two have to be kept in lockstep. (I may have notes from last time I had to do this...)
  • √ libguestfs
    • checking for guestfs.h... *** /<<PKGBUILDDIR>>/debian/build-1/ruby/ext/guestfs/extconf.rb failed ***

    • √ Missing dependency maybe? Tried just a rebuild as shot in the dark, if it still FTBFS will need investigated.
    • Debian has libguestfs | 1:1.44.2-1 | unstable
      • Looks like they've taken 1-2 pieces of ubuntu delta but there's more, so this probably isn't a sync.
    • Upstream has libguestfs 1.46.0

  • √ php-pecl-http
    • error: ‘spl_ce_Countable’ undeclared (first use in this function); did you mean ‘zend_ce_countable’?
    • √ Patched and uploaded
  • php-doctrine-cache
    • √ FTBFS for 1.10.2-2ubuntu3 is due to needing to s/php8.0-xml/php8.1-xml/ in d/{t,}/control
    • √ But then it fails due to the Directoryscanner/autoload.php issue.
    • Requires php-codecoverage which ftbfs on amd64 because it depends on an earlier version of itself which we did not publish, and which seems to have gotten stuck in a circular dependency with a new phpunit.
      • Tried just a simple rebuild

      • Tried changing phpunit's dependence on 9.2.7

      • Or else upload the interim version?
    • Debian has php-doctrine-cache | 1.12.1-1 | unstable
    • Debian also has php-doctrine-cache | 2.1.1-1 | experimental

Phase 5

  • √php-http-request2
  • √php-console-table
  • √php-db
    • Deprecated upstream, but a couple packages still use it.
    • Might need another hint for force-reset-test (c.f. LP: #1932078) and then retrigger?
  • √php-fxsl
  • √php-mail
  • √php-text-captcha
  • √ phpmyadmin-motranslator
    • √ PHP Warning: require_once(Theseer/Directoryscanner/autoload.php): Failed to open stream: No such file or directory in /usr/share/php/TheSeer/Autoload/autoload.php on line 4
    • √ PHPUnit\Runner\DefaultTestResultCache implements the Serializable interface, which is deprecated. Implement serialize() and unserialize() instead (or in addition, if support for old PHP versions is necessary) in /usr/share/php/PHPUnit/Runner/DefaultTestResultCache.php on line 34

  • √ php-sabre-vobject
    • Might need another hint for force-reset-test (c.f. LP: #1931897) and then retrigger?
    • PHP Fatal error: Uncaught Error: Failed opening required 'Theseer/Directoryscanner/autoload.php' (include_path='.:/usr/share/php') in /usr/share/php/TheSeer/Autoload/autoload.php:4
  • php-cache-integration-tests
    • √ PHP Fatal error: Uncaught Error: Failed opening required 'Theseer/Directoryscanner/autoload.php' (include_path='.:/usr/share/php') in /usr/share/php/TheSeer/Autoload/autoload.php:4
    • Blocked by symfony on arm64
  • php-symfony-security-acl
    • √ PHP Fatal error: Uncaught Error: Failed opening required 'Theseer/Directoryscanner/autoload.php' (include_path='.:/usr/share/php') in /usr/share/php/TheSeer/Autoload/autoload.php:4
    • Missing build on amd64, due to needing php-codecoverage (>= 9.2.7)

  • php-zend-stdlib
    • √ PHP Fatal error: Uncaught Error: Failed opening required 'Theseer/Directoryscanner/autoload.php' (include_path='.:/usr/share/php') in /usr/share/php/TheSeer/Autoload/autoload.php:4
    • Caught by phpunit transition
  • phpseclib
    • √ PHP Fatal error: Uncaught Error: Failed opening required 'Theseer/Directoryscanner/autoload.php' (include_path='.:/usr/share/php') in /usr/share/php/TheSeer/Autoload/autoload.php:4
    • Caught by phpunit transition
  • √ php-httpful
    • √ PHP Fatal error: Uncaught Error: Failed opening required 'Theseer/Directoryscanner/autoload.php' (include_path='.:/usr/share/php') in /usr/share/php/TheSeer/Autoload/autoload.php:4
  • php-league-html-to-markdown
    • √ PHP Fatal error: Uncaught Error: Failed opening required 'Theseer/Directoryscanner/autoload.php' (include_path='.:/usr/share/php') in /usr/share/php/TheSeer/Autoload/autoload.php:4
    • Caught by phpunit transition
  • php-console-commandline
    • 2 FAILED TESTS:
    • /<<PKGBUILDDIR>>/Console_CommandLine-1.2.1/tests/console_commandline_addargument.phpt

    • /<<PKGBUILDDIR>>/Console_CommandLine-1.2.1/tests/console_commandline_addoption.phpt

  • php-imagick
    • √ imagick.c:3800:84: error: ‘spl_ce_Countable’ undeclared; did you mean ‘zend_ce_countable’?
    • Caught in phpunit transition
  • zeroc-ice
    • src/Ice/Thread.cpp:717:22: error: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘long int’ [-Werror=sign-compare]

Phase 6

  • √owfs
  • √php-ps
  • php-mockery
    • √ FTBFS: Failed opening required 'Theseer/Directoryscanner/autoload.php'
    • Problem with php-codecoverage version on ppc64el
  • php-monolog
    • √ FTBFS: Failed opening required 'Theseer/Directoryscanner/autoload.php'
    • √ Seems to have pulled in some php8.0-* components on ppc64el
      • Retriggered just for ppc64el, but also with new symfony and phpunit
    • Problem with php-codecoverage version on ppc64el
  • libvirt-php
    • √ Depends on php-imagick, which is currently FTBFS
    • Uploaded no-change rebuild, but still FTBFS
  • php-amqplib
    • √ Depends on rabbitmq-server, which fails service startup on installation in my local LXC due to kernel crash. Was able to get around that by building in an impish container that has rabbitmq-server, but not php8.1. Uploading to PPA to see if this works around the problem.
    • Retriggered with php8.1
    • Debian has php-amqplib | 3.1.0-1 | experimental
  • php-tijsverkoyen-css-to-inline-styles
    • Depends on symfony

Removals

  • shaarli
    • Remove shaarli, php-oscarotero-gettext, and php-slim. These relate to the laravel/php-illuminate ecosystem
    • This was removed in hirsuite, but returned in jammy, so maybe needs blacklisted (as done for php-slim and php-nesbot-carbon)?
    • LP: #1931913

php8.0 removal request

See LP: #1927264 as example. php-defaults won't migrate while php8.0 is still in the archive, but we first need to resolve all the other issues.

ServerTeam/Transition/Php8.1 (last edited 2021-11-10 00:40:30 by bryce)