[ixpmanager] Composer / PHP Woes during IXP Manager Update

Ian Chilton ian at lonap.net
Mon Nov 15 10:55:58 GMT 2021


Hi,

Just attempting to upgrade to the new 6.2.0 release on our development 
instance of IXP Manager.

Running Ubuntu 20.04 with the ondrej PPA for PHP 8. Have just 
dist-upgraded to update everything.
(deb http://ppa.launchpad.net/ondrej/php/ubuntu focal main)

Trying to run composer, first ran in to this:

ixpmanager at portal:/srv/ixpmanager$ HOME=/srv/ixpmanager composer install 
--no-dev --prefer-dist
Deprecation Notice: Required parameter $path follows optional parameter 
$schema in 
/usr/share/php/JsonSchema/Constraints/UndefinedConstraint.php:62
Deprecation Notice: Required parameter $path follows optional parameter 
$schema in 
/usr/share/php/JsonSchema/Constraints/UndefinedConstraint.php:108
Deprecation Notice: Method ReflectionParameter::getClass() is deprecated 
in /usr/share/php/Composer/Repository/RepositoryManager.php:130
Deprecation Notice: Method ReflectionParameter::getClass() is deprecated 
in /usr/share/php/Composer/Repository/RepositoryManager.php:130
Deprecation Notice: Method ReflectionParameter::getClass() is deprecated 
in /usr/share/php/Composer/Repository/RepositoryManager.php:130
Loading composer repositories with package information
Installing dependencies from lock file
PHP Fatal error: Uncaught ArgumentCountError: array_merge() does not 
accept unknown named parameters in 
/usr/share/php/Composer/DependencyResolver/DefaultPolicy.php:84

There is an issue here: https://github.com/composer/composer/issues/9097 
- saying it’s fixed in the latest.

root at portal:~# dpkg -l |grep compos
ii composer 1.10.1-1

So I did:
$ wget https://getcomposer.org/download/2.1.12/composer.phar

Which looks better, but then fails with another error:

ixpmanager at portal:/srv/ixpmanager$ HOME=/srv/ixpmanager php 
./composer.phar install --prefer-dist --no-dev
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Package operations: 7 installs, 50 updates, 0 removals
- Downloading composer/package-versions-deprecated (1.11.99.4)
- Downloading symfony/polyfill-php80 (v1.23.1)
[snip the rest of the package list]
- Upgrading laravel/socialite (v5.2.3 => v5.2.5): Extracting archive
Package webmozart/path-util is abandoned, you should avoid using it. Use 
symfony/filesystem instead.
Generating autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class

Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover

In MemcachedConnector.php line 69:

Class "Memcached" not found

Script @php artisan package:discover handling the post-autoload-dump 
event returned with error code 1

….which it just won’t get past:

ixpmanager at portal:/srv/ixpmanager$ HOME=/srv/ixpmanager php 
./composer.phar install --prefer-dist --no-dev
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Package webmozart/path-util is abandoned, you should avoid using it. Use 
symfony/filesystem instead.
Generating autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class

Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover

In MemcachedConnector.php line 69:

Class "Memcached" not found

Script @php artisan package:discover handling the post-autoload-dump 
event returned with error code 1
ixpmanager at portal:/srv/ixpmanager$

Searching for MemcachedConnector.php, it’s at:
./vendor/laravel/framework/src/Illuminate/Cache/MemcachedConnector.php

And line 69 is the return statement:

protected function createMemcachedInstance($connectionId)
{
     return empty($connectionId) ? new Memcached : new 
Memcached($connectionId);
}

In fact, this isn’t a composer thing:

ixpmanager at portal:/srv/ixpmanager$ php $IXPROOT/artisan migrate:status

In MemcachedConnector.php line 69:

   Class "Memcached" not found



Oddly I do now notice I’ve got a mix of PHP 8 and 8.1 installed?

root at portal:~# dpkg -l |grep php | grep fpm
ii php8.0-fpm 8.0.12-1+ubuntu20.04.1+deb.sury.org+1 amd64 server-side, 
HTML-embedded scripting language (FPM-CGI binary)

root at portal:~# dpkg -l |grep php | grep memcached
ii php-memcached 3.1.5+2.2.0-10+ubuntu20.04.1+deb.sury.org+3 amd64 
memcached extension module for PHP, uses libmemcached
rc php8.0-memcached 3.1.5+2.2.0-10+ubuntu20.04.1+deb.sury.org+3 amd64 
memcached extension module for PHP, uses libmemcached
ii php8.1-memcached 3.1.5+2.2.0-10+ubuntu20.04.1+deb.sury.org+3 amd64 
memcached extension module for PHP, uses libmemcached

So I did:
apt-get install php8.0-memcache and php8.0-memcached

Now both composer and artisan commands now seem ok again.


So going forward - do people tend to use the distro supplied composer 
(and have you had the same problem?) or pull an up-to-date one?

Any ideas what’s going on with the PHP PPA and why it appears to have 
half transitioned to PHP 8.1?

Thanks,

Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.inex.ie/pipermail/ixpmanager/attachments/20211115/b1a3f7b2/attachment.htm>


More information about the ixpmanager mailing list