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
orklah
af1888b631
Merge remote-tracking branch 'upstream/4.x' into upstream-master4
2022-01-22 17:48:42 +01:00
orklah
52a7f0694e
drop compatibility aliases
2022-01-19 19:29:16 +01: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
Matthew Brown
b419c299e3
Use InvalidScalarArgument only when we can be sure PHP attempts coercion
2022-01-02 14:56:18 +02:00
rarila
97e6511fab
Set number of lines before and after namespace.
2021-12-15 04:58:32 +01:00
ralila
711be643c6
Import instead of using fqn exceptions
2021-12-03 20:29:06 +01:00
ralila
245920e53c
Import instead of using fqn
2021-12-03 20:11:20 +01:00
Bruce Weirdan
6abce3525a
Enforce use
sort ( #5900 )
2021-06-07 22:55:21 -04:00
Vincent Langlet
a80d5b736b
Rename stub to avoid phpstorm conflict ( #5213 )
2021-02-13 18:42:34 -05:00
orklah
1d9987e0ed
fix phpdoc ( #4905 )
2020-12-29 11:42:41 +00:00
Matt Brown
6ad5e1c013
Fix #4264 - prevent crash when analysing file with duplicate classes
2020-10-01 15:07:25 -04:00
orklah
ead107fa9e
More return types ( #4173 )
...
* add native return types
* redundant phpdoc
2020-09-12 11:24:05 -04:00
Brown
295adb5763
Fix #3860 - use correct trait element positions for nested error
2020-07-21 14:17:07 -04:00
Matthew Brown
edb2b4c5ef
Get type of requires
2020-06-13 15:48:12 -04:00
Philip Hofstetter
d315822bfa
make skipping of checks after invalid includes configurable
...
as suggested in the PR it's best to make the setting configurable.
In order not to break existing installations, we default to keeping the
old behaviour, but in a later version of psalm, we might change the
default.
2020-02-27 18:49:23 -05:00
Philip Hofstetter
f2277ebb6d
don't disable checks when includes can't be resolved
...
Any unresolvable include (even suppressed ones) would lead to some
subsequent tests being disabled as a side-effect.
this fixes #2817
2020-02-27 18:49:23 -05:00
Brown
1208437b4c
Fix #1940 - allow proper evaluation of /a/b/../../
2019-07-12 14:28:21 -04:00
Matthew Brown
da42be175f
Apply PHPCS fixes
...
Fixes #1880
2019-07-05 16:27:53 -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
Brown
d75ac7f55d
Move test fixtures to a single directory
2019-05-09 18:23:14 -04:00
Brown
21b1c04c1d
Fix #1526 - ignore files if they weren’t picked up in scanning step
2019-04-03 10:43:48 -04:00
Matthew Brown
c772914910
Add some formatting
2019-03-23 14:27:54 -04:00
Matthew Brown
efbcf7dc5b
Fix #1417 - store root file path when scanning for manipulations
2019-03-02 15:07:26 -05:00
Bruce Weirdan
ec85096c96
Fixed identified issues
2019-03-02 08:43:19 -05:00
Matthew Brown
b43a6a31f1
Enable casing plugin and fix issues it found
2019-01-12 10:52:23 -05:00
Matthew Brown
4d79b61e93
Change _checker to _analyzer
2018-11-12 11:20:59 -05:00
Matthew Brown
4688b25fd9
Move internal classes to own namespace
2018-11-12 11:20:59 -05:00
Brown
67b114f3f7
Skip test broken by new scanning system
2018-10-15 09:16:11 -04:00
Matt Brown
dce8d14e1b
Fix syntax errors in tests
2018-09-17 12:15:45 -04:00
Matthew Brown
7c274431f0
Fix #975 - don’t check things at all when there’s a duplicate class
2018-09-04 21:22:05 -04:00
Matt Brown
b97972ebb3
Fix Psalm-found issues
2018-09-04 14:37:33 -04:00
Matt Brown
cbfebb7a69
Fix #971 - be more robust in face of duplicate classes
2018-09-04 14:34:14 -04:00
Matt Brown
f844f86a6c
Improve type coercion checks in strict mode
2018-08-28 17:42:39 -04:00
Matt Brown
0304201d91
Fix #932 - allow obvious string vars to be used for includes
2018-08-07 13:17:23 -04:00
Matthew Brown
fb3bc2661e
Fix #797 - check backup included file for defined function
2018-06-06 21:47:26 -04:00
Matthew Brown
55fdef250e
Add config to allow hoisting constants to the top of a file
2018-06-01 09:07:22 -04:00
Matthew Brown
72f65cf544
Fix global tests
2018-05-30 22:56:46 -04:00
Matthew Brown
6b8e019a07
Bleed global variables declared in functions into main context
2018-05-30 22:09:46 -04:00
Matt Brown
549e90eca4
Treat required files the same as the files that require them, reporting-wise
2018-05-30 16:19:18 -04:00
Matt Brown
1462020cd4
Properly analyse nested traits
2018-05-30 13:08:56 -04:00
Matt Brown
68dbe509a8
Fix #731 - report issues in files required by the source
2018-05-30 12:23:53 -04:00
Matthew Brown
c217849737
Improve handling of projects that use include/require heavily
2018-05-22 23:39:01 -04:00
Matthew Brown
3a77504730
Add test to find bad behaviour
2018-03-30 19:15:24 -04:00
Matthew Brown
3578c49bf2
Add test for #587
2018-03-17 15:02:25 -04:00
Matthew Brown
8e0998e081
Break apart the Codebase class
2018-02-03 18:56:54 -05:00
Matthew Brown
bc9761f6c9
Create Codebase out from ProjectChecker
2018-01-21 13:45:33 -05:00
Matthew Brown
e05a7c00cc
Break FileScanner out from FileChecker
2018-01-21 12:44:46 -05:00
Matt Brown
21eafd8bfc
Fix #352 with a mixed copout if the use is passed by reference
2018-01-12 12:33:26 -05:00