[pkg-php-pear] Bug#1001413: Bug#1001413: error when running composer list

Joe Nahmias joe at nahmias.net
Fri Dec 10 18:06:53 GMT 2021


On Thu, Dec 09, 2021 at 09:42:07PM -0400, David Prévot wrote:
> Hi Joe,
> 
> Thank you for your report.
> 
> Le 09/12/2021 à 15:46, Joe Nahmias a écrit :
> […]
> > $ /usr/bin/composer list
> […]
> > PHP Fatal error:  Uncaught Error: Class "Normalizer" not found in /usr/share/php/Symfony/Component/Console/Helper/Helper.php:65
> 
> I suspect the issue is related to the PHP 8.1 transition that will soon
> begin. Can you check if php7.4-intl is installed, and if not, if installing
> it fixes the issue (or php8.1-intl if you already set PHP 8.1 as default).

Yes, php7.4-intl is already installed. Not sure how I would have set 8.1
as default...
Here's the full list of what I have:

$ dpkg -l php\* | grep ^.i
ii  php-cli                               2:8.1+85+really7.4+88                 all          command-line interpreter for the PHP scripting language (default)
ii  php-codecoverage                      9.2.10+dfsg-1                         all          collection, processing, and rendering for code coverage
ii  php-common                            2:88                                  all          Common files for PHP packages
ii  php-composer-ca-bundle                1.3.1-1                               all          utility library to find a path to the system CA bundle
ii  php-composer-metadata-minifier        1.0.0-2                               all          Small utility library that handles metadata minification and expansion
ii  php-composer-semver                   3.2.6-1                               all          utilities, version constraint parsing and validation
ii  php-composer-spdx-licenses            1.5.6-1                               all          SPDX licenses list and validation library
ii  php-composer-xdebug-handler           2.0.2-1                               all          Restarts a process without Xdebug
ii  php-db                                1.10.0-1                              all          Database Abstraction Layer
ii  php-deepcopy                          1.10.2-3                              all          create deep copies (clones) of objects
ii  php-doctrine-instantiator             1.4.0-1                               all          lightweight utility to instantiate objects in PHP
ii  php-file-iterator                     3.0.6-1                               all          FilterIterator implementation for PHP
ii  php-fpm                               2:8.1+85+really7.4+88                 all          server-side, HTML-embedded scripting language (FPM-CGI binary) (default)
ii  php-gd                                2:8.1+85+really7.4+88                 all          GD module for PHP [default]
ii  php-imap                              2:8.1+85+really7.4+88                 all          IMAP module for PHP [default]
ii  php-intl                              2:8.1+85+really7.4+88                 all          Internationalisation module for PHP [default]
ii  php-invoker                           3.1.1-2                               all          Invoke callables with a timeout
ii  php-json-schema                       5.2.11-1                              all          implementation of JSON schema
ii  php-mbstring                          2:8.1+85+really7.4+88                 all          MBSTRING module for PHP [default]
ii  php-mysql                             2:8.1+85+really7.4+88                 all          MySQL module for PHP [default]
ii  php-parser                            4.13.2-1                              all          convert PHP code into abstract syntax tree
ii  php-pear                              1:1.10.12+submodules+notgz+20210212-1 all          PEAR Base System
ii  php-phar-io-manifest                  2.0.3-1                               all          reading phar.io manifest information from a PHP Archive (Phar)
ii  php-phar-io-version                   3.0.4-1                               all          handling version information and constraint
ii  php-phpdocumentor-reflection-common   2.2.0-1                               all          Common reflection classes - phpDocumentor component
ii  php-phpdocumentor-reflection-docblock 5.3.0-1                               all          DocBlock parser - phpDocumentor component
ii  php-phpdocumentor-type-resolver       1.5.1-1                               all          TypeResolver and FqsenResolver - phpDocumentor component
ii  php-phpspec-prophecy                  1.14.0-2                              all          object mocking framework - phpspec component
ii  php-psr-container                     1.1.2-1                               all          Common Container Interface (PHP FIG PSR-11)
ii  php-psr-log                           1.1.3-2                               all          common interface for logging libraries
ii  php-react-promise                     2.7.0-2                               all          lightweight implementation of CommonJS Promises/A for PHP
ii  php-sqlite3                           2:8.1+85+really7.4+88                 all          SQLite3 module for PHP [default]
ii  php-symfony-console                   5.4.0+dfsg-2                          all          run tasks from the command line
ii  php-symfony-deprecation-contracts     2.5.0-2                               all          A generic function and convention to trigger deprecation notices
ii  php-symfony-filesystem                5.4.0+dfsg-2                          all          basic filesystem utilities
ii  php-symfony-finder                    5.4.0+dfsg-2                          all          find files and directories
ii  php-symfony-polyfill-php80            1.23.1-2                              all          Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions
ii  php-symfony-process                   5.4.0+dfsg-2                          all          execute commands in sub-processes
ii  php-symfony-service-contracts         2.5.0-2                               all          Generic abstractions related to writing services
ii  php-symfony-string                    5.4.0+dfsg-2                          all          object-oriented API to work with strings
ii  php-text-template                     2.0.4-1                               all          Simple template engine
ii  php-timer                             5.0.3-2                               all          Utility class for timing
ii  php-tokenizer                         1.2.1-1                               all          tokenized PHP source to XML converter
ii  php-webmozart-assert                  1.9.1-2                               all          Assertions to validate method input/output with nice error messages
ii  php-xml                               2:8.1+85+really7.4+88                 all          DOM, SimpleXML, WDDX, XML, and XSL module for PHP [default]
ii  php7.4-cli                            7.4.25-1+deb11u1                      amd64        command-line interpreter for the PHP scripting language
ii  php7.4-common                         7.4.25-1+deb11u1                      amd64        documentation, examples and common module for PHP
ii  php7.4-fpm                            7.4.25-1+deb11u1                      amd64        server-side, HTML-embedded scripting language (FPM-CGI binary)
ii  php7.4-gd                             7.4.25-1+deb11u1                      amd64        GD module for PHP
ii  php7.4-imap                           7.4.25-1+deb11u1                      amd64        IMAP module for PHP
ii  php7.4-intl                           7.4.25-1+deb11u1                      amd64        Internationalisation module for PHP
ii  php7.4-json                           7.4.25-1+deb11u1                      amd64        JSON module for PHP
ii  php7.4-mbstring                       7.4.25-1+deb11u1                      amd64        MBSTRING module for PHP
ii  php7.4-mysql                          7.4.25-1+deb11u1                      amd64        MySQL module for PHP
ii  php7.4-opcache                        7.4.25-1+deb11u1                      amd64        Zend OpCache module for PHP
ii  php7.4-readline                       7.4.25-1+deb11u1                      amd64        readline module for PHP
ii  php7.4-sqlite3                        7.4.25-1+deb11u1                      amd64        SQLite3 module for PHP
ii  php7.4-xml                            7.4.25-1+deb11u1                      amd64        DOM, SimpleXML, XML, and XSL module for PHP
ii  php8.1-cli                            8.1.0-1                               amd64        command-line interpreter for the PHP scripting language
ii  php8.1-common                         8.1.0-1                               amd64        documentation, examples and common module for PHP
ii  php8.1-mbstring                       8.1.0-1                               amd64        MBSTRING module for PHP
ii  php8.1-opcache                        8.1.0-1                               amd64        Zend OpCache module for PHP
ii  php8.1-readline                       8.1.0-1                               amd64        readline module for PHP
ii  php8.1-xml                            8.1.0-1                               amd64        DOM, SimpleXML, XML, and XSL module for PHP
ii  phpunit                               9.5.10-1                              all          Unit testing suite for PHP
ii  phpunit-cli-parser                    1.0.1-1                               all          Library for parsing CLI options
ii  phpunit-code-unit                     1.0.8-1                               all          Collection of value objects that represent the PHP code units
ii  phpunit-code-unit-reverse-lookup      2.0.3-2                               all          look up what a line of code belongs to - PHPUnit component
ii  phpunit-comparator                    4.0.6-1                               all          functionality to compare PHP values for equality - PHPUnit component
ii  phpunit-complexity                    2.0.2-1                               all          Library for calculating the complexity of PHP code units
ii  phpunit-diff                          4.0.4-1                               all          diff implementation - stand-alone component from PHPUnit
ii  phpunit-environment                   5.1.3-2                               all          functionality to handle HHVM/PHP environments - PHPUnit component
ii  phpunit-exporter                      4.0.4-1                               all          export variables for visualization - PHPUnit component
ii  phpunit-global-state                  5.0.3-2                               all          snapshotting of global state - PHPUnit component
ii  phpunit-lines-of-code                 1.0.3-1                               all          Library for counting the lines of code in PHP source code
ii  phpunit-object-enumerator             4.0.4-1                               all          enumerate all referenced objects - PHPUnit component
ii  phpunit-object-reflector              2.0.4-1                               all          reflection of object attributes - PHPUnit component
ii  phpunit-recursion-context             4.0.4-1                               all          recursively process PHP variables - PHPUnit component
ii  phpunit-resource-operations           3.0.3-2                               all          provide a list of PHP built-in functions that operate on resources
ii  phpunit-type                          2.3.4-3                               all          Collection of value objects that represent the types of the PHP type system
ii  phpunit-version                       3.0.2-2                               all          Library that helps with managing the version number of Git-hosted PHP projects

