1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-09 14:38:37 +01:00
Commit Graph

9558 Commits

Author SHA1 Message Date
orklah
e2dde5d200
Merge pull request #9922 from robchett/elseif_shouldnt_be_modifying_outer_scope
Don't update types of the outer scope when in an elseif conditional
2023-06-18 11:00:16 +02:00
orklah
b5159517ce
Merge pull request #9920 from robchett/CoreGenericAttributes
Add a stub file for Attributes defined by PHP
2023-06-17 22:11:26 +02:00
robchett
4600d2b224 Fix line lenght 2023-06-17 14:13:04 +01:00
robchett
7792b6c36c Don't update types of the outer scope when in an elseif conditional 2023-06-17 13:36:29 +01:00
robchett
5fc48bbb62 Add a stub file for Attributes defined by PHP 2023-06-17 12:26:56 +01:00
robchett
721b65ce2f Add Type::getIntRange 2023-06-17 12:24:09 +01:00
robchett
338b50a959 Change __LINE__ to a positive-int 2023-06-17 12:24:09 +01:00
orklah
eb64a471c4
Merge pull request #9903 from ygottschalk/fix/9827-union-empty-array-and-false
Fixes #9827
2023-06-15 21:19:44 +02:00
kkmuffme
16aaa3ae2b regex cleanup 2023-06-13 22:07:51 +02:00
kkmuffme
d4732f118e fix minor trim bug in original code and small speed up 2023-06-13 22:04:39 +02:00
kkmuffme
e75d514ada speed up on unix 2023-06-13 21:55:43 +02:00
kkmuffme
9a4d7aa719 additional gains 2023-06-13 21:52:03 +02:00
kkmuffme
3f3890382b replace all at once 2023-06-13 21:19:52 +02:00
kkmuffme
5ac3ed08df additional ones 2023-06-13 20:37:33 +02:00
kkmuffme
394a40b0f7 remove preg, minor performance gain (up to 1%) 2023-06-13 20:29:20 +02:00
kkmuffme
51fd63cfbb fix CI warnings 2023-06-13 16:59:25 +02:00
kkmuffme
96988ea5ec code style 2023-06-12 19:44:22 +02:00
kkmuffme
d0f14ba19e ignore complex placeholders for now
Fix https://github.com/vimeo/psalm/issues/9900
Fix https://github.com/vimeo/psalm/issues/9901
Fix original core stubs sprintf returning a wrong type too (unrelated to return type provider) for placeholders that are always empty
2023-06-12 19:44:22 +02:00
kkmuffme
9bc4752e29 add checks for complex empty format and make return type more specific 2023-06-12 19:44:22 +02:00
kkmuffme
9232e4e76b code style 2023-06-12 19:44:22 +02:00
kkmuffme
697d06b24d fix empty format return type, add errors for empty format or format without placeholders 2023-06-12 19:44:22 +02:00
kkmuffme
f2168de96e fix printf bug 2023-06-12 19:44:22 +02:00
orklah
715a91d15c
Merge pull request #9889 from dkarlovi/feat/cache.gz
feat: cache.gz
2023-06-12 18:50:01 +02:00
Yannick Gottschalk
40ce0cf7d7 Fixes #9827 2023-06-12 15:25:17 +02:00
orklah
b6cba5a377
Merge pull request #9877 from kkmuffme/sprintf-improve-return-param-type-validation
Sprintf improve return param type validation
2023-06-11 13:08:24 +02:00
Dalibor Karlović
8d1197427e
fix: import igbinary_* functions 2023-06-09 17:12:35 +02:00
Dalibor Karlović
ddacfeaa3e
SA: add expected types 2023-06-09 16:33:23 +02:00
Dalibor Karlović
5e49ebb8e6
SA: remove obsolete suppresses 2023-06-09 16:28:43 +02:00
Dalibor Karlović
dd0402b6d7
SA: only possible return type is a string 2023-06-09 16:07:41 +02:00
Dalibor Karlović
59f45480c4
feat: Gzip support in PHP parser cache 2023-06-09 16:03:25 +02:00
Dalibor Karlović
495a466c5e
init cache in child classes 2023-06-09 15:57:29 +02:00
Dalibor Karlović
d4f384e13f
cs 2023-06-09 15:48:56 +02:00
Dalibor Karlović
5ffaa117c8
cs 2023-06-09 14:59:49 +02:00
Dalibor Karlović
dc3e0455de
feat: Gzip support in PHP parser cache 2023-06-09 14:58:27 +02:00
Dalibor Karlović
3e95ecd713
feat: Gzip support in ClassStorage cache 2023-06-09 14:44:29 +02:00
Dalibor Karlović
dd5c3ac241
feat: Gzip support 2023-06-09 14:32:56 +02:00
Dalibor Karlović
bd8313a46c
fix: PHP 7 compat 2023-06-09 13:48:09 +02:00
Dalibor Karlović
0db819510d
feat: centralized Cache management 2023-06-09 13:46:00 +02:00
kkmuffme
98d15637ce remove declaration 2023-06-09 12:59:13 +02:00
kkmuffme
1c10673e14 move variable context 2023-06-09 12:59:13 +02:00
kkmuffme
277f9c34f5 fix printf false positive return type when first arg is null, simplify return value handling 2023-06-09 12:59:13 +02:00
kkmuffme
145f1fb242 phpcs code style 2023-06-09 12:59:13 +02:00
kkmuffme
9c1e34b89f fix infinite loop bug in PHP 7 2023-06-09 12:59:13 +02:00
kkmuffme
a0b87ad935 suppress PHP 7 issues and remove unspecific return type 2023-06-09 12:59:13 +02:00
kkmuffme
3179498643 check args for sprintf + printf
* check args for (s)printf for Invalid/TooMany/TooFew
* don't change the return type when we cannot infer it more specifically (nullable return)
* fix https://github.com/vimeo/psalm/issues/9874
* implement https://github.com/vimeo/psalm/issues/9817
* add tests
2023-06-09 12:59:13 +02:00
kkmuffme
0a54c84055 readonly does not have write access, therefore is safe as long as the type is contained in the parent type
Fix https://github.com/vimeo/psalm/issues/9831#issuecomment-1569022701
2023-06-09 12:37:41 +02:00
andrew
4f5dfa7350 Better intersection of template types during inheritance check 2023-06-07 17:58:25 +03:00
kkmuffme
bc121b3f25 more unrelated phpcs code style 2023-06-07 09:09:01 +02:00
kkmuffme
7dcd8e13dd fix phpcs code style issues in unrelated code which is reported now that phpcs is fixed 2023-06-07 09:01:47 +02:00
orklah
9d1c2c4596
Merge pull request #9866 from klimick/fix-generic-type-params-mapping
Fix generic type params mapping
2023-06-04 23:05:04 +02:00
orklah
43df1dc9ba
Merge pull request #9865 from klimick/intersection-with-template
Intersect template types during inheritance check
2023-06-04 23:01:28 +02:00
orklah
c15860508b
Merge pull request #9853 from kkmuffme/multiple-psalm-assert-if-for-array-list
Allow if/false assert for same variable to allow array/list distinction
2023-06-04 22:59:37 +02:00
andrew
02addbe79c Fix generic type params mapping 2023-06-02 17:36:13 +03:00
andrew
38bd4d8c0d Intersect template 2023-06-02 14:48:20 +03:00
kkmuffme
fa644cbb34 code review init variables 2023-06-02 08:54:00 +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
orklah
e55530d627
Merge pull request #9845 from lptn/shepherd-use-list-of-issues
Shepherd: send a list of issues (instead of array with int keys)
2023-06-01 13:36:05 +02:00
Alies Lapatsin
7b7d823b07 Use better var name 2023-06-01 10:51:10 +02:00
orklah
75baaf7889
Merge pull request #9844 from kkmuffme/property-no-set-in-constructor-abstract-false-positive
PropertyNotSetInConstructor should not report for abstract constructors
2023-06-01 07:21:23 +02:00
kkmuffme
103e7b343c PropertyNotSetInConstructor should not report for abstract constructors
since they do not have any code

