1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-03 10:07:52 +01:00
Commit Graph

169 Commits

Author SHA1 Message Date
Oliver Hader
2943cfe11d
Add list of statements to BeforeFileAnalysisEvent
Fixes: #10725
2024-02-20 00:00:27 +01:00
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
d3a6da7418 Fix coding style issue 2023-06-01 16:38:29 +02:00
Alies Lapatsin
f114858be9 Update array shape 2023-06-01 14:37:05 +02:00
Alies Lapatsin
83063272e5 Add package versions to Shepherd payload 2023-06-01 14:32:25 +02:00
Alies Lapatsin
7b7d823b07 Use better var name 2023-06-01 10:51:10 +02:00
Alies Lapatsin
5e7e067798 Merge branch 'master' into shepherd-use-list-of-issues
# Conflicts:
#	src/Psalm/Plugin/Shepherd.php
2023-05-31 23:11:56 +02:00
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
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
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