Prepare old laminas version (2.4) for newer PHP versions

Hello there,

I run a website with Zend Framework <2.5 (2.4.13) which is kind of outdated, yay surprise. It runs with PHP 7.2, but not with PHP 7.3 or 7.4 anymore. Issues seem to be easy to fix, like:

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/vendor/laminas/laminas-stdlib/src/ArrayObject.php on line 425

Fatal error: Uncaught ErrorException: compact(): Undefined variable: extras in /var/www/vendor/laminas/laminas-view/src/Helper/HeadLink.php:402

I tracked down the first one and it was fixed in newer versions of laminas-stdlib already. For me fixing those issues is probably easier than upgrading to a newer version + I don’t like updating the error level, feels like cheating. So before creating PR to target those issues I wanted to check if it’s welcomed to do so, because people/communities have different opinions on supporting old versions.


Support for newest PHP versions is considered a new addition, and requires a new minor release.

You should really just upgrade your dependencies :+1:

Hmp not happy with that. The first one is a bug, the second one also sounds like that.

We’re working hard to keep things maintained and up to speed with the rest of the ecosystem: so should consumers of the libraries that are provided.

Most (if not all) laminas packages support PHP 7.4 out of the box in newer releases, but you are just delaying the inevitable if you want to stick to an unmaintained release, making it even harder to upgrade later on, as your target (latest stable) keeps moving.