Ivan Sidorov
9b6ef8beef
Failed and regression tests with creation of a list of issues
...
Failed tests:
```
1) Psalm\Tests\MagicMethodAnnotationTest::testInvalidCodeWithIssues with data set "staticInvocationWithMagicMethodFoo"
UnexpectedValueException: Cannot get method params for A::foo
2) Psalm\Tests\MagicMethodAnnotationTest::testInvalidCodeWithIssues with data set "nonStaticSelfCallWithMagicMethodFoo"
UnexpectedValueException: Cannot get method params for B::foo
```
2024-02-13 17:25:16 +00:00
RobChett
4d9d7cebd9
Add support for @psalm-no-seal-properties and @psalm-no-seal-methods
2023-04-20 07:47:50 +01:00
Jack Worman
1c19260cdd
Require trailing commas
2022-12-18 13:20:31 -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
5ac60ddea0
Add tests
2022-11-24 19:31:53 +01: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
orklah
b633619a2c
Merge remote-tracking branch 'upstream/4.x' into upstream-master
2022-01-14 21:01:25 +01:00
Matthew Brown
b49682a485
Simplify issue suppression in tests
2022-01-13 14:38:17 -05:00
Matthew Brown
f439d6550b
Ensure that all entries in test arrays have explicit keys ( #7386 )
...
* Transformation that updates assertions
* Simplify transformation
* Ensure that all tests have keys
* Fix a few remaining keys
2022-01-13 13:49:37 -05:00
b530f23acc
PHP 8.2: seal all properties by default, add configuration key for lower versions
2022-01-10 10:11:28 +01:00
rarila
97e6511fab
Set number of lines before and after namespace.
2021-12-15 04:58:32 +01:00
ralila
8fb2e0f885
Handle some partials
2021-12-04 21:55:53 +01:00
piporoid
1df5f3012a
Prevent @property annotations on class properties
2021-08-17 23:40:26 +09:00
Bruce Weirdan
d992331125
Expand magic properties
...
Fixes vimeo/psalm#4344
Fixes vimeo/psalm#5663
Fixes vimeo/psalm#5639
Fixes vimeo/psalm#5955
Fixes vimeo/psalm#3272
2021-07-18 23:43:33 +03:00
Bruce Weirdan
6abce3525a
Enforce use
sort ( #5900 )
2021-06-07 22:55:21 -04:00
AndrolGenhald
d4590711d6
Fix object-like array keys when combining string and automatic keys ( fixes #5427 ). ( #5428 )
...
* Fix object-like array keys (fixes #5427 ).
* Fix incorrect return types for tests.
* Fix false positive list with literal int key.
2021-03-19 21:44:44 -04:00
orklah
ead107fa9e
More return types ( #4173 )
...
* add native return types
* redundant phpdoc
2020-09-12 11:24:05 -04:00
Brown
eaae243905
Fix #3857 - allow reconciliation on magic properties
2020-07-22 09:55:22 -04:00
Brown
2ccec821f8
Fix #3624 - inherit magic property annotations from traits
2020-06-20 16:53:17 -04:00
Matthew Brown
6f28ee684a
Fix #3156 - only override existing property types with @property suggestions
2020-04-16 00:22:00 -04:00
iggyvolz
94b246b987
Initial commit ( #3013 )
2020-03-24 18:32:57 -04:00
Matthew Brown
8d7fb2b415
Add config flag to support properties without a magic getter
2020-02-02 14:23:38 -05:00
Matthew Brown
4e85967184
Fix tests
2020-01-05 21:58:18 -05:00
Matthew Brown
867511d7fd
Use more specific error magic properties
2020-01-05 21:07:26 -05:00
Matthew Brown
df33405635
Seal properties and methods whenever @method/@property is used
2020-01-03 08:44:52 -05:00
Matthew Brown
d29c7b42d9
Fix #1869 - don’t memoize magic properties after set
2019-07-06 00:00:17 -04:00
LeSuisse
f29826b958
Fully qualify constants and function calls ( #1849 )
...
This should give a small performance boost.
Part of #1837 .
The change is enforced via phpcs and can be autofixed
with phpcbf.
2019-06-26 16:52:29 -04:00
Matthew Brown
5861476765
Don’t remove null after magic property fetch
2019-05-27 09:18:34 -04:00
Brown
0e4c8ce482
Split apart TypeCoercion issues, allowing more granular issue filtering
2019-04-25 18:02:19 -04:00
Matthew Brown
c772914910
Add some formatting
2019-03-23 14:27:54 -04:00
Bruce Weirdan
9bdc9f774f
More provider typing
2019-03-02 08:43:19 -05:00
Brown
601f303de2
Fix position of invalid param
2019-02-27 16:00:44 -05:00
bugreportuser
51493b552a
Add @psalm-property and @psalm-method override tests
2019-02-23 11:04:08 -05:00
bugreportuser
68a135f434
Allow @psalm-property and @psalm-method
2019-02-23 11:04:08 -05:00
Bruce Weirdan
8408effe57
Dropped unused uses
2019-02-17 13:17:45 -05:00
Brown
8a97e32e16
Add code to make handling interfaces with magic get/set
...
Ref #1228
2019-01-23 16:58:50 -05:00
Matthew Brown
9c5ef33997
Allow @property to override parent class property type
...
Fixes #1214
2019-01-19 14:26:27 -05:00
Matthew Brown
116cbfd349
Fix #1090 - re-fix support for magic get properties
2018-11-21 16:57:54 -05:00
Matthew Brown
4688b25fd9
Move internal classes to own namespace
2018-11-12 11:20:59 -05:00
Matthew Brown
39870f97c4
Fix #894 - check magic methods with given return types
2018-07-16 20:32:16 -04:00
Matthew Brown
82715a03ea
Improve test coverage of PropertyAssignmentChecker
2018-06-10 10:02:46 -04:00
Matt Brown
091fa53c72
Fix #798 - update magic property handling so it corresponds to PHP behaviour
2018-06-08 11:08:57 -04:00
Matthew Brown
bfa21e1108
Fix #721 by allowing @property annotations to be inheritable
2018-05-08 22:13:26 -04:00
Matthew Brown
2c0dd36035
Fix get type return types
2018-05-08 22:01:05 -04:00
Matthew Brown
5c39fb5ab1
Fix #716 - uss string inference to inform property names
2018-05-08 21:21:22 -04:00
Matthew Brown
c1440c11dc
Create separate file for magic properties
2018-05-08 20:25:39 -04:00