> If not, please, share the output of the following two commands.
> 
> update-alternatives --display php

$ update-alternatives --display php
php - auto mode
  link best version is /usr/bin/php.default
  link currently points to /usr/bin/php.default
  link php is /usr/bin/php
  slave php.1.gz is /usr/share/man/man1/php.1.gz
/usr/bin/php.default - priority 100
  slave php.1.gz: /usr/share/man/man1/php.default.1.gz
/usr/bin/php7.4 - priority 74
  slave php.1.gz: /usr/share/man/man1/php7.4.1.gz
/usr/bin/php8.1 - priority 81
  slave php.1.gz: /usr/share/man/man1/php8.1.1.gz

> ls -l /etc/php/*/cli/conf.d

$ ls -l /etc/php/*/cli/conf.d
/etc/php/7.4/cli/conf.d:
total 0
lrwxrwxrwx 1 root root 39 Nov 24 09:45 10-mysqlnd.ini -> /etc/php/7.4/mods-available/mysqlnd.ini
lrwxrwxrwx 1 root root 39 Nov 24 09:45 10-opcache.ini -> /etc/php/7.4/mods-available/opcache.ini
lrwxrwxrwx 1 root root 35 Nov 24 09:45 10-pdo.ini -> /etc/php/7.4/mods-available/pdo.ini
lrwxrwxrwx 1 root root 35 Nov 24 09:45 15-xml.ini -> /etc/php/7.4/mods-available/xml.ini
lrwxrwxrwx 1 root root 40 Nov 24 09:45 20-calendar.ini -> /etc/php/7.4/mods-available/calendar.ini
lrwxrwxrwx 1 root root 37 Nov 24 09:45 20-ctype.ini -> /etc/php/7.4/mods-available/ctype.ini
lrwxrwxrwx 1 root root 35 Nov 24 09:45 20-dom.ini -> /etc/php/7.4/mods-available/dom.ini
lrwxrwxrwx 1 root root 36 Nov 24 09:45 20-exif.ini -> /etc/php/7.4/mods-available/exif.ini
lrwxrwxrwx 1 root root 35 Nov 24 09:45 20-ffi.ini -> /etc/php/7.4/mods-available/ffi.ini
lrwxrwxrwx 1 root root 40 Nov 24 09:45 20-fileinfo.ini -> /etc/php/7.4/mods-available/fileinfo.ini
lrwxrwxrwx 1 root root 35 Nov 24 09:45 20-ftp.ini -> /etc/php/7.4/mods-available/ftp.ini
lrwxrwxrwx 1 root root 34 Nov 24 09:45 20-gd.ini -> /etc/php/7.4/mods-available/gd.ini
lrwxrwxrwx 1 root root 39 Nov 24 09:45 20-gettext.ini -> /etc/php/7.4/mods-available/gettext.ini
lrwxrwxrwx 1 root root 37 Nov 24 09:45 20-iconv.ini -> /etc/php/7.4/mods-available/iconv.ini
lrwxrwxrwx 1 root root 36 Nov 24 09:45 20-imap.ini -> /etc/php/7.4/mods-available/imap.ini
lrwxrwxrwx 1 root root 36 Dec  9 14:21 20-intl.ini -> /etc/php/7.4/mods-available/intl.ini
lrwxrwxrwx 1 root root 36 Nov 24 09:45 20-json.ini -> /etc/php/7.4/mods-available/json.ini
lrwxrwxrwx 1 root root 40 Nov 24 09:45 20-mbstring.ini -> /etc/php/7.4/mods-available/mbstring.ini
lrwxrwxrwx 1 root root 38 Nov 24 09:45 20-mysqli.ini -> /etc/php/7.4/mods-available/mysqli.ini
lrwxrwxrwx 1 root root 41 Nov 24 09:45 20-pdo_mysql.ini -> /etc/php/7.4/mods-available/pdo_mysql.ini
lrwxrwxrwx 1 root root 42 Dec  9 15:19 20-pdo_sqlite.ini -> /etc/php/7.4/mods-available/pdo_sqlite.ini
lrwxrwxrwx 1 root root 36 Nov 24 09:45 20-phar.ini -> /etc/php/7.4/mods-available/phar.ini
lrwxrwxrwx 1 root root 37 Nov 24 09:45 20-posix.ini -> /etc/php/7.4/mods-available/posix.ini
lrwxrwxrwx 1 root root 40 Nov 24 09:45 20-readline.ini -> /etc/php/7.4/mods-available/readline.ini
lrwxrwxrwx 1 root root 37 Nov 24 09:45 20-shmop.ini -> /etc/php/7.4/mods-available/shmop.ini
lrwxrwxrwx 1 root root 41 Nov 24 09:45 20-simplexml.ini -> /etc/php/7.4/mods-available/simplexml.ini
lrwxrwxrwx 1 root root 39 Nov 24 09:45 20-sockets.ini -> /etc/php/7.4/mods-available/sockets.ini
lrwxrwxrwx 1 root root 39 Dec  9 15:19 20-sqlite3.ini -> /etc/php/7.4/mods-available/sqlite3.ini
lrwxrwxrwx 1 root root 39 Nov 24 09:45 20-sysvmsg.ini -> /etc/php/7.4/mods-available/sysvmsg.ini
lrwxrwxrwx 1 root root 39 Nov 24 09:45 20-sysvsem.ini -> /etc/php/7.4/mods-available/sysvsem.ini
lrwxrwxrwx 1 root root 39 Nov 24 09:45 20-sysvshm.ini -> /etc/php/7.4/mods-available/sysvshm.ini
lrwxrwxrwx 1 root root 41 Nov 24 09:45 20-tokenizer.ini -> /etc/php/7.4/mods-available/tokenizer.ini
lrwxrwxrwx 1 root root 41 Nov 24 09:45 20-xmlreader.ini -> /etc/php/7.4/mods-available/xmlreader.ini
lrwxrwxrwx 1 root root 41 Nov 24 09:45 20-xmlwriter.ini -> /etc/php/7.4/mods-available/xmlwriter.ini
lrwxrwxrwx 1 root root 35 Nov 24 09:45 20-xsl.ini -> /etc/php/7.4/mods-available/xsl.ini

