Alies Lapatsin
174cd5c0fe
Introduce and use IssueData constants for severity
...
they are not the same as Config::REPORT_* constants
2023-05-31 12:38:15 +02:00
tuqqu
38b40a9fe2
Introduce BeforeExpressionAnalysisEvent
2023-04-30 03:50:30 +02:00
Alies Lapatsin
df00fd17fc
Fix coding style issues
2023-02-21 12:49:19 +01:00
Alies Lapatsin
609c426133
Add DeprecatedMethod suppression
2023-02-21 12:40:23 +01:00
Alies Lapatsin
46c486b271
Fix output formatting
2023-02-21 12:16:11 +01:00
Alies Lapatsin
124569c8ef
Display debug info for all error responses
2023-02-21 12:13:52 +01:00
Alies Lapatsin
cabeb5b983
Bypass output overlap
...
like:
Shepherd error: https://custom-host.shepherd/hooks/psalm endpoint responded with 0 HTTP status code.
array (
Shepherd response: n/a
'url' => 'https://custom-host.shepherd/hooks/psalm ',
Please check shepherd endpoint — it should be a valid URL. cURL Debug info:
'content_type' => NULL,
'http_code' => 0,
'header_size' => 0,
'request_size' => 0,
'filetime' => -1,
'ssl_verify_result' => 0,
'redirect_count' => 0,
'total_time' => 0.025202,
'namelookup_time' => 0.0,
'connect_time' => 0.0,
'pretransfer_time' => 0.0,
'size_upload' => 0.0,
'size_download' => 0.0,
'speed_download' => 0.0,
'speed_upload' => 0.0,
'download_content_length' => -1.0,
'upload_content_length' => -1.0,
'starttransfer_time' => 0.0,
'redirect_time' => 0.0,
'redirect_url' => '',
'primary_ip' => '',
'certinfo' =>
array (
),
'primary_port' => 0,
'local_ip' => '',
'local_port' => 0,
'http_version' => 0,
'protocol' => 0,
'ssl_verifyresult' => 0,
'scheme' => '',
'appconnect_time_us' => 0,
'connect_time_us' => 0,
'namelookup_time_us' => 0,
'pretransfer_time_us' => 0,
'redirect_time_us' => 0,
'starttransfer_time_us' => 0,
'total_time_us' => 25202,
'effective_method' => 'POST',
)
2023-02-21 12:04:18 +01:00
Alies Lapatsin
6603d84dfb
Display debuging info for a 0 cURL HTTP status response
2023-02-21 11:56:57 +01:00
Alies Lapatsin
66ce363431
Prepend URL scheme for th legacy host
2023-02-21 11:13:20 +01:00
Alies Lapatsin
b78472c752
Display $endpoint on error message (simplify debugging)
2023-02-21 10:59:31 +01:00
Alies Lapatsin
f1e04f2dc3
Reorganize Shepherd logic to improve redability and support custom endpoint
2023-02-14 20:01:37 +01:00
Alies Lapatsin
a5a2daa993
Use early return
2023-02-02 22:15:26 +01:00
Alies Lapatsin
68842a50c5
Use STDERR for Shepherd output, fixes #9168
2023-01-23 21:14:18 +01:00
Alies Lapatsin
e6ea61c91b
Enhance error output for shephed
2023-01-18 19:59:09 +01:00
Alies Lapatsin
aac6ead2d9
Fix coding style issues
2023-01-18 19:06:51 +01:00
Alies Lapatsin
363a0b6b22
Add suppressions for using a deprecated property
2023-01-18 19:06:51 +01:00
Alies Lapatsin
d5e5dc0683
Fully support Psalm 5 behaviour
...
asked by orklah, see
https://github.com/vimeo/psalm/pull/9112#issuecomment-1383239821
2023-01-18 19:06:51 +01:00
Alies Lapatsin
291484df44
Return getCurlErrorMessage() method as it can be used outside
2023-01-18 19:06:51 +01:00
Alies Lapatsin
587ac6e018
Fix coding style issues
2023-01-18 19:06:51 +01:00
Alies Lapatsin
c95b0718c4
Properly process HTTP response codes from shepherd servers
2023-01-18 19:06:51 +01:00
Alies Lapatsin
09517d3176
Follow redirects when submitting shepherd reports
2023-01-18 19:06:51 +01:00
Alies Lapatsin
7e157cfe9d
Allow to specify a custom shepherd endpoint (instead of domain)
2023-01-18 19:06:32 +01: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
1c19260cdd
Require trailing commas
2022-12-18 13:20:31 -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
3e837cabd0
Finalize (and internalize) more classes
2022-02-05 23:51:03 +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
Oliver Hader
3fedb5cce6
Apply code styles
2022-01-30 13:06:02 +01:00
Oliver Hader
62a0ece035
!!! Allow plugins to modify Config::$fileExtensions early
...
ProjectAnalyzer consumed Config::$fileExtensions early in its
constructor - without having processed plugins' modifications,
registering their custom scanners or analyzer implementations.
This change
* adds new specific interface \Psalm\Plugin\FileExtensionsInterface
to be used by plugin implementations
* extracts file extension handling from \Psalm\PluginRegistrationSocket
and interface \Psalm\Plugin\RegistrationInterface to a new dedicated
\Psalm\PluginFileExtensionsSocket and new interface
\Psalm\Plugin\FileExtensionsInterface
!!! this is a breaking change in PluginRegistrationSocket !!!
* adds runtime in-memory cache for Config::$plugins
* calls new method Config::processPluginFileExtensions(), providing
modifications to file extension only early in ProjectAnalyzer
* adjusts documentation
2022-01-30 13:06:00 +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
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
ce1cec5d3a
Using FuncCall instead of list<Arg> in FunctionDynamicStorageProvider for more flexibility
2022-01-28 15:18:30 +03:00