1
0
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
2021-01-09 16:14:58 -05:00
2020-12-29 12:33:11 +00:00
2020-12-29 12:57:09 +00:00
2020-12-13 17:13:48 -05:00
2019-06-16 09:04:56 -04:00
2021-01-07 08:48:33 -05:00
2020-12-04 15:11:14 -05:00
2020-05-19 17:51:28 -04:00
2020-12-29 17:37:09 +00:00
2019-06-16 09:04:56 -04:00
2018-12-14 11:20:31 -05:00
2020-11-29 16:27:00 -05:00
2020-12-04 15:11:14 -05:00
2018-11-10 23:23:36 -05:00
2019-06-05 10:43:51 -04:00
2020-11-27 17:20:34 -05:00
2020-11-19 19:40:40 -05:00
2020-10-12 00:59:19 -04:00

Psalm

Packagist Packagist Coverage Status Psalm coverage

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 Psalms 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.

Description
No description provided
Readme MIT 108 MiB
Languages
PHP 100%