/etc/php/8.1/cli/conf.d:
total 0
lrwxrwxrwx 1 root root 39 Nov 22 08:54 10-opcache.ini -> /etc/php/8.1/mods-available/opcache.ini
lrwxrwxrwx 1 root root 35 Nov 22 08:52 10-pdo.ini -> /etc/php/8.1/mods-available/pdo.ini
lrwxrwxrwx 1 root root 35 Nov 22 08:53 15-xml.ini -> /etc/php/8.1/mods-available/xml.ini
lrwxrwxrwx 1 root root 40 Nov 22 08:51 20-calendar.ini -> /etc/php/8.1/mods-available/calendar.ini
lrwxrwxrwx 1 root root 37 Nov 22 08:51 20-ctype.ini -> /etc/php/8.1/mods-available/ctype.ini
lrwxrwxrwx 1 root root 35 Nov 22 08:53 20-dom.ini -> /etc/php/8.1/mods-available/dom.ini
lrwxrwxrwx 1 root root 36 Nov 22 08:52 20-exif.ini -> /etc/php/8.1/mods-available/exif.ini
lrwxrwxrwx 1 root root 35 Nov 22 08:52 20-ffi.ini -> /etc/php/8.1/mods-available/ffi.ini
lrwxrwxrwx 1 root root 40 Nov 22 08:52 20-fileinfo.ini -> /etc/php/8.1/mods-available/fileinfo.ini
lrwxrwxrwx 1 root root 35 Nov 22 08:52 20-ftp.ini -> /etc/php/8.1/mods-available/ftp.ini
lrwxrwxrwx 1 root root 39 Nov 22 08:52 20-gettext.ini -> /etc/php/8.1/mods-available/gettext.ini
lrwxrwxrwx 1 root root 37 Nov 22 08:52 20-iconv.ini -> /etc/php/8.1/mods-available/iconv.ini
lrwxrwxrwx 1 root root 40 Nov 22 08:54 20-mbstring.ini -> /etc/php/8.1/mods-available/mbstring.ini
lrwxrwxrwx 1 root root 36 Nov 22 08:52 20-phar.ini -> /etc/php/8.1/mods-available/phar.ini
lrwxrwxrwx 1 root root 37 Nov 22 08:52 20-posix.ini -> /etc/php/8.1/mods-available/posix.ini
lrwxrwxrwx 1 root root 40 Nov 22 08:54 20-readline.ini -> /etc/php/8.1/mods-available/readline.ini
lrwxrwxrwx 1 root root 37 Nov 22 08:52 20-shmop.ini -> /etc/php/8.1/mods-available/shmop.ini
lrwxrwxrwx 1 root root 41 Nov 22 08:53 20-simplexml.ini -> /etc/php/8.1/mods-available/simplexml.ini
lrwxrwxrwx 1 root root 39 Nov 22 08:52 20-sockets.ini -> /etc/php/8.1/mods-available/sockets.ini
lrwxrwxrwx 1 root root 39 Nov 22 08:52 20-sysvmsg.ini -> /etc/php/8.1/mods-available/sysvmsg.ini
lrwxrwxrwx 1 root root 39 Nov 22 08:52 20-sysvsem.ini -> /etc/php/8.1/mods-available/sysvsem.ini
lrwxrwxrwx 1 root root 39 Nov 22 08:52 20-sysvshm.ini -> /etc/php/8.1/mods-available/sysvshm.ini
lrwxrwxrwx 1 root root 41 Nov 22 08:52 20-tokenizer.ini -> /etc/php/8.1/mods-available/tokenizer.ini
lrwxrwxrwx 1 root root 41 Nov 22 08:53 20-xmlreader.ini -> /etc/php/8.1/mods-available/xmlreader.ini
lrwxrwxrwx 1 root root 41 Nov 22 08:53 20-xmlwriter.ini -> /etc/php/8.1/mods-available/xmlwriter.ini
lrwxrwxrwx 1 root root 35 Nov 22 08:53 20-xsl.ini -> /etc/php/8.1/mods-available/xsl.ini

After remove all php8.1 packages using:

$ sudo apt purge php8\*

Running `composer list` works again.

> Regards
> 
> David

Thanks for the pointer,
--Joe



More information about the pkg-php-pear mailing list