Jack Worman
2b5407d2fb
Added SlevomatCodingStandard.TypeHints.ParameterTypeHint sniff and removed php-cs-fixer
2022-12-14 20:26:17 -06:00
Jack Worman
69658e8315
SlevomatCodingStandard.Commenting.DocCommentSpacing
2022-12-14 13:34:41 -06:00
Jack Worman
643542346b
Add codesniffer rules and expand php-cs-fixer to bin and test
2022-12-14 13:29:09 -06: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
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
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
Peter van Dommelen
05f28ce8cd
Do not widen type to mixed
and lose the existing type information when an Any
assertion is used.
...
Fixes #8084 .
2022-09-18 17:02:09 +02:00
orklah
0e891f25ad
refactor description of types in Atomic
2022-01-22 19:34:57 +01: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
Matthew Brown
7595a3c579
Make treatment of interfaces and classes more symmetrical
2022-01-05 01:10:57 +00:00
Matthew Brown
2358b96f54
Fix merge errors
2022-01-03 04:10:39 +02:00
orklah
0747b48d06
remove TEmpty
2022-01-03 04:09:59 +02:00
rarila
97e6511fab
Set number of lines before and after namespace.
2021-12-15 04:58:32 +01:00
rarila
1c298c4605
Conversion of Psalm\Type
2021-12-14 02:31:22 +01:00
ralila
e32af3c05a
Conversion of Psalm\Type\Atomic
2021-12-14 02:26:28 +01:00
rarila
39402c233d
Return type hints ( #7065 )
...
Co-authored-by: ralila <>
2021-12-05 19:51:26 +02:00
ralila
245920e53c
Import instead of using fqn
2021-12-03 20:11:20 +01:00
Maximilian Bösing
3e1be794c4
refactor: expand test cases and optimize handling of invalid class-constant references
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2021-11-15 17:56:39 +01:00
Maximilian Bösing
1a543aecb9
qa: add namespace to test asset
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2021-11-15 17:56:04 +01:00
Maximilian Bösing
49624169a5
bugfix: reconcile class-constant
...
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2021-11-15 17:53:26 +01:00
Jonathan Vollebregt
f5d7f6c405
SimpleXMLIterator is not always truthy
...
Fixes #6865
2021-11-12 13:49:31 +01:00
orklah
4755131585
more consistency
2021-10-20 07:32:04 +02:00
orklah
233fe11d12
SimpleXMLElement is not always truthy
2021-10-12 15:46:02 +02:00
orklah
55a696f83f
fix test
2021-10-11 16:11:22 +02:00
orklah
4bcce010e4
loose comparison between int/float and string result in numeric-string
2021-10-11 16:11:05 +02:00
orklah
5bb8eb6eb2
add test
2021-10-11 13:36:56 +02:00
Jack Robertson
8bec5fc743
Add expected behaviour tests
2021-07-26 08:50:12 +01:00
Matt Brown
f8cbb229f6
Fix #5236 - improve reconciliation of interfaces when unioned with class
2021-02-24 00:05:12 -05:00
Matt Brown
fe9eb6d91e
Make test reconciler names better
2021-02-23 22:37:26 -05:00
Matt Brown
0624098865
Ensure getId() output can always be parsed as a type
...
Ref #5105
2021-01-25 23:41:51 -05:00
orklah
b61831345c
only transform a Keyed array into callable-array if there's two elements ( #5086 )
...
* only transform a Keyed array into callable-array if there's two elements in array
* add tests
2021-01-22 16:14:29 -05:00
Matt Brown
f1107ab4d9
Fix #5049 - assertion of !empty
on bool makes true
2021-01-19 17:19:47 -05:00
orklah
b60182c514
better fix for reconciling iterable and object ( #4712 )
2020-11-27 09:10:55 -05:00
Matt Brown
b224970281
Fix generic ArrayAccess creation cc @orklah
2020-11-26 10:00:03 -05:00
orklah
f7cfdaabd7
Allow reconciling between object and iterable ( #4706 )
...
* Allow reconciling between object and iterable
* add tests
2020-11-26 09:25:49 -05:00
orklah
37a2f8a33d
unused use statements ( #4228 )
2020-09-22 01:10:46 -04:00
orklah
ead107fa9e
More return types ( #4173 )
...
* add native return types
* redundant phpdoc
2020-09-12 11:24:05 -04:00
Brown
29efab5cc2
Fix #4154 - treat literal numeric strings as numeric
2020-09-07 23:29:46 -04:00
orklah
f66d57f19d
add native return types ( #4116 )
...
* add native return types
* remove redundant phpdoc
2020-09-04 16:26:33 -04:00
Brown
76bd5b6278
Refactor type comparison
2020-07-21 19:40:35 -04:00
Brown
7dfa37beb2
Improve ergonomics of array assignment
2020-04-11 17:50:24 -04:00
Brown
bd2104c5ba
Merge with mixed in nested arrays
2020-04-09 09:27:21 -04:00
RJ Garcia
5a008fe1e6
Tests for TypeAnalyzer::isContainedBy on classes ( #2971 )
...
- Added additional tests to showcase subtyping
Signed-off-by: RJ Garcia <rj@bighead.net>
2020-03-14 14:48:45 -04:00
Brown
3c416482ec
Fix #2932 - don’t crash when trying to expand callable object-like array
2020-03-09 10:56:37 -04:00
Matthew Brown
952045e2ba
Fix return type checks
2020-02-22 11:28:24 -05:00
Matthew Brown
9fa2db1b6c
Move Union::getTypes to Union::getAtomicTypes
2020-01-04 12:20:26 -05:00
Matthew Brown
71cdaf6345
Fix tests
2020-01-02 08:37:54 -05:00
Brown
6ec947b82b
Move some tests into special fodler
2019-12-06 14:58:18 -05:00