n98-magerun2 v9.5.0: PHP 8.5 and Magento 2.4.9 Ready

We just tagged v9.5.0 (Codename Braunschweig) a focused maintenance release that keeps n98-magerun2 in step with the latest PHP and Magento versions, tightens up compatibility, and drops the first signal for a breaking change coming in v10.
PHP 8.5 and Magento 2.4.9 Support
The most important news: n98-magerun2 now officially supports PHP 8.5 and Magento 2.4.9. Both have been added to the CI matrix and documented accordingly.
On the code side, this required a few targeted fixes:
- Reflection API compatibility — PHP 8.5 tightened behavior around certain reflection and PDO attribute usages. The affected code paths have been updated.
- PDO SSL constant compatibility — SSL-related PDO constants changed their availability across PHP versions; the code now handles this gracefully regardless of which version you’re running.
If you’re running or planning to run Magento 2.4.9 on PHP 8.5, you can update n98-magerun2 with confidence.
install Command Deprecation
Starting with v9.5.0, the install command now prints a deprecation notice at startup:
$ n98-magerun2.phar install
[DEPRECATED] The "install" command is deprecated and will be removed in v10.0.0.
This is an early warning — the command still works as before. But if you have scripts or pipelines relying on n98-magerun2.phar install, now is a good time to plan your migration before v10 drops.
Bug Fixes
cache:reporterror handling — improved behavior when the configured cache adapter does not support ID retrieval; the command now fails gracefully instead of throwing an unhandled exception. The corresponding test is skipped when the adapter doesn’t support it.- PHPUnit notice assertions updated to align with current PHPUnit conventions.
- Deprecation-to-exception conversion disabled in PHPUnit to prevent test noise from PHP’s own deprecation notices during the 8.5 transition.
Full Changelog
Add
- Show deprecation notice at start of
installcommand (will be removed in v10.0.0)
Fix
- Add PHP 8.5 compatibility for reflection and PDO attributes
- Improve
cache:reporterror handling, update PHPUnit notice assertions, and resolve PDO SSL constant compatibility issues
Test
- Skip
cache:reporttest if cache adapter does not support ID retrieval - Disable deprecation-to-exception conversion in PHPUnit
Build
- PHP 8.5 and Magento 2.4.9 support in CI matrix and docs
- Update development dependencies: phpstan, php-cs-fixer, mcp/sdk, rmccue/requests, sigstore/cosign-installer, actions/github-script, softprops/action-gh-release, actions/upload-pages-artifact
How to Update
As always, the easiest way to update is via the built-in self-update command:
./n98-magerun2.phar self-update
Give v9.5.0 a spin and let us know how it goes — especially if you’re already on PHP 8.5 or testing against Magento 2.4.9. Feedback, bug reports, and pull requests are always welcome on GitHub.
0 Comments