1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-04 10:38:49 +01:00
Commit Graph

12155 Commits

Author SHA1 Message Date
5b3358937f Fix array_merge argument unpacking 2022-11-20 17:36:23 +01:00
Bruce Weirdan
7869cb548a
Merge pull request #8724 from kkmuffme/include-cli-args-in-php-errors 2022-11-20 06:28:22 -04:00
kkmuffme
ce84a80c6d include CLI args in PHP errors to more quickly identify run issues in CI 2022-11-20 11:15:45 +01:00
Bruce Weirdan
6d03c3209e
Merge pull request #8723 from weirdan/allow-new-on-objects
Fixes https://github.com/vimeo/psalm/issues/8355
2022-11-19 17:37:46 -04:00
Bruce Weirdan
6554aa05a7
Emit MixedMethodCall when calling new on object 2022-11-19 17:29:35 -04:00
Bruce Weirdan
d7561919b2
Allow new on objects
Fixes vimeo/psalm#8355
2022-11-19 16:53:07 -04:00
orklah
4e17585093
Merge pull request #8714 from kkmuffme/dont-rewrite-config-hash-to-cache-when-unchanged
Fix cache race condition due to missing repopulation of lock files cache
2022-11-18 22:08:37 +01:00
orklah
4a83f88881
Merge pull request #8707 from kkmuffme/improve-cache-flush-debug-info
improve cache flush debug info and code if cache disabled
2022-11-18 22:07:13 +01:00
orklah
48c0df6a8c
Merge pull request #8708 from annervisser/allow-using-imported-type-in-other-type
Allow using imported types in other types within the same file
2022-11-18 22:06:17 +01:00
orklah
ebc7599697
Merge pull request #8713 from weirdan/fix-8712
Reject `@psalm-consistent-constructor` in function docblocks
2022-11-18 22:05:22 +01:00
orklah
9d4c718757
Merge pull request #8717 from franmomu/fix_listAbbreviations
Fix DateTimeZone::listAbbreviations return type
2022-11-18 18:24:55 +01:00
Fran Moreno
c3bd060f06
Fix DateTimeZone::listAbbreviations return type
Also fixes DateTimeZone::getOffset return type
2022-11-18 08:50:00 +01:00
kkmuffme
ff49dfca1d Fix lock files not updated when cache is cleared race condition 2022-11-17 09:31:02 +01:00
kkmuffme
3068d38c3c only write config to cache when config hash changed 2022-11-17 09:20:16 +01:00
Bruce Weirdan
8e1f129701
Reject @psalm-consistent-constructor in function docblocks
Fixes vimeo/psalm#8712
2022-11-16 19:14:13 -04:00
orklah
12f33faece
Merge pull request #8709 from kkmuffme/add-psalter-no-progress-flag
add --no-progress to psalter
2022-11-15 20:20:17 +01:00
orklah
22fe7f4302
Merge pull request #8710 from kkmuffme/safe-delete-cache-directory
safe delete cache directory files
2022-11-15 20:18:59 +01:00
kkmuffme
4b20fd3e62 safe delete cache directory files
since we safeFileGetContents, it makes sense to also acquire lock before deleting, to avoid reading partial data
2022-11-15 19:54:43 +01:00
kkmuffme
ad90cc2744 add missing use statement 2022-11-15 19:49:15 +01:00
kkmuffme
11a6ff9b4f add --no-progress to psalter
like exists in Psalm.php
2022-11-15 15:02:48 +01:00
Anner Visser
d10b1f91bb
Allow using imported types in other types within the same file
In the test case (from issue #7116) both the type definition and the
import of the typed lived in the same file. This caused `OpeningTypes`
to be an `InlineTypeAlias` instead of a `LinkableTypeAlias`, in turn
causing an 'Invalid type alias' exception[^1].

By replacing the array union (+) with an array_merge, the import of the
type overrides the initial type declaration within the `Main` class.
This means type imports within one file act more like they would when in
separate files.

Fixes #7116

[^1]: [src/Psalm/Type/Atomic.php:407](1986c8b4a8/src/Psalm/Type/Atomic.php (L407))
2022-11-15 14:46:31 +01:00
kkmuffme
17c246b827 code style 2022-11-15 10:51:44 +01:00
kkmuffme
d410c9d4bc improve cache flush debug info and code if cache disabled 2022-11-15 10:39:52 +01:00
Bruce Weirdan
2a29fd71b7
Merge pull request #8705 from annervisser/add-support-for-type-aliases-in-psalm-assert-annotations
Fixes https://github.com/vimeo/psalm/issues/8263
2022-11-14 15:07:58 -04:00
Bruce Weirdan
dd253b755b
Conserve some vertical space 2022-11-14 14:54:55 -04: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
56bc854d8e
Remove value types navigation 2022-11-12 14:58:36 -05:00
Matthew Brown
86c0ec0d01
Remove utility types navigation 2022-11-12 14:58:13 -05:00
Matthew Brown
543d8ab83b
Remove unnecessary navigation 2022-11-12 14:57:28 -05:00
Matthew Brown
1af691c83f
Remove more unnecessary navigation section 2022-11-12 14:53:48 -05:00
Matthew Brown
2771864d27
Remove unnecessary » 2022-11-12 14:52:47 -05:00
98a5dc313d
Cleanup documentation (#8702)
* Cleanup documentation

* Cleanup

* Cleanup
2022-11-12 14:50:46 -05:00
Matthew Brown
a79255cc99
Remove strict- 2022-11-11 20:43:19 -05:00
Matthew Brown
256d9ac1a5
Remove strict-array from docs 2022-11-11 20:42:06 -05: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
orklah
8807800786
Merge pull request #8700 from bram123/memcache_callmap
Add extra types to Memcache::getExtendedStats and Memcached::getStats
2022-11-11 14:47:00 +01:00
Bram Leeda
66af7392fc
Update the historical CallMap data for MemcachePool::getExtendedStats 2022-11-11 14:18:53 +01:00
Bram Leeda
6000b0f327
Add extra types to Memcache::getExtendedStats and Memcached::getStats 2022-11-11 11:54:07 +01:00
Bruce Weirdan
efe36270f1
Merge pull request #8699 from andrew-demb/patch-1 2022-11-11 02:09:52 -04: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
0f528d05f7
Update docs/running_psalm/issues/InvalidEnumCaseValue.md 2022-11-10 20:26:37 -04:00
Bruce Weirdan
6faf4c99ab
Merge pull request #8694 from weirdan/fix-8242
Fixes https://github.com/vimeo/psalm/issues/8242
2022-11-10 20:25:18 -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