adrew
dd0e00e153
Renaming all occurrences of "function dynamic storage" to "dynamic function storage"
2022-01-28 15:18:30 +03:00
adrew
e5dae6a901
Prevent first-class-callable handling with FunctionDynamicStorageProvider
2022-01-28 15:18:30 +03:00
adrew
de2257ecd3
Make ArgTypeInferer constructor internal
2022-01-28 15:18:30 +03:00
adrew
46f695993b
Make FunctionDynamicStorageProviderEvent final
2022-01-28 15:18:30 +03:00
adrew
693b295c01
Improve ArgTypeInferer
2022-01-28 15:18:30 +03:00
adrew
9b383a5a19
Try to create public api for new hook
2022-01-28 15:18:30 +03:00
adrew
3c22ecfa98
Remove args pre-analysis before run params provider hook
2022-01-28 15:18:30 +03:00
adrew
aefe971b90
Fix template creation in ArrayMapStorageProvider
2022-01-28 15:18:30 +03:00
adrew
89c6a70dda
Simplify dynamic storage handling in FunctionCallAnalyzer
2022-01-28 15:18:30 +03:00
adrew
a4e56ae288
Fix method name
2022-01-28 15:18:30 +03:00
adrew
ce1cec5d3a
Using FuncCall instead of list<Arg> in FunctionDynamicStorageProvider for more flexibility
2022-01-28 15:18:30 +03:00
adrew
e93c90bc89
Fix double run FunctionDynamicStorageProvider for already analysed function
2022-01-28 15:18:29 +03:00
adrew
ec9b2288cc
Fix CS
2022-01-28 15:18:29 +03:00
adrew
3210aab278
Test for FunctionDynamicStorageProvider
2022-01-28 15:18:29 +03:00
adrew
438be03414
Ability to provide dynamically created function storage via plugin hook
2022-01-28 15:18:29 +03:00
orklah
47a254547a
Merge pull request #7503 from AndrolGenhald/bugfix/fix-const-analyzer-failing-assert
...
Fix failing case for const analyzer.
2022-01-28 07:13:19 +01:00
AndrolGenhald
282518ce5f
Fix failing case in ClassConstAnalyzer and add test.
2022-01-27 21:50:36 -06:00
AndrolGenhald
35353c6931
Re-add failing assert, enable assertions on CI.
2022-01-27 21:29:43 -06:00
Matthew Brown
1a6f968e15
Remove dodgy assertion cc @AndrolGenhald
...
This assertion broke tests when assertions were turned on
2022-01-27 20:58:35 -05:00
orklah
9168cef2d4
Merge remote-tracking branch 'upstream/4.x' into upstream-master6
2022-01-26 21:06:25 +01:00
Matthew Brown
ac29afcfe4
Don’t expect config exception in test
2022-01-26 14:30:01 -05:00
Matthew Brown
0825c0c07b
Remove unnecessary check
2022-01-26 14:29:17 -05:00
orklah
5cd52551cc
Merge pull request #7494 from zoonru/deprecate_template_extended_count
...
Deprecate template_extended_count
2022-01-26 20:28:49 +01:00
d2d151c0d8
Update baseline
2022-01-26 20:24:15 +01:00
b30121ba1c
Deprecate template_extended_count
2022-01-26 20:21:00 +01:00
orklah
f3f3fde869
Merge pull request #7339 from AndrolGenhald/feature/references
...
Add support for references and improve UnusedVariable checks (fixes #7254 ).
2022-01-26 20:09:01 +01:00
AndrolGenhald
e268a05307
Minor fixes after rebasing.
2022-01-26 12:57:19 -06:00
AndrolGenhald
740a10141d
Fix crash when a reference is reassigned in a loop.
2022-01-26 12:56:17 -06:00
AndrolGenhald
139c3af9d1
Add reference changes to UPGRADING documentation.
2022-01-26 12:56:15 -06:00
AndrolGenhald
57b99be519
Improve reference support for assertions, array offsets, and properties.
2022-01-26 12:55:47 -06:00
AndrolGenhald
7694eb8d08
Work around phpcs impossible syntax issue.
...
phpcs want `as` to have a single space before it, but it also wants the line indented.
Worked around by assigning to another variable.
2022-01-26 12:55:47 -06:00
AndrolGenhald
089700d1be
Add more reference tests.
2022-01-26 12:55:47 -06:00
AndrolGenhald
bf606202f8
Remove impossible TODO.
2022-01-26 12:55:47 -06:00
AndrolGenhald
3c7d176f87
Minor CS fix, phrasing improvement, fix test.
2022-01-26 12:55:47 -06:00
AndrolGenhald
f9450656e1
Add support for references and improve UnusedVariable checks ( fixes #7254 ).
2022-01-26 12:55:47 -06:00
orklah
e7743007d5
typo
2022-01-26 19:45:34 +01:00
orklah
66343dee7b
Merge pull request #7154 from AndrolGenhald/feature/class-const-improvements
...
Improve class constant static analysis
2022-01-26 19:44:26 +01:00
orklah
efe9c2bc6d
document some BC breaks introduced in #7409
2022-01-26 19:37:10 +01:00
Bruce Weirdan
bf22dcf7ed
Merge pull request #7491 from weirdan/lock-event-classes
2022-01-26 13:34:22 +02:00
Bruce Weirdan
1a15db89cc
Update UPGRADING.md
2022-01-26 13:25:27 +02:00
orklah
e5a7e0008a
Merge pull request #7490 from AndrolGenhald/bugfix/dont-crash-on-unresolvable-constant
...
Fix crash due to unresolvable constant.
2022-01-26 07:20:15 +01:00
Bruce Weirdan
7503f23b4c
Lock event classes
...
This makes all event (`Psalm\Plugin\EventHandler\Event\*`) classes
`final`, allowing us to add methods to them without breaking BC.
Additionally all constructors of those classes are made `@internal` as
plugins are not supposed to emit events.
2022-01-26 02:24:32 +02:00
AndrolGenhald
a208623fa7
Fix trailing commas for PHP < 8.0.
2022-01-25 17:09:51 -06:00
AndrolGenhald
ba8234dd2c
Fix crash due to unresolvable constant.
2022-01-25 17:03:13 -06:00
AndrolGenhald
b68c6116d8
Use PHP 8.1 when testing AmbiguousConstantInheritance.
2022-01-25 15:49:09 -06:00
AndrolGenhald
0b81f46bb1
Fixes after rebasing.
2022-01-25 15:31:09 -06:00
AndrolGenhald
0edf260d8b
Improve class constant static analysis.
...
Add class const covariance support (fixes #5589 ).
Add check for overriding const from interface in PHP < 8.1 (fixes #7108 ).
Add check for ambiguous const inheritance.
2022-01-25 15:20:17 -06:00
orklah
1cc9d1c887
Merge pull request #7487 from orklah/error
...
fix error with 0 being considered positive
2022-01-25 22:06:42 +01:00
orklah
204d09b271
fix error with 0 being considered positive
2022-01-25 21:54:55 +01:00
orklah
e7ac047f0d
Merge pull request #7486 from villfa/fix/phar-getmetadata
...
Add missing parameter to Phar::getMetadata()
2022-01-25 21:49:30 +01:00