1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-04 02:27:59 +01:00
Commit Graph

12138 Commits

Author SHA1 Message Date
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
Bruce Weirdan
290b65f6dd Allow enum cases to reference constants
Fixes vimeo/psalm#8242
2022-11-10 19:54:45 -04:00
Bruce Weirdan
410c7bb474
Merge pull request #8697 from Nicelocal/fix_psl_e2e 2022-11-10 19:54:01 -04:00
Bruce Weirdan
30efa4abe1
Merge pull request #8698 from ThomasLandauer/patch-1 2022-11-10 16:17:15 -04:00
Thomas Landauer
c51d3665eb
Removing list
see https://github.com/vimeo/psalm/pull/8696#issuecomment-1310677110
2022-11-10 20:19:02 +01:00
Bruce Weirdan
4d53d26f00
Merge pull request #8689 from Nicelocal/fix_formatting 2022-11-10 13:21:37 -04:00
Bruce Weirdan
e2e9d824e7
Merge pull request #8696 from ThomasLandauer/patch-1 2022-11-10 12:38:03 -04:00
0038387252 Fix PSL e2e tests 2022-11-10 17:10:46 +01:00
Thomas Landauer
0c102a244e
Fixing code formatting 2022-11-10 16:59:04 +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
f8b9e97592 Fix heading indentation 2022-11-09 12:28:57 +01:00
9c23824b08 Try fix formatting 2022-11-09 10:17:38 +01:00
orklah
0cd1f13c83
Merge pull request #8687 from weirdan/emit-deprecatedinterface-when-referenced-in-generics
Emit `DeprecatedInterface` when interface is referenced in a generic
2022-11-09 07:09:35 +01:00
Matthew Brown
708db38742
Include docs with vendor dist 2022-11-08 20:35:26 -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
orklah
65c31ce89e
Merge pull request #8685 from Nicelocal/merge_4.x_final
Last-minute docufix
2022-11-08 21:10:30 +01:00
2e04aff60f Fix docs 2022-11-08 20:34:26 +01:00
orklah
33c2d9d8ca
Merge pull request #8684 from Nicelocal/merge_4.x_final
Merge 4.x and documentation fixes
2022-11-08 19:54:22 +01:00