1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-11 16:59:45 +01:00
Commit Graph

119 Commits

Author SHA1 Message Date
c7ab83767a
cs-fix 2023-07-28 11:35:38 +02:00
08e7db1143
Merge branch 'amp_v3' into strict_types 2023-07-28 11:33:07 +02:00
767fa621cf
Merge remote-tracking branch 'hub/master' into amp_v3 2023-07-28 11:23:51 +02:00
dea38564a9
Merge branch 'amp_v3' into strict_types 2023-07-26 10:57:28 +02:00
b839d8dfe0
Merge remote-tracking branch 'hub/master' into amp_v3 2023-07-26 10:19:11 +02:00
Bruce Weirdan
4f6fc3585b
Update tests to account for new progress protocol 2023-07-26 05:16:37 +02:00
Bruce Weirdan
0a2a0feaf2 CS fix 2023-07-24 21:59:34 +02:00
Bruce Weirdan
6eb7a688d1 Introduce --map-folder switch
And create PathMapper based on its value
2023-07-24 21:59:34 +02:00
Bruce Weirdan
8a51aaedd4 CS fix 2023-07-24 21:59:34 +02:00
Bruce Weirdan
6b9d9805b1 Account for -r option 2023-07-24 21:59:34 +02:00
Bruce Weirdan
a68c4804f4 Add path mapper 2023-07-24 21:59:34 +02:00
07b013d306
Enable strict_types 2023-07-24 10:48:32 +02:00
79da33221f
Fixes 2023-07-24 09:48:35 +02:00
8859e58464
Switch to amp v3 2023-07-24 09:32:45 +02:00
Andrew Nagy
5eed370fa5 fix outstanding CI issues 2023-03-02 18:02:23 +00:00
Andrew Nagy
24017059ee fix phpcs issues 2022-12-20 23:31:56 +00:00
Andrew Nagy
30f8331da6 additional fixes 2022-12-20 21:25:04 +00:00
Andrew Nagy
f1b0c4fa6d additional fixes 2022-12-20 21:16:29 +00:00
Andrew Nagy
b9791d24dc fix some tests 2022-12-20 21:09:34 +00:00
Andrew Nagy
82d8974fe3 merge to v5 2022-12-20 20:52:25 +00:00
Jack Worman
1c19260cdd Require trailing commas 2022-12-18 13:20:31 -06:00
Andrew Nagy
e16a4f3f85 more testing fixes 2022-11-30 18:28:13 +00:00
Andrew Nagy
b0705b4e29 fix tests 2022-11-30 18:14:06 +00:00
Andrew Nagy
da66665de9 Merge branch '4.x' into feature/upgrade-lsp 2022-11-30 17:59:23 +00: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
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
kkmuffme
5c39e66b15 fix tests 2022-09-15 19:38:51 +02:00
Andrew Nagy
2264fd5b50 more cleanup 2022-04-28 18:28:59 +00:00
Andrew Nagy
7819821be9 fix tests 2022-04-28 18:26:38 +00:00
Andrew Nagy
e5c9952963 cleanups 2022-04-28 18:12:50 +00:00
Andrew Nagy
045bbe23a9 basic testing, disable log filtering 2022-02-18 17:29:09 +00:00
Andrew Nagy
cc8c775abf fix linting 2022-02-15 00:18:49 +00:00
rarila
97e6511fab Set number of lines before and after namespace. 2021-12-15 04:58:32 +01:00
rarila
39402c233d
Return type hints (#7065)
Co-authored-by: ralila <>
2021-12-05 19:51:26 +02:00
ralila
8fb2e0f885 Handle some partials 2021-12-04 21:55:53 +01:00
ralila
2a956498bf Import instead of using fqn functions 2021-12-03 21:07:25 +01:00
ralila
245920e53c Import instead of using fqn 2021-12-03 20:11:20 +01:00
Bruce Weirdan
d19aad7db1
Display target PHP version
Historically it was often not quite clear to users what PHP version
Psalm assumes, and why. This PR addresses this issue by printing the
version and where we got it from right before scanning the files.
2021-11-27 02:18:09 +02:00
Bruce Weirdan
76be96ce53
Drop FakeFileProvider from tests folder
And use Psalm\Internal\Provider\FakeFileProvider
2021-07-02 03:57:57 +03:00
Bruce Weirdan
6abce3525a
Enforce use sort (#5900) 2021-06-07 22:55:21 -04:00
Bruce Weirdan
105c6f3a1c
Remove (and prevent) unused uses (#5704)
* Updates `slevomat/coding-standard`
* Removes unused uses
* Prevents unused uses
* Fixes a number of symbol case mismatches
2021-05-03 17:22:15 -04:00
Matt Brown
8b5898029d Add more tests for robustness 2021-02-28 10:36:18 -05:00
Matt Brown
ad82c93edb Fix #5297 - be more sensitive to additions and deletions in language server mode 2021-02-28 01:36:06 -05:00
Matt Brown
7db742dee3 Fix #5295 - offer static methods for completion too in instance mode 2021-02-27 11:36:19 -05:00
Joe Hoyle
e59670ef68
Add documentation to LSP (#5267)
* Add documention to LSP

Add descriptions for all Classes, Functions, Methods, Class Constants for LSP methods for Hover, SignatureInformation and Completions

* Descriptions for class name completions

* PHPCS

* Fix docblock being overriden

* Remove trailing comma in args

* Add description to function param before early `continue`

* Update php-language-server-protocol to 1.5

* Break up long array docblocks

* Break up docblock onto newline

Co-authored-by: Matthew Brown <github@muglug.com>
2021-02-24 10:14:04 -05:00
Matt Brown
77feecb370 Apply the partial diff hack earlier 2021-02-15 15:32:35 -05:00
Matt Brown
e60c333f2d Fix completion of Foo:: before an if statement 2021-02-15 11:12:04 -05:00
Matt Brown
b7792ab0b4 Fix static method call completion with variable assignment after 2021-02-15 00:45:39 -05:00
Matt Brown
bd6efd7cf2 Improve completion for namespaced classes
cc @joehoyle - this mainly allows us to get a correct list when the user starts typing Foo (without the new before it) inside a namespace
2021-02-14 23:25:13 -05:00
Matt Brown
1d5020f59f Only match functions where the first character has the same case as stub
cc @joehoyle - this prevents seeing lots of date_* functions when writing Date
2021-02-14 20:08:31 -05:00