Fix https://github.com/vimeo/psalm/issues/9830
2023-06-01 01:38:33 +02:00
kkmuffme
322878b1d7 code style 2023-06-01 01:33:12 +02:00
kkmuffme
c17564d27c code style and false positive shepherd 2023-06-01 01:25:46 +02:00
kkmuffme
1f2db5f31c Allow if/false assert for same variable to allow array/list distinction
Fix https://github.com/vimeo/psalm/issues/9037
2023-06-01 01:08:06 +02:00
orklah
a762b6c3bb
Merge pull request #9841 from kkmuffme/sprintf-basic-return-type-provider
sprintf basic non-empty-string return type provider
2023-05-31 23:36:03 +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
orklah
5b2efad55b
Merge pull request #9846 from lptn/use-consts-for-issue-severity
Introduce and use `IssueData` constants for severity levels
2023-05-31 23:04:13 +02:00
Alies Lapatsin
bf1a7365d2 Use PHPStorm output format by default on JetBrains terminals 2023-05-31 13:30:52 +02:00
Alies Lapatsin
3700ab6c61 Fix RedundantConditionGivenDocblockType issues 2023-05-31 13:11:54 +02:00
Alies Lapatsin
67648ac248 Use new IssueBuffer constants 2023-05-31 13:00:16 +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
kkmuffme
8606d5585f sprintf basic non-empty-string return type provider
Fix https://github.com/vimeo/psalm/issues/9819
This PR is a starting point for improving the sprintf return type and eventually validate the format, param types and param count.
(see https://github.com/vimeo/psalm/issues/9817, https://github.com/vimeo/psalm/issues/9818)
2023-05-30 22:11:17 +02:00
kkmuffme
9d7d4bff28 non-empty-string always returs non-empty-string, fix tests 2023-05-30 16:44:23 +02:00
kkmuffme
25c7f37a44 add test, fix wrong test and fix shepherd 2023-05-30 16:29:47 +02:00
kkmuffme
f9f1cc244b dirname returns non-empty-string when a non-empty-string is passed and level is 1 2023-05-30 16:09:50 +02:00
orklah
2bbfca6d9f
Merge pull request #9829 from klimick/map-closed-inheritance-to-union
Mapping closed inheritance to union during assertion
2023-05-29 20:14:31 +02:00
Yannick Gottschalk
a41eb35b24 Fix #9824 2023-05-28 17:37:16 +02:00
klimick
56d7b3793e Map closed inheritance to union 2023-05-27 13:39:56 +03:00
Jack Worman
f279c39503 GH-9825 2023-05-26 18:03:05 -04:00
Demmie
72b4ab9310 Use preg_split instead of explode
This also accounts for Windows dir separators
and duplicated wildcards.
2023-05-24 15:28:41 -04:00
Demmie
116795abc4 Fix reported type issues 2023-05-24 14:06:53 -04:00
Demmie
317c683644 Return file_exists to glob files 2023-05-24 01:27:48 -04:00
Demmie
cab10721e6 Add a support for multilevel glob wildcards
This works just like in Python with "**".
2023-05-24 01:13:26 -04:00
orklah
f90118cdea
Merge pull request #9805 from orklah/memory-psalter
allow using more than 8G of memory in psalter
2023-05-22 23:19:03 +02:00
orklah
f65d53f32e fix CS 2023-05-22 23:16:17 +02:00
orklah
d23616cafa allow using more than 8G of memory in psalter 2023-05-22 23:06:02 +02:00
orklah
ed94de5146 fix offset for type param changes 2023-05-21 18:56:54 +02:00
RobChett
100907b61f Improve return types of pow() 2023-05-15 01:22:45 +01:00
Jack Worman
f41da745d1 UnsupportedPropertyReferenceUsage 2023-05-12 14:12:12 -05:00
acdbffbb34
cs-fix 2023-05-11 19:23:33 +02:00
ffd363d7b8
Enable opcache if it is installed 2023-05-11 16:51:37 +02:00
Valentin Vion
3d122a745f Removed return type false from date and gmdate 2023-05-09 12:02:44 +08:00
orklah
d4c5f85eb0
Merge pull request #9687 from robchett/limit_inheritance
WIP - Limit inheritance to a subset of classes #1450
2023-05-07 22:46:05 +02:00
RobChett
aa85669645 Change the Issue type and add documentation 2023-05-07 11:34:33 +01:00
RobChett
cad5288484 Support interfaces 2023-05-07 11:33:39 +01:00
RobChett
de877f1dcf Add support for @psalm-inheritors 2023-05-07 11:33:38 +01:00
kkmuffme
ad7be63c0b fix tests/internal code
@var comments needed due to https://github.com/vimeo/psalm/issues/9754 and https://github.com/vimeo/psalm/issues/9753
2023-05-06 19:18:27 +02:00
orklah
0ea2a6a567
Merge pull request #9742 from fluffycondor/allow-phpdoc-dynamic-properties
Allow dynamic properties from PHPDoc
2023-05-06 15:56:16 +02:00
andrew
cfd0f062f7 Fix union argument types check against templated param 2023-05-06 16:01:16 +03:00
orklah
8d15fa1d79
Merge pull request #9735 from tscni/fix/missing-global-override-file-storage
Fix missing global class type when scanning cached files
2023-05-05 22:08:21 +02:00
fluffycondor
86fd504965 Allow dynamic properties from PHPDoc 2023-05-04 18:49:41 +02:00
orklah
7483f4d809
Merge pull request #9740 from edsrzf/better-property-error
Fix OverriddenPropertyAccess error message
2023-05-04 18:49:00 +02:00
orklah
f8895edf4d
Merge pull request #9738 from klimick/fix-invalid-cast-for-templated-class-string
Fix invalid cast for templated class-string
2023-05-04 18:43:41 +02:00
orklah
32bd8f66e6
Merge pull request #9739 from klimick/match-paradoxical-condition-with-complex-expr
Fix ParadoxicalCondition with complex match expression
2023-05-04 18:39:17 +02:00
andrew
a18eb447e0 Test match on class const fetch 2023-05-04 17:21:50 +03:00
andrew
948ece9dea Fix string negation to never 2023-05-04 15:34:18 +03:00
Tinjo Schöni
8c9b0eebf4
Scan configured global types 2023-05-04 12:05:32 +02:00
Evan Shaw
d2f0f6ce30 Fix OverriddenPropertyAccess error message
The message previously didn't mention the base class, which made it
confusing.
2023-05-04 21:51:16 +12:00
klimick
ac8d489413 Fix ParadoxicalCondition with complex match expression 2023-05-04 11:58:39 +03:00
andrew
57b3876796 Fix invalid cast for templated class-string 2023-05-04 11:25:52 +03:00
orklah
a5effd2d2d
Merge pull request #9681 from robchett/no-seal-methods_and_no-seal-propeties
Add support for @psalm-no-seal-properties and @psalm-no-seal-methods
2023-05-02 19:20:34 +02:00
tuqqu
46f5bc8bd7 Introduce BeforeExpressionAnalysisEvent, fix array comparison 2023-04-30 12:12:00 +02:00
tuqqu
38b40a9fe2 Introduce BeforeExpressionAnalysisEvent 2023-04-30 03:50:30 +02:00
orklah
4843a350a0
Merge pull request #9720 from Jean85/fix-ambiguous-constant-inheritance
Fix ambiguous constant inheritance false positive
2023-04-28 23:22:31 +02:00
Alessandro Lai
e8bc9a6209
Do not emit AmbiguousConstantInheritance when inheriting from the same statement 2023-04-28 22:52:22 +02:00
klimick
0ae1b31efc Fix UnevaluatedCode false positive at declare(strict_types=1) 2023-04-27 23:11:14 +03:00
orklah
c059388274
Merge pull request #9709 from Nicelocal/clone_leftovers
Remove clone leftovers from immutable refactoring
2023-04-25 20:47:59 +02:00
481a5bd61d Fix date return type provider 2023-04-25 11:41:39 +02:00
8eacb0f003 Remove clone leftovers from immutable refactoring 2023-04-25 11:09:54 +02:00
orklah
720f3f1dc2
Merge pull request #9704 from Nicelocal/fix_new_template_object
Allow running new on template objects
2023-04-24 16:29:34 +02:00
8288b00ef9 Allow running new on template objects 2023-04-24 13:08:12 +02:00
orklah
2b68046115
Merge pull request #9694 from Nicelocal/unsealed_array_generic_syntax
Implement unsealed array generic syntax
2023-04-24 12:50:57 +02:00
orklah
eae04f25f6
Merge pull request #9693 from Nicelocal/fix_9692
Fix #9692
2023-04-24 12:48:20 +02:00
orklah
41796e324a
Merge pull request #9700 from klimick/method-contextual-closure-arg-inference
Contextual closure arg inference for class methods
2023-04-24 12:47:38 +02:00
Evan Shaw
82090f58c5 Handle included directory paths without crashing
If an include or require resolves to a directory, this now raises a
MissingFile error rather than throwing an unhandled UnexpectedValueException.
2023-04-24 11:09:48 +12:00
klimick
88c444a8cc Contextual closure arg inference for class methods 2023-04-23 23:40:44 +03:00
8078b6dcbf Fixes 2023-04-21 15:58:05 +02:00
05e92054e0 Cleanup 2023-04-21 15:53:47 +02:00
8d246d6af4 Remove leftovers 2023-04-21 15:52:21 +02:00
b77ed37d45 Rewrite 2023-04-21 15:49:37 +02:00
86436507ea Immediately check for closing } 2023-04-21 14:19:42 +02:00
d8b85f1c04 Implement unsealed array generic syntax 2023-04-21 14:05:05 +02:00
abead05303 Fix syntax 2023-04-21 12:38:02 +02:00
b8672949ec Fix #9692 2023-04-21 12:33:08 +02:00
orklah
a97b6b8a5e
Merge pull request #9685 from Nicelocal/avoid_wrong_assertions
Avoid wrong assertions when working with objects returned by methods
2023-04-21 11:34:15 +02:00
orklah
40d4e560bc
Merge pull request #9691 from robchett/date_gmdate_return_type
Add return type provider for date/gmdate
2023-04-21 11:33:02 +02:00
orklah
1dcc4c4fe0
Merge pull request #9686 from Nicelocal/fix_is_object
Fix is_object assertions on final classes
2023-04-21 11:32:25 +02:00
RobChett
1a1d9c9bf5 Add return type provider for date/gmdate 2023-04-21 08:12:49 +01:00
orklah
b781bd922e
Merge pull request #9679 from robchett/mixedAssignment_from_template_var
Don't throw UnnecesseryVarAnnotation when hinting a mixed template var
2023-04-20 23:52:52 +02:00
orklah
0dcaf1c706
Merge pull request #9678 from robchett/mb_strtolower_maintain_non_empty
Return a non-empty-(lowercase-)string from mb_strtolower
2023-04-20 23:44:21 +02:00
RobChett
74c1576b9c Return a non-empty-(lowercase-)string from mb_strtolower 2023-04-20 15:54:13 +01:00
RobChett
9083e0a7a3 Check for the existence of the 'mixed' key to detect untyped parameters 2023-04-20 15:45:17 +01:00
9da49f18bc Fix 2023-04-20 15:03:36 +02:00
88f6be1213 Fix 2023-04-20 14:17:40 +02:00
baff6fb36a fix is_object assertions 2023-04-20 14:03:35 +02:00
efb5aed879 Avoid wrong assertions when working with objects returned by methods 2023-04-20 13:00:28 +02:00
RobChett
4d9d7cebd9 Add support for @psalm-no-seal-properties and @psalm-no-seal-methods 2023-04-20 07:47:50 +01:00
RobChett
0a40286830 Don't throw UnnecesseryVarAnnotation when hinting a mixed template var 2023-04-19 21:23:40 +01:00
orklah
5efddb4201
Merge pull request #9675 from robchett/master
Valid array access on a non-empty-string yields a non-empty-string
2023-04-19 21:12:29 +02:00
RobChett
836953eb7d Switch TSingleLetter to extend TNonEmptyString instead of TString as it is more precise 2023-04-19 19:27:25 +01:00
orklah
76ebf54262
Merge pull request #9676 from Nicelocal/fix_callable_union_comparison
Fix comparison of unions of multiple callables
2023-04-19 13:02:01 +02:00
orklah
51d14a28b7
Merge pull request #9670 from danog/improve_opcache
Avoid verbose opcache logging
2023-04-19 12:00:03 +02:00
558239ecb0 cs-fix 2023-04-19 11:39:44 +02:00
19fab7a805 Fix comparison of unions of multiple callables 2023-04-19 11:37:04 +02:00
WhizSid
782735e8b2 Fixed crash issue when using multiple literals for array_splice 2023-04-19 00:38:35 +05:30
b35c3c41b8 Avoid verbose opcache logging 2023-04-18 13:53:32 +02:00
adrew
aa3b2f2e1d Test anonymous object template replacement 2023-04-17 23:18:03 +03:00
adrew
6614767d76 Add KeyedArrayComparator::coerceToObjectWithProperties 2023-04-17 23:18:03 +03:00
adrew
ee0395247f Don't expand template for property fetch on TObjectWithProperties 2023-04-17 23:18:03 +03:00
andrew
dcd4e34ee6 Support anonymous object template replacement 2023-04-17 23:18:03 +03:00
orklah
542d627994
Merge pull request #9393 from ygottschalk/fix/9373-using-enum-property-as-const-array-key
Fix/9373 using enum property as const array key
2023-04-17 12:56:42 +02:00
andrew
b0e5df570d Fix iterable template replacement 2023-04-17 11:03:39 +03:00
orklah
a9bc87e729
Merge pull request #9656 from boesing/bugfix/issue-8981
(re-)implement object-shape assertions
2023-04-16 21:17:53 +02:00
orklah
6c7db9e0ec
Merge pull request #9655 from boesing/bugfix/issue-9145
Provide support for templated `value-of` enum values
2023-04-16 21:15:59 +02:00
orklah
24dc5d49b2
Merge pull request #9638 from boesing/bugfix/intersection-type-type-alias
Allow to intersect type alias with non-type-aliases
2023-04-16 21:14:21 +02:00
adrew
f0153721a4 Fix list template replacement 2023-04-15 18:46:22 +03:00
Maximilian Bösing
66afbb1c33
feature: (re-)implement object-shape assertions
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-15 02:36:10 +02:00
Maximilian Bösing
ad5631497d
feature: provide support for templated value-of enum values
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-15 00:38:12 +02:00
Maximilian Bösing
26e201d28f
refactor: intersect keyed arrays the same way as in early return
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-14 22:19:01 +02:00
Maximilian Bösing
07fcf5399c
qa: mark TTypeAlias#extra_types and TTypeAlias#setIntersectionTypes as deprecated
Due to the way how this patch modifies the type alias handling, intersection types of aliases are directly expanded and thus, the referencing types are being used rather than intersecting aliases.

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-14 22:16:12 +02:00
orklah
3e50f68794
Merge pull request #9623 from klimick/contextual-inference-for-const-callable
Contextual inference for const callable
2023-04-14 16:22:53 +02:00
orklah
cee88f2c4b
Merge pull request #9643 from whizsid/array_splice
Fixed non empty arg issue in array_splice function
2023-04-13 19:24:16 +02:00
WhizSid
73a0803282 Revert using ImpureMethodCall 2023-04-13 21:31:44 +05:30
WhizSid
f85c34a803 Supress the psalm error 2023-04-13 15:48:27 +05:30
WhizSid
02f8f11736 Handle empty array possibilities from array_splice 2023-04-13 14:37:09 +05:30
tuqqu
ed2285f50a Flatten match arm conditions to check conditions independently 2023-04-13 01:30:14 +02:00
WhizSid
ae67589463 Fixed CI 2023-04-13 01:14:49 +05:30
WhizSid
b19c263fe5 Fixed non empty arg issue in array_splice function 2023-04-13 00:34:29 +05:30
Maximilian Bösing
c3f91992f1
bugfix: ensure object and arrays are not intersectable
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-12 10:21:32 +02:00
Maximilian Bösing
1071257245
refactor: resolve TTypeAlias in intersections
This also merges `TKeyedArray` into a one single keyed array. Therefore, this is not limited to aliases anymore.

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-11 23:22:04 +02:00
Maximilian Bösing
094df271a4
feature: add param and return type string to TCallableObject#getKey in case the callable is known
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-11 20:29:57 +02:00
Maximilian Bösing
e72af4ed07
feature: allow aliased types within intersection strings
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-11 20:29:31 +02:00
Maximilian Bösing
93c71fe756
feature: introduce CallableTrait#getParamString and CallableTrait#getReturnTypeString
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-11 20:28:54 +02:00
orklah
2aaa577346
Merge pull request #9629 from boesing/bugfix/unused-closure-param-for-required-argument
Do not report required closure arguments as unused
2023-04-10 13:25:29 +02:00
Maximilian Bösing
3f6a7de162
bugfix: preserve non-empty-string type when combining literal-string with numeric-string types
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-10 03:15:09 +02:00
Maximilian Bösing
6d5f999c75
bugfix: do not report required closure arguments as unused
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-10 01:54:03 +02:00
orklah
763116fab3
Merge pull request #9599 from boesing/feature/callable-object-intersection
Introduce callable object intersection
2023-04-09 11:48:45 +02:00
Maximilian Bösing
b2b026439f
qa: correct character casing
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-08 21:50:29 +02:00
ADmad
a584314c62 Allow enabling mixed issues reporting for error levels > 2.
Refs #9619.
2023-04-08 06:17:00 +05:30
andrew
d9ad8b420e Ignore specific callables (callable-array, callable-string) in the HighOrderFunctionArgHandler 2023-04-07 14:16:41 +03:00
andrew
2f7a7178ca Docs for HighOrderFunctionArgHandler::remapLowerBounds 2023-04-06 18:23:50 +03:00
andrew
7fba401fdd Callable type expansion for more readable error message 2023-04-06 15:29:59 +03:00
andrew
0456ef82a5 Prevent callable arg type enhancement for simple callable 2023-04-06 10:43:50 +03:00
andrew
d190b751fb Cleanup HighOrderFunctionArgHandler 2023-04-05 18:10:21 +03:00
Maximilian Bösing
a8ed8a7b5c
revert: class-string should not allow callable only
As per discussion with Ondřej, `class-string` should explicitly target objects.

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-05 14:51:50 +02:00
adrew
a3aed2fc61 Analyse const callable like first-class-callable 2023-04-04 22:17:17 +03:00
Johannes Boost
865e183fa0 fix: fix phpcs errors 2023-04-04 17:59:50 +02:00
Maximilian Bösing
6c58d98d67
feature: treat class-string<callable> as callable-object
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-04 17:28:58 +02:00
Johannes
37976aa117 fix: treat includes starting with '.' and '..' correct 2023-04-04 17:28:45 +02:00
orklah
06e085cf3f fix coercion detection between two keyed arrays 2023-04-04 12:05:48 +02:00
Maximilian Bösing
ee68f16bb6
feature: introduce callable-object intersection type object&callable
This allows devs to annotate that they expect a callable object.
In addition to this, it can also verify return and argument types.

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-03 23:23:28 +02:00
orklah
eb7be110ec fix level of error when comparing lists of mixed 2023-04-03 11:52:55 +02:00
Maximilian Bösing
11e90e7d42
qa: enhance code for better extensibility
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-03 02:23:59 +02:00
Maximilian Bösing
6ca34fdd10
qa: adjust code for readability
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-03 02:23:59 +02:00
Maximilian Bösing
6455084198
qa: applied coding standard to existing code
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-01 14:57:20 +02:00
Maximilian Bösing
1d4f496d0d
feature: introduce value-of in assertions
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-04-01 14:57:20 +02:00
Daniel Leech
4fef4a2365 Move to basic configuration 2023-03-31 18:38:44 +01:00
Daniel Leech
8092554582 Add CLI help for the error-level option 2023-03-31 18:36:34 +01:00
orklah
8b9ad1eb9e
Merge pull request #9566 from DnwK98/handle-different-line-endings
Handle different line endings from baseline.
2023-03-29 23:38:21 +02:00
orklah
e2abc3e554
Merge pull request #9509 from ptomulik/issue-9506
Fixed #9506
2023-03-28 21:18:51 +02:00
Paweł Tomulik
ed1d095c7b
supress ComplexMethod 2023-03-28 20:59:51 +02:00
orklah
f78bf32417
Merge pull request #9570 from klimick/first-class-callable-contextual-inference
Contextual inference for first-class-callable
2023-03-28 20:40:04 +02:00
orklah
94f32e9718
Merge pull request #9323 from othercorey/fix-array-unique
Fix array_unique callmap
2023-03-28 20:27:18 +02:00
Corey Taylor
730bc221e9 Re-add array_unique() stub which preserved array type 2023-03-28 04:09:50 -05:00
orklah
6ca2f090d6
Merge pull request #9534 from fluffycondor/php8-str-function-signatures
Improve PHP8 str_* function signatures
2023-03-27 21:00:33 +02:00
Daniel Beardsley
7b541ed74f
src/Psalm/Config.php: don't use annotations
Psalm was parsing this as a property annotation, derp.
2023-03-27 09:48:36 -07:00
andrew
2b5faaa02f Fix psalm errors 2023-03-27 18:37:11 +03:00
andrew
72e5709ef2 Handle partially templated first-class-callables 2023-03-27 18:29:22 +03:00
Daniel Beardsley
ad05b138a5
ClassLikeNodeScanner.php: Fix missing $this
Derp!

