Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
setup-php
GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.
It part of downgrad script that downgrades Rector from PHP 7.3 to PHP 7.1 - here https://github.com/rectorphp/rector/blob/b03fa60c521f9e067bf8b3454db5b3b77edf398e/build/build-rector-scoped.sh#L43-L44
FYI array_key_first and such were easily polyfilled in older versions https://github.com/symfony/polyfill but it doesn't matter now! 😅
If you're on GitHub, it's trivial to run tests on all versions with GitHub actions. https://github.com/shivammathur/setup-php
Microsoft is also maintaining 5.6, and making it available for everyone, here: https://github.com/microsoft/php-src
Here’s the one I helped build and use at the agency I worked for. Should show you how we did it pretty clearly: https://github.com/moderntribe/square-one/blob/main/composer.json
The downgraded Rector: https://github.com/rectorphp/rector-prefixed