Skip to content

Conversation

@staabm
Copy link
Contributor

@staabm staabm commented Oct 31, 2025

more readable code by using array_last. also adds symfony/polyfills required for release builds which support PHP older than 8.5


fixes ~9x "offset might not exist" errors on phpstan-src with reportPossiblyNonexistentGeneralArrayOffset: true

@ondrejmirtes
Copy link
Member

Please also add php84 polyfill to all the places. And once it's merged the bootstrap.php also needs to be modified in phpstan/phpstan.

@ondrejmirtes
Copy link
Member

The polyfills also need to be mentioned at the bottom of scoper.inc.php (that's what I screwed up last time and shipped it, lead to crashing in some projects).

@staabm staabm marked this pull request as ready for review October 31, 2025 12:56
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@staabm
Copy link
Contributor Author

staabm commented Oct 31, 2025

something is fishy with shipmonk/composer-dependency-analyser

@ondrejmirtes
Copy link
Member

Maybe needs to run on 8.5?

@staabm
Copy link
Contributor Author

staabm commented Oct 31, 2025

seems this did the trick. thank you.

@ondrejmirtes ondrejmirtes merged commit 230e9ee into phpstan:2.1.x Oct 31, 2025
537 of 554 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

@staabm staabm deleted the poly branch October 31, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants