Title: Enable Psalm's static code analysis to run on PHP 8.4 · Issue #2 · PhrozenByte/phpunit-array-asserts · GitHub
Open Graph Title: Enable Psalm's static code analysis to run on PHP 8.4 · Issue #2 · PhrozenByte/phpunit-array-asserts
X Title: Enable Psalm's static code analysis to run on PHP 8.4 · Issue #2 · PhrozenByte/phpunit-array-asserts
Description: Right now we try to support PHP 8.4 down to PHP 7.2, but especially PHP 8.4 marked many features as deprecated that affect our dev dependencies. Even though the whole idea of deprecation notices is that one can safely ignore them, the Ps...
Open Graph Description: Right now we try to support PHP 8.4 down to PHP 7.2, but especially PHP 8.4 marked many features as deprecated that affect our dev dependencies. Even though the whole idea of deprecation notices is...
X Description: Right now we try to support PHP 8.4 down to PHP 7.2, but especially PHP 8.4 marked many features as deprecated that affect our dev dependencies. Even though the whole idea of deprecation notices is...
Opengraph URL: https://github.com/PhrozenByte/phpunit-array-asserts/issues/2
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Enable Psalm's static code analysis to run on PHP 8.4","articleBody":"Right now we try to support PHP 8.4 down to PHP 7.2, but especially PHP 8.4 marked many features as deprecated that affect our dev dependencies. Even though the whole idea of deprecation notices is that one can safely ignore them, the Psalm developers felt the need to bail when PHP throws a deprecation notice - even in production environments (which are other project's dev environments). So, Psalm 4 bails with the following error on PHP 8.4:\n\n```\nPHP Deprecated: Constant E_STRICT is deprecated in /home/runner/work/phpunit-array-asserts/phpunit-array-asserts/vendor/vimeo/psalm/src/Psalm/Internal/ErrorHandler.php on line 53\nDeprecated: Constant E_STRICT is deprecated in /home/runner/work/phpunit-array-asserts/phpunit-array-asserts/vendor/vimeo/psalm/src/Psalm/Internal/ErrorHandler.php on line 53\nUncaught RuntimeException: PHP Error: Psalm\\Internal\\Provider\\FileProvider::getFilesInDir(): Implicitly marking parameter $filter as nullable is deprecated, the explicit nullable type must be used instead in /home/runner/work/phpunit-array-asserts/phpunit-array-asserts/vendor/vimeo/psalm/src/Psalm/Internal/Provider/FileProvider.php:123 in /home/runner/work/phpunit-array-asserts/phpunit-array-asserts/vendor/vimeo/psalm/src/Psalm/Internal/ErrorHandler.php:66\nStack trace:\n#0 /home/runner/work/phpunit-array-asserts/phpunit-array-asserts/vendor/composer/ClassLoader.php(576): Psalm\\Internal\\ErrorHandler::{closure:Psalm\\Internal\\ErrorHandler::installErrorHandler():59}()\n#1 /home/runner/work/phpunit-array-asserts/phpunit-array-asserts/vendor/composer/ClassLoader.php(576): include()\n#2 /home/runner/work/phpunit-array-asserts/phpunit-array-asserts/vendor/composer/ClassLoader.php(427): {closure:Composer\\Autoload\\ClassLoader::initializeIncludeClosure():575}()\n#3 /home/runner/work/phpunit-array-asserts/phpunit-array-asserts/vendor/vimeo/psalm/src/Psalm/Internal/Cli/Psalm.php(628): Composer\\Autoload\\ClassLoader-\u003eloadClass()\n#4 /home/runner/work/phpunit-array-asserts/phpunit-array-asserts/vendor/vimeo/psalm/src/Psalm/Internal/Cli/Psalm.php(325): Psalm\\Internal\\Cli\\Psalm::initProviders()\n#5 /home/runner/work/phpunit-array-asserts/phpunit-array-asserts/vendor/vimeo/psalm/psalm(7): Psalm\\Internal\\Cli\\Psalm::run()\n#6 /home/runner/work/phpunit-array-asserts/phpunit-array-asserts/vendor/bin/psalm(119): include('...')\n#7 {main}\n(Psalm 4.30.0@d0bc6e25d89f649e4f36a534f330f8bb4643dd69 crashed due to an uncaught Throwable)\n```\n\nI'm not aware of a way to make Psalm 4 work with PHP 8.4, the only solution seems to be to update to a newer Psalm version. However, newer Psalm versions no longer support PHP 7.2. So we either have to drop support for older PHP versions, something I don't want to do right now (not until PHPUnit 8 reaches its end-of-life, see https://phpunit.de/supported-versions.html), or use a different set of dev dependencies depending on the PHP versions (i.e. use newer Psalm versions on newer PHP versions, but keep on using old Psalm versions on old PHP versions).\n\nUntil this is implemented I've disabled Psalm with PHP 8.4 in 841db9aeb32b5100c232c39f2f135aff7a68e406\n\nHelp fixing this is very welcome! :+1:","author":{"url":"https://github.com/PhrozenByte","@type":"Person","name":"PhrozenByte"},"datePublished":"2025-09-24T16:09:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2/phpunit-array-asserts/issues/2"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:48a99c29-3175-8c23-87e6-3507b588e6e0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8E04:14B4F3:15A6D17:1C0D0C6:698FD48F |
| html-safe-nonce | 2bfc25ebe1284991397ff788958fe05acd8318e53547c025a1c24dbc693239ce |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTA0OjE0QjRGMzoxNUE2RDE3OjFDMEQwQzY6Njk4RkQ0OEYiLCJ2aXNpdG9yX2lkIjoiNzM5OTY2NjQ1NzQ5OTI5MTAzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 68a9fdc2f283aee5c6261babca64df823f8eda3d3da4d771f2dfa992d25ecd47 |
| hovercard-subject-tag | issue:3450072852 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PhrozenByte/phpunit-array-asserts/2/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c5b3b22138925288705e79498d0ec302d3a190b85ce8b281bdfc1694a6302339/PhrozenByte/phpunit-array-asserts/issues/2 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c5b3b22138925288705e79498d0ec302d3a190b85ce8b281bdfc1694a6302339/PhrozenByte/phpunit-array-asserts/issues/2 |
| og:image:alt | Right now we try to support PHP 8.4 down to PHP 7.2, but especially PHP 8.4 marked many features as deprecated that affect our dev dependencies. Even though the whole idea of deprecation notices is... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | PhrozenByte |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/PhrozenByte/phpunit-array-asserts git https://github.com/PhrozenByte/phpunit-array-asserts.git |
| octolytics-dimension-user_id | 920356 |
| octolytics-dimension-user_login | PhrozenByte |
| octolytics-dimension-repository_id | 324546783 |
| octolytics-dimension-repository_nwo | PhrozenByte/phpunit-array-asserts |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 324546783 |
| octolytics-dimension-repository_network_root_nwo | PhrozenByte/phpunit-array-asserts |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d320682233dfd4d28c0b30554a564c2fcd229032 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width