Upgrade error (from 3.0.2 to 3.1.1)

Not sure yet if it’s something I’ve done, but since I’m encountering it, sharing. After replacing the /application and /vendor folders and the root .php files, which is my normal upgrade process, I get this.

Declaration of Laminas\ServiceManager\ServiceManager::get($name) must be compatible with Psr\Container\ContainerInterface

[root@taep-web1-prod-asb logs]# php --version
PHP 7.1.33 (cli) (built: Aug 25 2021 16:09:54) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies

What version of PHP are you using? It looks like this problem’s happening because of the static typing added to psr/container between v1.0.0 and v.1.1.0 released five days ago to deprecate PHP < 7.2

OK I didn’t check the system requirements and I guess it changed between 3.0 and 3.1 - that PHP7.2 is now the minimum required.

We do have a check to show if the PHP version is wrong with a friendlier message, but in many situations there will be a syntax error like this before our “friendly message” check can run.

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.