kkmuffme
d410c9d4bc
improve cache flush debug info and code if cache disabled
2022-11-15 10:39:52 +01:00
Anner Visser
5bafc9512c
Add support for type aliases in @psalm-assert(-*) annotations
...
Fixes #8263
2022-11-14 16:03:35 +01:00
Matthew Brown
ec94001749
improve annotation
2022-11-11 20:17:05 -05:00
Matthew Brown
8d36bdc3ed
Make array shapes strict by default ( #8701 )
...
* Make array shapes strict by default
* Fix PSL tests
2022-11-11 20:14:21 -05:00
Andrii Dembitskyi
5704087422
Cleanup outdated comment
2022-11-11 07:38:33 +02:00
Bruce Weirdan
c613e47c55
Merge pull request #8693 from weirdan/fix-8267
...
Fixes https://github.com/vimeo/psalm/issues/8267
2022-11-10 21:13:12 -04:00
Bruce Weirdan
f49ff60172
Merge pull request #8688 from weirdan/fix-stringable-object
...
Fixes https://github.com/vimeo/psalm/issues/8575
2022-11-10 20:27:49 -04:00
Bruce Weirdan
55933a5309
Merge pull request #8692 from weirdan/fix-8602
...
Fixes https://github.com/vimeo/psalm/issues/8602
2022-11-10 20:27:07 -04:00
Bruce Weirdan
80750fd579
Implement subtype checks for stringable-object
2022-11-10 19:55:36 -04:00
Bruce Weirdan
512ad832f3
TObjectWithProperties::$methods
have lowercase keys
...
Method names in PHP are case-insensitive.
2022-11-10 19:55:36 -04:00
Bruce Weirdan
d122cef1ca
Mark inferred mutation-free constructor as such
...
Previously Psalm treated those constructors as explicitly mutation-free,
and thus required descendant constructors to be explicitly marked too.
Fixes vimeo/psalm#8602
2022-11-10 19:55:25 -04:00
Bruce Weirdan
6effd1bd2d
Flag invalid enum case value types
...
Fixes vimeo/psalm#8267
2022-11-10 19:55:18 -04:00
Bruce Weirdan
290b65f6dd
Allow enum cases to reference constants
...
Fixes vimeo/psalm#8242
2022-11-10 19:54:45 -04:00
0038387252
Fix PSL e2e tests
2022-11-10 17:10:46 +01:00
Matthew Brown
d63da1f66e
Prevent array{a: Foo} going cleanly into array<Foo> ( #8691 )
...
* Prevent array{a: Foo} going cleanly into array<Foo>
* Add test for new behaviour
* Fix code style issues
* Allow unions to be cloned again
* Simplify params properties
2022-11-10 09:18:27 -05:00
Bruce Weirdan
d81543f83e
Emit DeprecatedInterface
when an interface is referenced in a generic
...
Fixes vimeo/psalm#8617
2022-11-08 20:34:08 -04:00
3c7e5be703
Mark as internal
2022-11-08 10:55:14 +01:00
65d6a469b6
Fix tests
2022-11-08 10:45:21 +01:00
fc00b6338a
Fix tests
2022-11-08 10:37:48 +01:00
940e00e57a
Fix
2022-11-08 10:26:28 +01:00
68a5511057
Merge remote-tracking branch 'origin/4.x' into HEAD
2022-11-08 10:25:04 +01:00
Vincent Langlet
6916d414e2
Add support for phpstan-param-out
2022-11-07 10:22:33 +01: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
Bruce Weirdan
81423dc12b
Remove argc
and argv
elements from $_ENV
...
Fixes vimeo/psalm#8662
2022-11-05 15:19:21 -04: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
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
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
Vincent Langlet
fbaf6afb30
Try
2022-11-03 18:11:01 +01:00
Vincent Langlet
dc977964c6
Refacto
2022-11-03 16:05:40 +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
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
Alies Lapatsin
d9a08ec047
Add stubs for ext-random (PHP 8.2)
2022-11-02 15:59:56 +03:00
Fran Moreno
933caa8f69
Allow to set PHP 8.2
2022-11-01 16:25:03 +01:00
Alies Lapatsin
855eef9205
Increment PHP_MINOR_VERSION (to load delta for PHP 8.2)
2022-10-31 12:44:34 +03:00
kkmuffme
de52e42d5f
keep literal string for simple str_replace
2022-10-27 09:23:25 +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
Thomas Gerbet
62e92fb0cf
Add stubs for ext-ffi
...
See #8612
2022-10-25 19:59:44 +02:00
Chauncey McAskill
0afd873787
Fix dirname return type provider
...
Changed:
- Replaced extraction of `$dir_level` literal value to be from the NodeTypeProvider instead of from the statement; based on similar logic in `RoundReturnTypeProvider`.
- Replaced `new` return type creation with `Type` method creation.
- Replaced `null` return with string type.
Fixed:
- Typo on variable name for extracted `StatementsSource`.
- Edge case where `$dir_level` is less than 1.
- Broken unit tests.
2022-10-23 12:11:58 -04:00
Chauncey McAskill
1dfadfa9ec
Add dirname return type provider
2022-10-23 11:56:02 -04:00
orklah
b739b67080
Merge pull request #8594 from kkmuffme/callable-invalidargument-required-param-mismatch-missing-error
...
ensure callbacks have the required number of params
2022-10-22 12:20:29 +02:00
kkmuffme
edeff148b4
handle variadic
2022-10-22 08:28:56 +02:00
orklah
48b8efde99
Merge pull request #8584 from boesing/feature/8521
...
Enhance type detection for internal php functions `key`, `current`, `end` and `reset`
2022-10-18 00:07:13 +02:00
kkmuffme
41fbb14586
fix wrong php version id in $_FILES
2022-10-17 23:05:50 +02:00