Co-authored-by: Bruce Weirdan <weirdan@gmail.com>
2023-03-27 08:14:46 -07:00
adrew
62a79eeff3 Test with invalid first-class-callable 2023-03-26 22:47:17 +03:00
adrew
f26c16d2ab Contextually resolve templates of first-class-callable arg during call 2023-03-26 19:07:20 +03:00
Daniel Beardsley
5ff933f2a5
@property annotations: allow *not* implying @psalm-seal-properties
Add a setting that allows usage of `@property` to *augment* classes that
use __get() and __set(). Previously, using `@property` once would force
you to exhaustively list all possible properties. This didn't use to be
the case, but was changed in df33405635

This was really unexpected for our team and for a while we thought it
was a psalm bug until I found the above commit.

We are using `__get()` for ORM objects and we want to use `@property` to
explicitly document some of columns without being forced to document
every column.
2023-03-24 23:35:41 -07:00
Damian Wójcik
350687dcb7 Handle different line endings from baseline. 2023-03-24 10:48:03 +01:00
orklah
dfd7ffc459 always combine the result of expansions 2023-03-23 20:51:34 +01:00
Bruce Weirdan
b25f2e6921
Fixed coercion of mixed into non-empty-mixed
Fixes vimeo/psalm#9540
2023-03-19 00:49:15 -04:00
Bruce Weirdan
2a84a63483
Prevent assertion leaks from else
Fixes vimeo/psalm#9395
2023-03-18 02:09:56 -04:00
fluffycondor
9730f2c073 Don't report InvalidLiteralArgument for paths 2023-03-18 00:05:44 +06:00
Paweł Tomulik
0e9f97ed61
make some shepherd tests to pass 2023-03-17 15:56:33 +01:00
Paweł Tomulik
7979ccc1d3
fixed #9605 for class-like compounds 2023-03-17 15:56:33 +01:00
Paweł Tomulik
4393493407
fixed #9605 for function-like compounds 2023-03-17 15:56:33 +01:00
orklah
531eec6df8
Merge pull request #9497 from ptomulik/issue-9496
Fixed #9496
2023-03-16 19:25:17 +01:00
Paolo Conizzoli
3ccb1eaffe
Fix MissingThrowsDocblock when documented interface is extended by thrown exception interface 2023-03-16 12:01:16 +01:00
Bruce Weirdan
70a024f5e3
Merge pull request #9519 from edsrzf/eval-inside-call 2023-03-15 15:47:58 -04:00
Evan Shaw
37ff3a0657 Remove always-empty ClassAnalyzer leftover_stmts array 2023-03-16 07:03:10 +13:00
Evan Shaw
ce3f7fccd6 Set inside_call for eval expressions 2023-03-15 22:06:36 +13:00
Bruce Weirdan
c272be1e04
Merge pull request #9499 from weirdan/fix-integer-overflow-in-array-keys 2023-03-14 22:43:11 -04:00
Bruce Weirdan
9b00049d05
Merge pull request #9491 from weirdan/support-numeric-literal-separators-in-docblocks 2023-03-14 22:20:24 -04:00
Bruce Weirdan
8d71479f2f
Merge pull request #9504 from othercorey/fix-strsplit 2023-03-14 22:19:52 -04:00
Bruce Weirdan
c7c0b79903
Merge branch 'master' into fix-integer-overflow-in-array-keys 2023-03-14 22:17:04 -04:00
orklah
293b7281f9
Merge pull request #8960 from tm1000/feature/upgrade-lsp-v5
WIP: Performance/Feature Improvements to the Language Server
2023-03-14 07:31:35 +01:00
Bruce Weirdan
1a5a9d2242
Fix asserted property mangling
Fixes vimeo/psalm#9505
2023-03-13 02:15:21 -04:00
Paweł Tomulik
f61ffe4e27
Merge branch 'pvandommelen-issue-9496' into issue-9494-merged 2023-03-13 05:56:37 +01:00
Corey Taylor
39bb7b45a7 Fix return type of str_split() 2023-03-12 21:15:53 -05:00
Bruce Weirdan
971b93049f
Update src/Psalm/Type/Atomic/TKeyedArray.php
Co-authored-by: MoonE <maxi_kroeg@web.de>
2023-03-12 20:35:21 -04:00
Bruce Weirdan
4042036e8e
Drop misleading type 2023-03-12 20:12:19 -04:00
Bruce Weirdan
30369e826a
Correctly handle near-overflowing keys and flag autoincrement overflows
Co-authored-by: Maximilian Krög <maxi_kroeg@web.de>
2023-03-12 19:57:14 -04:00
Peter van Dommelen
6bbcfb2429 Reuse the normal docblock-type parser when parsing type aliases instead of doing regex magic.
Fixes #9496.
Also resolves an additional issue with comments after a type which does not contain brackets.
Includes a test for multiline types which did not yet exist.
2023-03-12 22:58:20 +01:00
Bruce Weirdan
0e9085f3e0
Handle overflow in SimpleTypeInferer as well 2023-03-12 17:47:42 -04:00
Bruce Weirdan
902a019f0a
Merge pull request #9406 from edsrzf/atomic-constructor 2023-03-12 17:27:22 -04:00
Bruce Weirdan
103aa019da
Fix integer overflow in array keys
Fixes vimeo/psalm#9498
2023-03-12 16:20:13 -04:00
Paweł Tomulik
84b389e738
workaround for false positives caused by #9484 2023-03-12 18:23:10 +01:00
Paweł Tomulik
232791753d
fix #9433 2023-03-12 18:23:10 +01:00
Bruce Weirdan
47f792ea12
Deprecate CallableTrait::__construct
All internal consumers have their own constructors now, and we don't
expect external classes to use it.
2023-03-12 03:33:26 -04:00
Evan Shaw
3b3d07e555
Add back CallableTrait constructor 2023-03-12 03:33:26 -04:00
Evan Shaw
f5c3f08f8e
Make Atomic subclasses consistently call their parent constructors 2023-03-12 03:33:25 -04:00
Bruce Weirdan
b37c56613b
Support int separators in docblocks
PHP understands `1_000` to be `1000`, so there's no reason why it
shouldn't be recognized in docblocks as well.
2023-03-11 23:14:40 -04:00
Bruce Weirdan
f48b79063c
Merge pull request #9486 from ZebulanStanphill/fix-truthy-string-analysis 2023-03-11 22:06:14 -04:00
Bruce Weirdan
8adaee61ad
Fix newly found issues 2023-03-11 05:23:49 -04:00
Bruce Weirdan
46493ab358
Compare list generic params
So that `list<int>` does not accept `list{1, new stdClass}`

