1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-15 10:57:08 +01:00
Commit Graph

11329 Commits

Author SHA1 Message Date
Patrick Remy
ce1feb1ebf
style: remove unused variable declaration 2022-01-27 22:28:40 +01:00
Patrick Remy
8f0244aa7e
style: add use statement for array_push 2022-01-27 22:28:40 +01:00
Patrick Remy
ed87465f71
tests: correct 'SKIPPED' prefix for skipped test 2022-01-27 22:28:40 +01:00
Patrick Remy
1f28d025c3
feat: allow unions for key-of/value-of
Add tests for TValueOfArray.
2022-01-27 22:28:24 +01:00
Patrick Remy
2880d046ce
feat: make key-of/value-of usable with non-const arrays 2022-01-27 22:22:14 +01: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
9168cef2d4 Merge remote-tracking branch 'upstream/4.x' into upstream-master6 2022-01-26 21:06:25 +01:00
Matthew Brown
ac29afcfe4 Don’t expect config exception in test 2022-01-26 14:30:01 -05:00
Matthew Brown
0825c0c07b Remove unnecessary check 2022-01-26 14:29:17 -05: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
orklah
f3f3fde869
Merge pull request #7339 from AndrolGenhald/feature/references
Add support for references and improve UnusedVariable checks (fixes #7254).
2022-01-26 20:09:01 +01:00
AndrolGenhald
e268a05307 Minor fixes after rebasing. 2022-01-26 12:57:19 -06:00
AndrolGenhald
740a10141d Fix crash when a reference is reassigned in a loop. 2022-01-26 12:56:17 -06:00
AndrolGenhald
139c3af9d1 Add reference changes to UPGRADING documentation. 2022-01-26 12:56:15 -06:00
AndrolGenhald
57b99be519 Improve reference support for assertions, array offsets, and properties. 2022-01-26 12:55:47 -06:00
AndrolGenhald
7694eb8d08 Work around phpcs impossible syntax issue.
phpcs want `as` to have a single space before it, but it also wants the line indented.
Worked around by assigning to another variable.
2022-01-26 12:55:47 -06:00
AndrolGenhald
089700d1be Add more reference tests. 2022-01-26 12:55:47 -06:00
AndrolGenhald
bf606202f8 Remove impossible TODO. 2022-01-26 12:55:47 -06:00
AndrolGenhald
3c7d176f87 Minor CS fix, phrasing improvement, fix test. 2022-01-26 12:55:47 -06:00
AndrolGenhald
f9450656e1 Add support for references and improve UnusedVariable checks (fixes #7254). 2022-01-26 12:55:47 -06:00
orklah
e7743007d5 typo 2022-01-26 19:45:34 +01:00
orklah
66343dee7b
Merge pull request #7154 from AndrolGenhald/feature/class-const-improvements
Improve class constant static analysis
2022-01-26 19:44:26 +01:00
orklah
efe9c2bc6d document some BC breaks introduced in #7409 2022-01-26 19:37:10 +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
Bruce Weirdan
bf22dcf7ed
Merge pull request #7491 from weirdan/lock-event-classes 2022-01-26 13:34:22 +02:00
Bruce Weirdan
1a15db89cc
Update UPGRADING.md 2022-01-26 13:25:27 +02:00
orklah
e5a7e0008a
Merge pull request #7490 from AndrolGenhald/bugfix/dont-crash-on-unresolvable-constant
Fix crash due to unresolvable constant.
2022-01-26 07:20:15 +01: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
AndrolGenhald
a208623fa7 Fix trailing commas for PHP < 8.0. 2022-01-25 17:09:51 -06:00
AndrolGenhald
ba8234dd2c Fix crash due to unresolvable constant. 2022-01-25 17:03:13 -06: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
AndrolGenhald
b68c6116d8 Use PHP 8.1 when testing AmbiguousConstantInheritance. 2022-01-25 15:49:09 -06:00
AndrolGenhald
0b81f46bb1 Fixes after rebasing. 2022-01-25 15:31:09 -06:00
AndrolGenhald
0edf260d8b Improve class constant static analysis.
Add class const covariance support (fixes #5589).
Add check for overriding const from interface in PHP < 8.1 (fixes #7108).
Add check for ambiguous const inheritance.
2022-01-25 15:20:17 -06:00
orklah
1cc9d1c887
Merge pull request #7487 from orklah/error
fix error with 0 being considered positive
2022-01-25 22:06:42 +01:00
orklah
204d09b271 fix error with 0 being considered positive 2022-01-25 21:54:55 +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
7c8441baec
Merge pull request #7123 from AndrolGenhald/feature/942-type-annotate-class-constants
Support type annotations for class consts (fixes #942).
2022-01-25 20:54: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
Matthew Brown
8ab0eec4dd Fix key 2022-01-25 01:36:23 -05:00
Matthew Brown
302c72d5b1 Add a couple of currently-working tests 2022-01-25 01:32:35 -05:00
Matthew Brown
c974f23852 Simplify context references 2022-01-24 16:35:42 -05:00