Tomasz Kusy
b73f2c96d8
Resolve __DIR__ / __FILE__ when const/variable is used for include CS fix
2022-02-04 19:43:55 +01:00
Tomasz Kusy
bcbfbed072
Resolve __DIR__ / __FILE__ when const/variable is used for include
2022-02-04 19:39:39 +01:00
orklah
f82a70e7ed
Merge pull request #7573 from phptest2/4.x
...
improving error message for Could not resolve config path
2022-02-03 18:03:47 +01:00
phptest2
582624a932
improving error message for Could not resolve config path
...
$directory_path is false, so better use $prospective_directory_path in the error message.
2022-02-03 17:58:12 +01:00
Bruce Weirdan
2128ab1d71
Merge pull request #7561 from b2pweb/clear-context-on-static-call
2022-02-02 17:30:14 +02:00
Vincent
3c3e692e7e
AtomicStaticCallAnalyzer: clear tmp var from context ( fix #7556 )
2022-02-02 13:51:54 +01:00
orklah
ff2636eed8
Merge pull request #7558 from orklah/tweaksToArrays
...
sealed keyed arrays
2022-02-01 22:56:59 +01:00
orklah
1c2ffc81c2
tweaks
2022-02-01 22:49:20 +01:00
orklah
bd14653da5
Merge pull request #7554 from Ocramius/fix/#7478-trait_exists-always-returns-boolean
...
Ensure `trait_exists()` always returns `bool`
2022-02-01 17:48:27 +01:00
Marco Pivetta
fabcda16b4
Ensure trait_exists()
always returns bool
...
Fixes #7478
As discussed in the upstream issue, `trait_exists()` always returns `bool`: while
it can return `null` when the arguments passed to it do not match (either no arguments, or
3 or more arguments), we do not support that scenario, as that already doesn't respect the
type signature of this function.
We cut to the point: always make it `bool`, which is the scenario that works under healthy
operational conditions.
Ref: https://github.com/Roave/BetterReflection/pull/983#discussion_r790908170
Ref: https://psalm.dev/r/c41a43805d
Ref: https://github.com/vimeo/psalm/issues/7478#issuecomment-1020330351
Ref: https://github.com/vimeo/psalm/issues/7478#issuecomment-1020337712
Ref: https://3v4l.org/XpHmh
2022-02-01 16:51:09 +01:00
Bruce Weirdan
dadb1f2167
Merge pull request #7539 from vimeo/revert-7363-81_returntypewillchange
2022-02-01 01:03:09 +02:00
Bruce Weirdan
49d256601f
Suppress UnusedClass
2022-02-01 00:06:25 +02:00
Bruce Weirdan
f61193b798
Reinstate MethodSignatureMustProvideReturnType
...
It's never emitted, but is there for BC.
2022-01-31 23:38:15 +02:00
orklah
68e67aeb10
Merge pull request #7546 from orklah/impure-callable
...
Handle first class callable on unknown functions
2022-01-31 22:02:35 +01:00
orklah
5a19d42dab
fix test
2022-01-31 21:51:31 +01:00
orklah
a598efb4ab
Handle first class callable on unknown functions
2022-01-31 21:36:01 +01:00
orklah
041145dd9d
Merge pull request #7542 from klimick/fix-object-const-inference
...
Fix object constant inference
2022-01-31 21:11:28 +01:00
adrew
e284b91b82
Remove redundant flag from SimpleTypeInferer
2022-01-31 23:03:34 +03:00
adrew
121a801616
Fix object constant inference
2022-01-31 23:03:34 +03:00
orklah
69e8815b18
Merge pull request #7545 from orklah/impure-call-detection-for-psalter
...
fix wrong detection of purity
2022-01-31 21:00:18 +01:00
orklah
48e09ab308
fix
2022-01-31 20:55:53 +01:00
orklah
fc281672ea
fix wrong detection of purity
2022-01-31 20:52:25 +01:00
Bruce Weirdan
3ae067795d
Update baseline
2022-01-31 15:11:06 +02:00
Bruce Weirdan
603714518b
Revert "PHP 8.1: Report missing typehints in overridden native methods"
2022-01-31 14:37:42 +02:00
orklah
4729eb004a
Merge pull request #7532 from ohader/event-nameing-4x
...
[TASK] Add AfterFunctionLikeAnalysisEvent::getFunctionlikeStorage
2022-01-30 17:01:30 +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
orklah
286176f9c3
Merge pull request #7525 from VincentLanglet/exceptionCode2
...
Fix for Exception->getCode return type provider
2022-01-30 15:42:26 +01:00
Vincent Langlet
854a3412fe
Use function
2022-01-30 15:32:55 +01:00
Vincent Langlet
cd3213201d
Fix
2022-01-30 15:30:40 +01:00
Vincent Langlet
584344fda3
Failing test
2022-01-30 15:17:18 +01:00
Bruce Weirdan
b45306c8a5
Merge pull request #7522 from weirdan/update-attributes
2022-01-30 00:30:15 +02:00
Bruce Weirdan
c025d1eb21
Update .gitattributes
...
* Do not ship baseline and UPGRADING.md in dist packages
* Mark .phpstub as PHP to fix Github syntax highlighting
2022-01-30 00:23:28 +02:00
orklah
a2ad69ae4f
Merge pull request #7501 from KevinVanSonsbeek/bugfix/#7479-domtext-nodevalue-can-be-null
...
BugFix: Made DOMNode::nodeValue nullable
2022-01-27 20:00:37 +01:00
Kevin van Sonsbeek
6b59dd9c66
Made the nodeValue nullable as indicated by the docs.
2022-01-27 19:19:57 +01:00
orklah
f6a89215ec
Merge pull request #7489 from KevinVanSonsbeek/bugfix/#6151-typedoesnotcontainnull-on-return-value-from-dom_import_simplexml
...
Bugfix/#6151 typedoesnotcontainnull on return value from dom import simplexml
2022-01-27 08:29:04 +01: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
Kevin van Sonsbeek
7507274b1c
Fixed return type in the historical callmap, and the old state in the CallMap_80_delta.php
2022-01-26 18:02:27 +01:00
Kevin van Sonsbeek
5a1ddf5e2d
Fixed the return type in the callmap
2022-01-25 23:13:04 +01:00
Kevin van Sonsbeek
62d458bfe8
Added the change to the delta callmap for php 8.0
2022-01-25 23:12:52 +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
Fabien Villepinte
6bf34b5b97
Add missing parameter to Phar::getMetadata()
2022-01-25 21:35:27 +01:00
orklah
3f799fc5fd
fix CS issue
2022-01-25 20:58:40 +01:00
orklah
ea598450a3
Merge pull request #7483 from ElisDN/array-replace
...
Fix `array_replace` type
2022-01-25 19:25:14 +01:00
ElisDN
9f01c16ae9
Fix array_replace type
2022-01-25 15:22:50 +03:00
orklah
f1c4b62f5c
Merge pull request #7414 from b2pweb/call-docblock-method-using-parent
...
Add support of docblock method using parent keyword
2022-01-24 13:02:57 +01:00
orklah
0619b404e5
Merge pull request #7390 from VincentLanglet/exceptionCode
...
Add Exception->getCode() return type provider
2022-01-24 12:56:57 +01:00
Bruce Weirdan
3a6dc9b458
Merge pull request #7431 from zoonru/disable_suppress_all
2022-01-24 11:25:32 +02:00
Vincent Langlet
9905baeceb
Add flagfrom_calculation
2022-01-24 09:31:10 +01:00