Fixes vimeo/psalm#9485
2023-03-11 05:23:49 -04:00
Zebulan Stanphill
d7d5f72045
Add truthy-string to reserved word list. 2023-03-10 22:07:43 -06:00
Pere Orga
f70b375da3 Remove unused 'use function version_compare' 2023-03-08 20:35:43 +01:00
Pere Orga
187c214f58 Use analysis_php_version_id instead of config->getPhpVersion() 2023-03-08 20:33:55 +01:00
Pere Orga
17939eda04 consider new HTML entity en/decode functions defaults since PHP 8.1 2023-03-08 18:57:22 +01:00
Bruce Weirdan
193a0dbe0e
Don't crash on unary minus overflow
Fixes vimeo/psalm#9464
2023-03-07 12:29:40 -04:00
Bruce Weirdan
91cd660286
Fix CS 2023-03-06 05:33:26 -04:00
Alessandro Lai
7f26a5b473
Replace requirement for package-versions with Composer 2 APIs 2023-03-06 09:21:44 +01:00
Peter van Dommelen
c72edefc9e Do not strip the last ) bracket when parsing phpdoc type aliases.
Fixes https://github.com/vimeo/psalm/issues/6782

Reworked the regex logic to not check each grouping character separately. Removed the `^` character from the character list, which was likely unintended.
2023-03-05 22:28:22 +01:00
Bruce Weirdan
f801561ea7
Improce enum case reconciliation
Fixes vimeo/psalm#9456
2023-03-05 16:34:51 -04:00
Andrew Nagy
3271b1b8f3 add experimental in memory option 2023-03-03 08:11:10 +00:00
Bruce Weirdan
36913b13d5
Support for readonly classes 2023-03-03 04:04:12 -04:00
Andrew Nagy
f908b9ad85 fix failing test 2023-03-03 07:20:41 +00:00
Bruce Weirdan
98d96fbe9c
Forbid private final methods
Fixes vimeo/psalm#8374
2023-03-03 02:00:09 -04:00
Andrew Boyton
e8bd52eba6 Merge param descriptions when adding or updating types 2023-03-03 08:32:24 +11:00
Andrew Nagy
97eae625e9 fixes 2023-03-02 19:12:29 +00:00
Andrew Nagy
7760c399cc syntax 2023-03-02 19:05:14 +00:00
Andrew Nagy
fc4c98050e cleanup 2023-03-02 19:02:56 +00:00
Andrew Nagy
221eecf2e3 remove options to clear and boot cache 2023-03-02 18:57:27 +00:00
Andrew Nagy
24b6a97891 use in-memory cache thanks @ging-dev, remove pnctl fork 2023-03-02 18:45:23 +00:00
Andrew Nagy
0e4b878cbe fix outstanding issues 2023-03-02 18:14:20 +00:00
Andrew Nagy
7e9638b729 Merge branch 'master' of https://github.com/vimeo/psalm into feature/upgrade-lsp-v5 2023-03-02 18:10:13 +00:00
Andrew Nagy
3467816900 fix 2023-03-02 18:07:50 +00:00
Andrew Nagy
5eed370fa5 fix outstanding CI issues 2023-03-02 18:02:23 +00:00
Andrew Nagy
2efd9c81e0 bump to 5.7.7 2023-03-02 17:05:12 +00:00
Andrew Nagy
6e109aadce Merge tag '5.7.7' of https://github.com/vimeo/psalm into feature/upgrade-lsp-v5 2023-03-02 17:04:33 +00:00
Bruce Weirdan
839dc10da2
Merge pull request #9435 from vimeo/revert-9434-array_pop-is-impure 2023-03-01 01:48:26 -04:00
orklah
83051cfe87
Merge pull request #9291 from lptn/disableExtensions-hides-warnings
Do not display ext deprecation note when `disableExtensions` used
2023-03-01 00:06:59 +01:00
Bruce Weirdan
5130563d9f
Revert "array_pop is impure" 2023-02-28 19:06:07 -04:00
Bruce Weirdan
007ffaecd8
array_pop is impure
Fixes vimeo/psalm#9429
2023-02-28 18:53:36 -04:00
Alies Lapatsin
fcb96f10c2 Fix default for ibm_db2 ext, add description 2023-02-28 23:05:47 +01:00
Alies Lapatsin
feb0cb8598 Merge branch 'master' into disableExtensions-hides-warnings
# Conflicts:
#	src/Psalm/Config.php
2023-02-28 22:51:43 +01:00
Paweł Tomulik
78e6545d7f
fix #4460 2023-02-28 11:38:47 +01:00
orklah
99b598716d
Merge pull request #9422 from EgorBakulin/#9411/concat-should-never-remove-non-empty-non-falsy-from-string
concat should never remove non empty non falsy from string #9411
2023-02-27 18:49:24 +01:00
ebakulin
67d26d3c51 added case with literal string 2023-02-28 00:22:34 +07:00
ebakulin
cf35b3ce0c reworked one known operand case 2023-02-28 00:12:18 +07:00
ebakulin
31fcbd5f69 added case with one null type 2023-02-27 22:03:01 +07:00
Paweł Tomulik
69c5fd69f3
fixed #9401 2023-02-27 00:07:58 +01:00
Bruce Weirdan
e743cd9e8d
Taint map is non-empty as well 2023-02-26 03:17:13 -04:00
Bruce Weirdan
6811547707
Callmap is always non-empty
Fixes several baselined issues
2023-02-26 02:45:46 -04:00
Alies Lapatsin
c23cb4bdf0
Merge branch 'master' into php83-dic 2023-02-25 11:14:00 +01:00
Alies Lapatsin
02de61eabe Update PHP_MINOR_VERSION 2023-02-25 11:13:04 +01:00
Bruce Weirdan
6ac2b8d5a8
Merge pull request #9400 from edsrzf/psalter-possibly-undefined 2023-02-25 04:26:56 -04:00
Evan Shaw
f7eaa5daec Preserve PossiblyUndefinedVariable when fixing UnusedVariable 2023-02-25 20:08:01 +13:00
Bruce Weirdan
99a69b463c
Merge pull request #9398 from gndk/grpc-extension 2023-02-24 22:21:28 -04:00
gndk
fd2b439e6f Only disable grpc extension if it is not properly configured 2023-02-25 02:46:56 +01:00
Bruce Weirdan
59e549d2e8
Merge branch '5.7.x' into master 2023-02-24 21:19:43 -04:00
Bruce Weirdan
38d1abc13a
Don't crash on empty jit_buffer_size
Fixes vimeo/psalm#9396
2023-02-24 20:38:15 -04:00
Javier Spagnoletti
ab13ddf286 [ibm_db2] Improve return type inference for db2_autocommit() 2023-02-24 19:53:42 -03:00
Bruce Weirdan
682943423e
Merge branch '5.7.x' into master 2023-02-24 15:54:48 -04:00
Yannick Gottschalk
0a0f900d4c Fixed codestyle and psalm errors 2023-02-24 15:27:17 +01:00
Yannick Gottschalk
ad5bf62094 Fixes #9373 2023-02-24 13:32:04 +01:00
Yannick Gottschalk
98d3514197 Refs #9373, partial fix 2023-02-24 10:17:27 +01:00
Bruce Weirdan
caac14c4a4
Consistently report docblock issues on all classlikes
Fixes vimeo/psalm#9365
2023-02-24 03:31:00 -04:00
Bruce Weirdan
5f59f07163
Allow array as magic method name
Fixes vimeo/psalm#9321
2023-02-24 02:23:09 -04:00
Bruce Weirdan
3f52ded9c3
Correctly process use aliases in @psalm-scope-this
Fixes vimeo/psalm#9386
2023-02-24 00:53:36 -04:00
Bruce Weirdan
ea32d203b6
Disable opcache.preload if it's enabled
Fixes vimeo/psalm#9382

