Matt Brown
c2eba896a4
Fix #4982 - ensure destructuring assignments are seen inside a loop
2021-01-29 11:47:29 +01:00
Matt Brown
dfb82b8487
Fix #4955 - catch invalid passing class constant where templated class string expected
2021-01-29 11:47:29 +01:00
Bruce Weirdan
398f5f9970
Allow Attribute::IS_REPEATABLE ( #4971 )
...
This allows Attribute::IS_REPEATABLE to be specified as attribute flag.
Fixes vimeo/psalm#4892 , vimeo/psalm#4970
2021-01-29 11:47:29 +01:00
Matt Brown
c6e09db4ff
Add non-emptiness check
2021-01-29 11:47:29 +01:00
Matt Brown
99da1daae5
Fix #4958 - honour template as inheritance when comparing template types
2021-01-29 11:47:29 +01:00
Matt Brown
387abc1cb6
Fix #4943
...
Prevent input types becoming part of the inferred generic params when a match is found
2021-01-29 11:47:29 +01:00
Bruce Weirdan
9ce329c866
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-29 11:47:29 +01:00
Bruce Weirdan
d9999b575d
Removed misc files from dist archives ( #4968 )
2021-01-29 11:47:28 +01:00
Adrien LUCAS
fe71e8d16b
Trigger dispatch even when only legacy hooks ( #4962 )
2021-01-29 11:47:28 +01:00
Bruce Weirdan
7b43d321ad
Correct gzread signature ( #4960 )
...
Fixes vimeo/psalm#4959
2021-01-29 11:47:28 +01:00
Adrien LUCAS
f9cbc07fb7
Avoid false positives for taint specialized calls even when not using a variable ( #4948 )
2021-01-29 11:47:28 +01:00
Matthew Brown
77975167a7
Fix #4951 - add Traversable interface to PDOStatement
2021-01-29 11:47:28 +01:00
Matt Brown
4c5c32bc93
Fix #4945 - use assertion string for scalar templated assertions
2021-01-29 11:47:28 +01:00
orklah
31be6212b7
add stubs for standard iterators ( #4725 )
...
* add stubs for standard iterators
* Apply suggestions from code review cc @weirdan
Co-authored-by: Bruce Weirdan <weirdan@gmail.com>
* complete stub + delete code made redundant by stubs + fix some syntax in stubs
* fix parse error
Co-authored-by: Bruce Weirdan <weirdan@gmail.com>
2021-01-29 11:47:28 +01:00
orklah
e99cf5f514
adds statements list in the event ( #4835 )
2021-01-29 11:47:28 +01:00
orklah
7f4550a889
pass args through event ( #4864 )
2021-01-29 11:47:27 +01:00
Matthew Brown
f46583d9d1
Update language_server.md
2021-01-29 11:47:27 +01:00
Adrien LUCAS
63ddceaf8e
Taint specialized calls even when not using a variable ( #4940 )
2021-01-29 11:47:27 +01:00
Matt Brown
e67315424f
Fix #4917 - allow array_reduce to be called with a single arg
2021-01-29 11:47:27 +01:00
orklah
c2c25ada84
add ArrayAccess to SimpleXmlElement ( #4934 )
...
* add ArrayAccess to SimpleXmlElement
* add test
2021-01-29 11:47:27 +01:00
orklah
d8fea8aabb
implement DTO for plugins ( #4881 )
...
* implement DTO for plugins
* introduce EventHandler + reintroduce legacy API for plugins
2021-01-29 11:47:27 +01:00
orklah
a17e403270
handle concatenation with int parts ( #4938 )
2021-01-29 11:47:27 +01:00
Matthew Brown
1d6338e13b
Add comments to AtomicMethodCallAnalyzer and suppress ComplexMethod
2021-01-29 11:47:27 +01:00
Matthew Brown
257f67d593
Break apart type combiner
2021-01-29 11:47:26 +01:00
Matthew Brown
237520eafc
Break out large chunk to simplify function
2021-01-29 11:47:26 +01:00
Matthew Brown
8696873cb9
Break out parent and implemented class checks
2021-01-29 11:47:26 +01:00
Matthew Brown
affaa5ea85
Uncomment erroneously-commented return
2021-01-29 11:47:26 +01:00
Matthew Brown
f00a53efd5
Break out large chunk
2021-01-29 11:47:26 +01:00
Matthew Brown
0e1ef2e096
Ignore recently-deleted files for scanning
2021-01-29 11:47:25 +01:00
orklah
e949ed68ac
Infer result of modulo 1 operation statically ( #4926 )
2021-01-29 11:47:25 +01:00
Lukas Bestle
27f3331a81
PHAR: Include issue docs for SARIF output ( #4925 )
...
The SARIF report uses the Markdown files inside `docs/running_psalm/issues` for its output, so the files should be included in the PHAR.
2021-01-29 11:47:25 +01:00
Lukas Bestle
c58f5603c3
SARIF report: Include help links ( #4924 )
2021-01-29 11:47:25 +01:00
Lukas Bestle
0355465b38
Full support for $this
in @var
annotations ( #4922 )
...
Fixes #4916 .
2021-01-29 11:47:25 +01:00
MaximAL
d881f57e85
Consistent curly apostrophe characters ( #4918 )
2021-01-29 11:47:25 +01:00
Holger Woltersdorf
972da55d84
Add missing param for constructor arguments in PDOStatement#fetchObject ( #4915 )
...
* Add missing param for constructor arguments
PDOStatement#fetchObject allows a second, optional parameter for constructor arguments, which - if given - will be passed to the given class' constructor.
See: https://www.php.net/manual/de/pdostatement.fetchobject.php
Also see the PhpStorm stubs: https://github.com/JetBrains/phpstorm-stubs/blob/master/PDO/PDO.php#L1441
* Fix wrong nullability for 2nd argument in PDOStatement#fetchObject
2021-01-29 11:47:24 +01:00
Matthew Brown
491940e4b8
Just build Phar on Travis
2021-01-29 11:47:24 +01:00
Matthew Brown
7142c53f18
Fix test
2021-01-29 11:47:24 +01:00
Matthew Brown
3322ffb3f0
Fix #4912 - detect mismatching property type
2021-01-29 11:47:24 +01:00
Tyson Andre
d169d399af
Check if included files are listed in mustBeIgnored ( #4911 )
...
Previously, when a file was included in `include()`, it was not subject
to ignoreFiles
Related to #4876
2021-01-29 11:47:23 +01:00
Matthew Brown
704ae5bd8f
Fix lack of autoload_real in latest humbug/box
2021-01-29 11:47:23 +01:00
Matthew Brown
64ea6f8ce9
Fix other check
2021-01-29 11:47:23 +01:00
Matthew Brown
5165dc91b7
Disable platform check for Phar
2021-01-29 11:47:23 +01:00
Matthew Brown
c68e77a382
Bump circleci image version
2021-01-29 11:47:23 +01:00
Matthew Brown
ba823602ea
Fix #4901 - simplify mapping of template types within class
2021-01-29 11:47:23 +01:00
orklah
8076db9c44
[Doc] Add an example to explain how to handle plugin issues ( #4908 )
2021-01-29 11:47:23 +01:00
orklah
a475b23f0b
fix phpdoc ( #4905 )
2021-01-29 11:47:23 +01:00
orklah
bc900b2dd6
Document lowercase-string when possible ( #4904 )
...
* document lowercase-string
* fix missing strtolower
2021-01-29 11:47:22 +01:00
Benjamin Morel
8908877aa0
Change ReflectionUnionType::getTypes() return type ( #4903 )
2021-01-29 11:47:22 +01:00
Benjamin Morel
44c79daf1a
GEOS stubs ( #4902 )
2021-01-29 11:47:22 +01:00
Benjamin Morel
e6d23d10e9
Return type for DateTimeZone::getTransitions() ( #4879 )
2021-01-29 11:47:22 +01:00