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

42 Commits

Author SHA1 Message Date
8fc161c5d4 Merge remote-tracking branch 'origin/master' into tnon_empty_list_refactoring 2022-12-01 19:19:43 +01:00
Bruce Weirdan
6fd2ff14e7
Document BC break 2022-11-29 04:29:26 -04:00
9a5337d6b5 Switch to Type::getListAtomic 2022-11-22 17:01:19 +01:00
0a3971a54e Deprecate TCallableList as well 2022-11-21 19:39:57 +01:00
b63287150f Remove getGenericArrayType parameter right away, and do not return a non-empty-array if there are no defined keys 2022-11-21 18:13:17 +01:00
f7527d464a Fix 2022-11-21 17:54:00 +01:00
98bfe9f1b4 Add note for 5.1 BC break 2022-11-21 17:53:08 +01: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
3abd0b961f Immutable Unions 2022-10-03 10:45:36 +02:00
AndrolGenhald
66ebf4a55c Rename TKeyOfArray to TKeyOf. 2022-07-18 14:44:29 -05:00
AndrolGenhald
b51b5ac903 Allow value-of to work with backed enums (fixes #7874). 2022-07-18 14:10:06 -05:00
Aleksandr Zhuravlev
b4fdc3e326 Made most of callbacks static. Reworked some array_map() into foreach() 2022-04-09 21:58:26 +12:00
Bruce Weirdan
69f5ccfdaf
Update UPGRADING.md 2022-02-10 01:49:24 +02:00
Bruce Weirdan
6c587c7a17
Update UPGRADING.md 2022-02-07 02:10:06 +02:00
Bruce Weirdan
bb72185f41
Update UPGRADING.md 2022-02-06 23:15:22 +02:00
Bruce Weirdan
aea950a10c
Update UPGRADING.md 2022-02-06 03:52:56 +02:00
Bruce Weirdan
75c58712c1
Update UPGRADING.md 2022-02-05 23:51:06 +02:00
orklah
2e01e9b7cd
Merge pull request #7396 from Patrick-Remy/feat/key-of-value-of-improvements
feat: make key-of/value-of usable with non-const arrays
2022-01-31 21:39:01 +01:00
Patrick Remy
f480eb2c94
docs: add key-of/value-of BC to UPGRADING 2022-01-31 21:30:04 +01:00
54b3f24b30
Update 2022-01-31 10:06:32 +01:00
Oliver Hader
6fd31cb5fa
[TASK] Remove deprecated AfterFunctionLikeAnalysisEvent::getClasslikeStorage 2022-01-31 00:34:03 +02:00
Oliver Hader
62a0ece035
!!! Allow plugins to modify Config::$fileExtensions early
ProjectAnalyzer consumed Config::$fileExtensions early in its
constructor - without having processed plugins' modifications,
registering their custom scanners or analyzer implementations.

This change
* adds new specific interface \Psalm\Plugin\FileExtensionsInterface
  to be used by plugin implementations
* extracts file extension handling from \Psalm\PluginRegistrationSocket
  and interface \Psalm\Plugin\RegistrationInterface to a new dedicated
  \Psalm\PluginFileExtensionsSocket and new interface
  \Psalm\Plugin\FileExtensionsInterface
  !!! this is a breaking change in PluginRegistrationSocket !!!
* adds runtime in-memory cache for Config::$plugins
* calls new method Config::processPluginFileExtensions(), providing
  modifications to file extension only early in ProjectAnalyzer
* adjusts documentation
2022-01-30 13:06:00 +01:00
AndrolGenhald
d705d5e83a Add note about $load_xdebug_stub removal to UPGRADING.md. 2022-01-27 17:52:50 -06:00
AndrolGenhald
e268a05307 Minor fixes after rebasing. 2022-01-26 12:57:19 -06:00
AndrolGenhald
139c3af9d1 Add reference changes to UPGRADING documentation. 2022-01-26 12:56:15 -06:00
orklah
e7743007d5 typo 2022-01-26 19:45:34 +01:00
orklah
efe9c2bc6d document some BC breaks introduced in #7409 2022-01-26 19:37:10 +01:00
Bruce Weirdan
1a15db89cc
Update UPGRADING.md 2022-01-26 13:25:27 +02:00
orklah
63b802bff4 remove TPositiveInt 2022-01-23 23:49:23 +01:00
AndrolGenhald
0c142ee3f8 Add BC break note. 2022-01-22 14:10:57 -06:00
Matthew Brown
0a81f8cd6c
Use objects, not strings, for assertions (#7410)
* Use objects, not strings, for assertions

* Remove unnecessary param

* Remove some unnecessary checks

* Fix bad find/replace

* Add note about assertions no longer stored as strings in UPGRADING.md
2022-01-20 17:33:06 -05:00
orklah
ddf7a0bb36 remove forbidEcho 2022-01-18 18:27:27 +01:00
Bruce Weirdan
6589ad1504
Document BC breaks in #7358 2022-01-09 22:51:23 +02:00
Bruce Weirdan
f09814ac17
Documented THtmlEscapedString removal 2022-01-03 22:48:59 +02:00
Bruce Weirdan
afa6497051
Dropped THtmlEscapedString 2022-01-03 22:48:59 +02:00
Bruce Weirdan
804d0c651d
Documented DocComment methods removal 2022-01-03 20:03:52 +02:00
Bruce Weirdan
0866866348
Document CodeIssue methods removal 2022-01-03 19:28:23 +02:00
Bruce Weirdan
0a991e3467
Documented removal of legacy hook interfaces 2022-01-03 18:34:54 +02:00
Bruce Weirdan
2066a21ca8
Documented addition of @internal annotations 2022-01-03 09:33:22 +02:00
Bruce Weirdan
c3700e11db
Updated UPGRADING.md 2022-01-03 06:12:34 +02:00
Bruce Weirdan
d3729c06ad
Document BC breaks 2022-01-02 14:39:44 +02:00