You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e7757dc
Browse filesBrowse the repository at this point in the historyBrowse files
Do not locate symbols declared by the symfony/polyfill-* packages bundled with PHPStan itself
* Added `SkipBundledPolyfillSourceLocator` which drops located functions, classes and
constants whose file lives in a `symfony/polyfill-*` directory inside PHPStan's own
installation directory (the source tree or the PHAR).
* `BetterReflectionSourceLocatorFactory` wraps both runtime-based locators with it -
`AutoloadFunctionsSourceLocator` and the `AutoloadSourceLocator` that answers from
`function_exists()` / `class_exists()`. Polyfills installed in the analysed project
keep working: the Composer source locators run before those two.
* Classes have the same bug as the reported functions and are fixed by the same wrapper
(e.g. `Filter\FilterException` from `symfony/polyfill-php85` was silently accepted with
`phpVersion: 80400`).
* Probed and left alone: global constants (PHPStan does not version-gate constants at all,
even internal ones like `T_NAME_QUALIFIED`), `PhpInternalSourceLocator` and
`EvaledCodeSourceLocator` (they only surface symbols that have an extension name, so
userland polyfill declarations never reach them), and the attribute classes `NoDiscard`,
`Deprecated`, `Override`, ... which better-reflection deliberately reports as present in
every PHP version.
0 commit comments