Also reorganized the opcache settings check a bit and enforced
`opcache.jit_buffer_size`
2023-02-23 22:17:23 -04:00
Bruce Weirdan
2315c98a73
Merge pull request #9381 from weirdan/enforce-literal-string-length-limit 2023-02-23 16:47:53 -04:00
Yannick Gottschalk
f026226aa3 Fixes #9384 2023-02-23 17:23:46 +01:00
Bruce Weirdan
5dec7f3dc3
Enforce literal string length limit
Fixes vimeo/psalm#9376

Ensures:
* that we never have a literal string exceeding the length limit
* that we call string interpreter for all literal strings
2023-02-23 04:01:29 -04:00
Bruce Weirdan
e96a929451
Merge pull request #9383 from weirdan/process-psalm-api-on-methods 2023-02-23 04:00:42 -04:00
Bruce Weirdan
2e90cb6c6a
Process @psalm-api tags on methods 2023-02-23 03:52:10 -04:00
Bruce Weirdan
d0a14005a8
Merge pull request #9380 from weirdan/array-in-foreach-is-not-empty 2023-02-23 02:20:46 -04:00
Bruce Weirdan
a26d3edb73
Fix newly found issue 2023-02-22 21:16:33 -04:00
Bruce Weirdan
1769f8b9a4
Refine arrays in foreach loops to non-empty-array
Fixes vimeo/psalm#9378
2023-02-22 20:44:50 -04:00
Javier Sanahuja
bf56db7623 Fixes 2023-02-23 01:40:30 +01:00
Javier Sanahuja
aee3665014 Fixes 2023-02-22 23:55:27 +01:00
Javier Sanahuja
fa39366cb4 Code style fix 2023-02-22 23:19:47 +01:00
Javier Sanahuja
4f83324a91 Support sizeof alias of count 2023-02-22 23:11:10 +01:00
Alies Lapatsin
e6bcd054b1 Merge branch 'master' into simplify-shepherd 2023-02-22 02:55:40 +01:00
f665e719fb
Describe changes 2023-02-21 15:44:18 +01: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
575da79801 Fix #9363 2023-02-21 10:09:58 +01:00
Alies Lapatsin
6ba9b1bb17 Merge branch 'master' into simplify-shepherd 2023-02-21 09:30:21 +01:00
Bruce Weirdan
ac86981a79
Revert "#7387 Add asserting non-empty-string by strlen"
This reverts commit 0ef7ec100a.
2023-02-20 23:07:22 -04:00
Evan Shaw
a03299f3d0 Include setrawcookie as an impure function 2023-02-21 14:24:05 +13:00
Bruce Weirdan
471a8c6a1d
Merge pull request #9354 from othercorey/fix-php74 2023-02-20 18:34:36 -04:00
Corey Taylor
c23de496cf Replace use of DOMParentNode::append() with appendChild() 2023-02-20 14:45:04 -06:00
88a3d288de Workaround arm64 opcache bug (fixes #9350) 2023-02-20 12:49:59 +01:00
Alies Lapatsin
547dfb4237 Merge branch 'master' into simplify-shepherd 2023-02-20 10:52:02 +01:00
Ismail Turan
bec8ddf525 fix (DateTime|DateTimeImmutable)::modify() return types
vimeo#9042 caused issues to any called method on an instance
of DateTime|DateTimeImmutable after calling the modify
method.

This fixes vimeo#9171
2023-02-20 08:47:05 +01:00
Bruce Weirdan
1b0f322bc7
Fix PsalmRestarter::restart() signature
XdebugHandler v2 did not have the param type hint

Fixes vimeo/psalm#9345
2023-02-19 20:38:03 -04:00
5df21fe448 Always use 0x7FFEBFFF opcache optimization level (fixes #9340) 2023-02-19 16:57:23 +01:00