kkmuffme
0252bbbd7c
Fixed https://psalm.dev/r/7f112fd745 - MethodComparator only reported an error for this if the parent class was user defined (= not in stubs), which is wrong, since this will cause a fatal error when running the code
2023-11-18 08:55:20 +01:00
cddf6a9a57
Rector fixes
2023-10-21 20:44:04 +02:00
Alies Lapatsin
2fa943a8a6
Shepherd: send a list of issues (instead of array with int keys)
...
as result Shepherd will send an array is issues instead of object with "random" numeric keys
2023-05-31 12:24:49 +02:00
tuqqu
38b40a9fe2
Introduce BeforeExpressionAnalysisEvent
2023-04-30 03:50:30 +02:00
Alies Lapatsin
f197d137d6
Internal: use more specific types
2023-01-06 00:27:01 +04:00
Jack Worman
b2ccf2487e
Add Codebase to remaining events
2022-12-20 17:18:50 -06:00
Jack Worman
69658e8315
SlevomatCodingStandard.Commenting.DocCommentSpacing
2022-12-14 13:34:41 -06:00
Jack Worman
36fa162d6d
Use php-cs-fixer to clean up docblocks
2022-12-13 20:46:43 -06:00
Jack Worman
dd0d8300b1
Use rector to add property typehints
2022-12-11 17:25:23 -06:00
0155ad7472
Immutable readonly 3
2022-10-03 15:13:47 +02:00
Bruce Weirdan
997592de64
Merge pull request #7530 from ohader/issue-7528
2022-01-31 10:36:47 +02:00
Bruce Weirdan
b51cb75f76
Merge pull request #7535 from ohader/issue-7534
2022-01-31 10:34:57 +02:00
Oliver Hader
c4c7138329
Update src/Psalm/Plugin/EventHandler/Event/BeforeStatementAnalysisEvent.php
...
Co-authored-by: Bruce Weirdan <weirdan@gmail.com>
2022-01-31 07:53:44 +01:00
Oliver Hader
ffafccc2ca
Update src/Psalm/Plugin/EventHandler/BeforeAddIssueInterface.php
...
Co-authored-by: Bruce Weirdan <weirdan@gmail.com>
2022-01-31 07:52:33 +01:00
Oliver Hader
995ecd0964
Update src/Psalm/Plugin/EventHandler/Event/BeforeAddIssueEvent.php
...
Co-authored-by: Bruce Weirdan <weirdan@gmail.com>
2022-01-31 07:52:24 +01:00
Oliver Hader
6fd31cb5fa
[TASK] Remove deprecated AfterFunctionLikeAnalysisEvent::getClasslikeStorage
2022-01-31 00:34:03 +02:00
Bruce Weirdan
a2977a5ca9
Merge branch '4.x' into upstream-master
2022-01-31 00:16:27 +02:00
Oliver Hader
ff07a8d662
[TASK] Use final event class declarations
2022-01-30 19:29:12 +01:00
Oliver Hader
f5986950a2
[FEATURE] Introduce BeforeStatementAnalysisEvent
...
As counterpart to existing `AfterStatementAnalysisEvent` - invoked in
`\Psalm\Internal\Analyzer\StatementsAnalyzer` - this changed introcued
a corresponding `BeforeStatementAnalysisEvent`.
Resolves : #7534
2022-01-30 19:27:19 +01:00
Oliver Hader
e3602bbfe1
[FEATURE] Allow to intercept adding issue in IssueBuffer
...
This change introduces new `BeforeAddIssueEvent` which is invoked
from `IssueBuffer::add`, which allows to collect and intercept code
issue in a generic way.
Resolves : #7528
2022-01-30 17:46:08 +01:00
Oliver Hader
1e072cb904
[TASK] Add AfterFunctionLikeAnalysisEvent::getFunctionlikeStorage
...
AfterFunctionLikeAnalysisEvent's method `getClasslikeStorage` actually
returned the current `FunctionLikeStorage`. This change streamlines the
naming and adds corresponding `getFunctionlikeStorage` method.
Method `getClasslikeStorage` is deprecated in will be removed
in Psalm v5.0.
2022-01-30 16:55:39 +01:00
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
46f695993b
Make FunctionDynamicStorageProviderEvent final
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
ce1cec5d3a
Using FuncCall instead of list<Arg> in FunctionDynamicStorageProvider for more flexibility
2022-01-28 15:18:30 +03:00
adrew
438be03414
Ability to provide dynamically created function storage via plugin hook
2022-01-28 15:18:29 +03: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
rarila
97e6511fab
Set number of lines before and after namespace.
2021-12-15 04:58:32 +01:00
rarila
1c298c4605
Conversion of Psalm\Type
2021-12-14 02:31:22 +01:00
ralila
e32af3c05a
Conversion of Psalm\Type\Atomic
2021-12-14 02:26:28 +01:00
rarila
39402c233d
Return type hints ( #7065 )
...
Co-authored-by: ralila <>
2021-12-05 19:51:26 +02:00
ralila
f833085a15
Fix fqn usage in php-doc
2021-12-04 03:37:19 +01:00
ralila
7279f00e05
fix failing test
2021-11-26 21:55:30 +01:00
ralila
fdaed941ad
use return type hints instead of php doc "@return void"
2021-11-26 20:59:41 +01:00
orklah
870ee4ff93
->args to ->getArgs
2021-10-09 23:37:04 +02:00
Vincent Langlet
3339ce1379
Use stmt instead of args
2021-07-11 11:22:13 +02:00
Vincent Langlet
49ed7b045f
Pass statement to MethodReturnTypeProviderEvent
2021-07-08 00:02:36 +02:00
Bruce Weirdan
6abce3525a
Enforce use
sort ( #5900 )
2021-06-07 22:55:21 -04:00
Matt Brown
15b0542260
Prevent more offset issues
2021-03-22 23:26:03 -04:00
Samuel Mortenson
4aabb411a8
Added event to prevent tainting. ( #5398 )
...
* Added event to prevent tainting.
* Remove optional codebase parameter.
* Removed falsy check for codebase.
* Use two separate hooks for adding and removing taints
* Add slashes
* Update add/remove taint test name.
* Cleaned up SafeArrayKeyChecker example plugin.
* Added more AddRemoveTaintsEvent calls to codebase.
* Fix type check error with $added_taints param.
* Added AddRemoveTaintsEvent to remaining classes.
* Fix post-merge error.
* Add comma
* Remove $int_offset that never existed
Co-authored-by: Matt Brown <github@muglug.com>
2021-03-19 22:41:41 -04:00
orklah
81e557e3a8
adds statements list in the event ( #4835 )
2021-01-07 09:04:50 -05:00
orklah
1bbcbddfcf
pass args through event ( #4864 )
2021-01-07 09:02:05 -05:00
orklah
f9fccb2b2d
implement DTO for plugins ( #4881 )
...
* implement DTO for plugins
* introduce EventHandler + reintroduce legacy API for plugins
2021-01-06 09:05:53 -05:00