mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
Bruce Weirdan
c1a710999c
Skip conditional includes when registering autoload files (#4967)
This should allow analysis of forward-compatible polyfills used in codebases targeting older PHP versions. The following previously problematic polyfills should now emit no parse errors: * `symfony/polyfill-ctype` * `symfony/polyfill-intl-grapheme` * `symfony/polyfill-intl-normalizer` * `symfony/polyfill-mbstring` The pattern that is now works as intended looks like this: ```php if (\PHP_VERSION_ID >= 80000) { require __DIR__ . '/bootstrap80.php'; return; } ``` Previously Psalm would scan the required file even when codebase targeted older PHP versions, and would emit parse errors when that file contained PHP 8 syntax. Fixes #4961 and #4965
…
…
…
Psalm
Psalm is a static analysis tool for finding errors in PHP applications.
Installation
To get started, check out the installation guide.
Live Demo
You can play around with Psalm on its website.
Documentation
Documentation is available on Psalm’s website, generated from the docs folder.
Interested in contributing?
Have a look at CONTRIBUTING.md.
Who made this
Built by Matt Brown (@muglug).
Maintained by Matt and Bruce Weirdan (@weirdan).
The engineering team at Vimeo have provided a lot encouragement, especially @nbeliard, @erunion and @nickyr.
Languages
PHP
100%