1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-16 03:17:02 +01:00
Commit Graph

12120 Commits

Author SHA1 Message Date
orklah
b48a713a48
Merge pull request #8676 from othercorey/fix-return-callmap
Fix assert testing callmap return types
2022-11-06 09:59:46 +01:00
Corey Taylor
b87ebd697f Fix assert testing callmap return types 2022-11-06 00:59:55 -05:00
1986c8b4a8
Add support for strict arrays, fix type alias intersection, fix array_is_list assertion on non-lists (#8395)
* Immutable CodeLocation

* Remove excess clones

* Remove external clones

* Remove leftover clones

* Fix final clone issue

* Immutable storages

* Refactoring

* Fixes

* Fixes

* Fix

* Fix

* Fixes

* Simplify

* Fixes

* Fix

* Fixes

* Update

* Fix

* Cache global types

* Fix

* Update

* Update

* Fixes

* Fixes

* Refactor

* Fixes

* Fix

* Fix

* More caching

* Fix

* Fix

* Update

* Update

* Fix

* Fixes

* Update

* Refactor

* Update

* Fixes

* Break one more test

* Fix

* FIx

* Fix

* Fix

* Fix

* Fix

* Improve performance and readability

* Equivalent logic

* Fixes

* Revert

* Revert "Revert"

This reverts commit f9175100c8452c80559234200663fd4c4f4dd889.

* Fix

* Fix reference bug

* Make default TypeVisitor immutable

* Bugfix

* Remove clones

* Partial refactoring

* Refactoring

* Fixes

* Fix

* Fixes

* Fixes

* cs-fix

* Fix final bugs

* Add test

* Misc fixes

* Update

* Fixes

* Experiment with removing different property

* revert "Experiment with removing different property"

This reverts commit ac1156e077fc4ea633530d51096d27b6e88bfdf9.

* Uniform naming

* Uniform naming

* Hack hotfix

* Clean up $_FILES ref #8621

* Undo hack, try fixing properly

* Helper method

* Remove redundant call

* Partially fix bugs

* Cleanup

* Change defaults

* Fix bug

* Fix (?, hope this doesn't break anything else)

* cs-fix

* Review fixes

* Bugfix

* Bugfix

* Improve logic

* Add support for list{} and callable-list{} types, properly implement array_is_list assertions (fixes #8389)

* Default to sealed arrays

* Fix array_merge bug

* Fixes

* Fix

* Sealed type checks

* Properly infer properties-of and get_object_vars on final classes

* Fix array_map zipping

* Fix tests

* Fixes

* Fixes

* Fix more stuff

* Recursively resolve type aliases

* Fix typo

* Fixes

* Fix array_is_list assertion on keyed array

* Add BC docs

* Fixes

* fix

* Update

* Update

* Update

* Update

* Seal arrays with count assertions

* Fix #8528

* Fix

* Update

* Improve sealed array foreach logic

* get_object_vars on template properties

* Fix sealed array assertion reconciler logic

* Improved reconciler

* Add tests

* Single source of truth for test types

* Fix tests

* Fixup tests

* Fixup tests

* Fixup tests

* Update

* Fix tests

* Fix tests

* Final fixes

* Fixes

* Use list syntax only when needed

* Fix tests

* Cs-fix

* Update docs

* Update docs

* Update docs

* Update docs

* Update docs

* Document missing types

* Update docs

* Improve class-string-map docs

* Update

* Update

* I love working on psalm :)

* Keep arrays unsealed by default

* Fixup tests

* Fix syntax mistake

* cs-fix

* Fix typo

* Re-import missing types

* Keep strict types only in return types

* argc/argv fixes

* argc/argv fixes

* Fix test

* Comment-out valinor code, pinging @romm pls merge https://github.com/CuyZ/Valinor/pull/246 so we can add valinor to the psalm docs :)
2022-11-05 22:34:42 +01:00
orklah
205e8cc73e
Merge pull request #8670 from danog/fix_8669
Fix #8669
2022-11-05 22:29:37 +01:00
923f1d2eb7 Possible fix 2022-11-05 22:23:31 +01:00
5a44522efb Fix #8669 2022-11-05 22:12:55 +01:00
orklah
0e1c638a95
Merge pull request #8666 from weirdan/remove-argc-argv-from-env
Remove `argc` and `argv` elements from `$_ENV`
2022-11-05 20:58:17 +01:00
Bruce Weirdan
81423dc12b
Remove argc and argv elements from $_ENV
Fixes vimeo/psalm#8662
2022-11-05 15:19:21 -04:00
orklah
2ae819e360
Merge pull request #8665 from danog/fix_8664
Fix #8664
2022-11-05 19:32:17 +01:00
da21229cab Fix #8664 2022-11-05 19:15:46 +01:00
d0be59e16e
Immutable unions (#8627)
* Immutable CodeLocation

* Remove excess clones

* Remove external clones

* Remove leftover clones

* Fix final clone issue

* Immutable storages

* Refactoring

* Fixes

* Fixes

* Fix

* Fix

* Fixes

* Simplify

* Fixes

* Fix

* Fixes

* Update

* Fix

* Cache global types

* Fix

* Update

* Update

* Fixes

* Fixes

* Refactor

* Fixes

* Fix

* Fix

* More caching

* Fix

* Fix

* Update

* Update

* Fix

* Fixes

* Update

* Refactor

* Update

* Fixes

* Break one more test

* Fix

* FIx

* Fix

* Fix

* Fix

* Fix

* Improve performance and readability

* Equivalent logic

* Fixes

* Revert

* Revert "Revert"

This reverts commit f9175100c8452c80559234200663fd4c4f4dd889.

* Fix

* Fix reference bug

* Make default TypeVisitor immutable

* Bugfix

* Remove clones

* Partial refactoring

* Refactoring

* Fixes

* Fix

* Fixes

* Fixes

* cs-fix

* Fix final bugs

* Add test

* Misc fixes

* Update

* Fixes

* Experiment with removing different property

* revert "Experiment with removing different property"

This reverts commit ac1156e077fc4ea633530d51096d27b6e88bfdf9.

* Uniform naming

* Uniform naming

* Hack hotfix

* Clean up $_FILES ref #8621

* Undo hack, try fixing properly

* Helper method

* Remove redundant call

* Partially fix bugs

* Cleanup

* Change defaults

* Fix bug

* Fix (?, hope this doesn't break anything else)

* cs-fix

* Review fixes

* Bugfix

* Bugfix

* Improve logic

* Update
2022-11-04 19:04:23 +01:00
orklah
51838a5457
Merge pull request #8658 from aboks/patch-1
Mark hash_update functions as impure
2022-11-04 11:35:03 +01:00
Arnout Boks
2387d5eef0
Mark hash_update functions as impure
This prevents Psalm from marking calls to them as UnusedFunctionCall.
2022-11-04 09:05:29 +01:00
orklah
1e454fa3d5
Merge pull request #8644 from neclimdul/SplFile-getSize
Fix Spl file handling signatures
2022-11-04 07:28:54 +01:00
James Gilliland
a1f40c9cab Fix Spl file handling signatures
Update SplFileInfo method signatures and related classes.

Fixes #8642
2022-11-04 07:11:05 +01:00
orklah
3daad0c32d
Merge pull request #8652 from VincentLanglet/improveSerializeSupport
serialize is not pure for array of object
2022-11-03 20:29:09 +01:00
Vincent Langlet
c02ed9da0a Fix cs 2022-11-03 20:24:15 +01:00
orklah
2b3fa46348
Merge pull request #8654 from VincentLanglet/phpstanAssert
Add support for phpstan assertions
2022-11-03 18:30:20 +01:00
Vincent Langlet
fbaf6afb30 Try 2022-11-03 18:11:01 +01:00
Vincent Langlet
dc977964c6 Refacto 2022-11-03 16:05:40 +01:00
Côme Chilliet
24581dfecb
Fix return type of ReflectionExtension::getVersion
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-03 15:08:27 +01:00
Vincent Langlet
b2f095f1b8 Add tests 2022-11-03 14:39:48 +01:00
Vincent Langlet
6382af1c97 Add support for phpstan assertions 2022-11-03 14:26:27 +01:00
Vincent Langlet
4a27322144 serialize is not pure for array of object 2022-11-03 11:48:33 +01:00
orklah
85b5436776
Merge pull request #8650 from VincentLanglet/serialize
Do not report serialize as unused
2022-11-02 23:24:37 +01:00
Vincent Langlet
0bdfc4b60b Mark serialize as impure only for object 2022-11-02 23:08:03 +01:00
Vincent Langlet
ef0a17ee11 Do not report serialize as unused 2022-11-02 22:52:42 +01:00
orklah
8fc499e341
Merge pull request #8649 from lptn/ext-random-for-v5
Add stubs for ext-random (PHP 8.2)
2022-11-02 18:44:43 +01:00
Alies Lapatsin
d9a08ec047 Add stubs for ext-random (PHP 8.2) 2022-11-02 15:59:56 +03:00
orklah
761d67faa6
Merge pull request #8641 from BenMorel/xmlreader
Fix XMLReader::expand() nullable parameter $baseNode
2022-11-01 19:54:48 +01:00
orklah
d3f4240d6a
Merge pull request #8643 from franmomu/patch-1
Allow to set PHP 8.2 version
2022-11-01 19:52:59 +01:00
Fran Moreno
933caa8f69
Allow to set PHP 8.2 2022-11-01 16:25:03 +01:00
Benjamin Morel
ee7fc0fad8 Fix XMLReader::expand() nullable parameter $baseNode 2022-11-01 13:26:41 +01:00
orklah
3f0107e0c7
Merge pull request #8634 from lptn/php82
Add dictionary delta for PHP 8.2
2022-10-31 19:43:34 +01:00
Alies Lapatsin
c57378b6fb
Merge branch '4.x' into php82 2022-10-31 22:28:01 +04:00
Alies Lapatsin
9516baced6 Update str_split signature to reflect PHP 8.2 changes 2022-10-31 21:27:46 +03:00
orklah
41e870baa9
Merge pull request #8639 from hamburnyog/fix-issue-8631
Fix for issue #8631
2022-10-31 17:33:12 +01:00
William Owen O. Ponce
77b3962b94 Fix typo 2022-10-31 23:09:07 +08:00
Alies Lapatsin
b450eac812 Add PHP 8.2 functions to the main delta 2022-10-31 13:00:11 +03:00
Alies Lapatsin
855eef9205 Increment PHP_MINOR_VERSION (to load delta for PHP 8.2) 2022-10-31 12:44:34 +03:00
Alies Lapatsin
ceb50e5cd5
Merge branch '4.x' into php82 2022-10-31 13:00:29 +04:00
Alies Lapatsin
61e95f948d Add removed section 2022-10-31 01:42:05 +03:00
Alies Lapatsin
6cf0657c6a Add dictionary delta for PHP 8.2 2022-10-31 00:43:40 +03:00
orklah
7c83878ae0
Merge pull request #8619 from kkmuffme/keep-literal-string-for-simple-str_replace
keep literal string for simple str_replace
2022-10-27 10:24:16 +02:00
kkmuffme
e064a0c14d fix unrelated CI error 2022-10-27 09:23:25 +02:00
kkmuffme
de52e42d5f keep literal string for simple str_replace 2022-10-27 09:23:25 +02:00
orklah
25b3937168
Merge pull request #8622 from webmaster777/patch-1
Update PossiblyFalseReference.md
2022-10-26 22:06:48 +02:00
orklah
26c2539827
Merge pull request #8620 from kkmuffme/basename-return-type-provider
add basename return type provider
2022-10-26 22:01:32 +02:00
webmaster777
c6c6d083e1
Update PossiblyFalseReference.md
Typo than -> that
2022-10-26 19:52:31 +02:00
kkmuffme
87eb83616e add basename return type provider
Like dirname return type provider of https://github.com/vimeo/psalm/pull/8611
2022-10-26 13:03:53 +02:00