Bruce Weirdan
8fa35c2228
Variables should outlive namespaces ( #8779 )
...
Variables in PHP are not namespaced. In other words, namespaces share
the context with the file they are located in.
See https://3v4l.org/2qvrC
Fixes vimeo/psalm#8778
2022-11-27 10:45:40 -05:00
Bruce Weirdan
42b71f5eae
Switch from phpspec/prophecy
to mockery/mockery
...
It provides similar functionality, but is a bit more alive and does not
prevent installation with PHP 8.2
2022-11-24 21:20:21 -04: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
45452c7125
Immutable readonly 2
2022-10-03 14:02:41 +02:00
c2ce7e63da
Immutable readonly 1
2022-10-03 11:53:05 +02:00
Matthew Brown
da47f198ad
Remove reference
2022-03-07 14:59:11 -05:00
Matthew Brown
d17435252a
Remove unused class
2022-03-07 14:57:13 -05:00
Matthew Brown
9b69c7a089
Remove references to unused SqlStringProvider plugin
2022-03-07 14:54:35 -05:00
Bruce Weirdan
edddc87002
Merge branch '4.x' into upstream-master
2022-02-13 07:14:23 +02:00
Bruce Weirdan
45a19b3f3c
Honour global function suppressions for UndefinedFunction
...
Fixes vimeo/psalm#7610
2022-02-13 00:22:55 +02:00
orklah
fac55576ab
Merge remote-tracking branch 'upstream/4.x' into upstream-master7
2022-02-12 09:59:55 +01:00
orklah
24ae96b373
remove usage of totallyTyped internally
2022-02-12 09:51:06 +01: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
orklah
4609bc4e25
Merge pull request #7471 from klimick/function-dynamic-storage-provider
...
Function dynamic storage provider
2022-01-28 18:46:26 +01:00
orklah
2966f1c9d4
Merge pull request #7107 from AndrolGenhald/feature/5482-load-extensions-based-on-composer-config
...
Enable extensions based on composer.json instead of those loaded at runtime (fixes #5482 ).
2022-01-28 18:45:52 +01:00
AndrolGenhald
b473d812aa
Fix side effect when loading config.
2022-01-28 09:26:58 -06:00
adrew
70cea447c8
Fix CS
2022-01-28 15:18:30 +03:00
adrew
dd0e00e153
Renaming all occurrences of "function dynamic storage" to "dynamic function storage"
2022-01-28 15:18:30 +03:00
adrew
e5dae6a901
Prevent first-class-callable handling with FunctionDynamicStorageProvider
2022-01-28 15:18:30 +03:00
adrew
9b383a5a19
Try to create public api for new hook
2022-01-28 15:18:30 +03:00
adrew
aefe971b90
Fix template creation in ArrayMapStorageProvider
2022-01-28 15:18:30 +03:00
adrew
ce1cec5d3a
Using FuncCall instead of list<Arg> in FunctionDynamicStorageProvider for more flexibility
2022-01-28 15:18:30 +03:00
adrew
3210aab278
Test for FunctionDynamicStorageProvider
2022-01-28 15:18:29 +03:00
AndrolGenhald
c2b44ff073
Fix copy/paste fail and other psalm/cs issues, reduce duplication of literals.
2022-01-27 16:31:09 -06:00
AndrolGenhald
8132b57881
Add XML config options to enable/disable PHP extensions.
2022-01-27 16:31:05 -06:00
Matthew Brown
ac29afcfe4
Don’t expect config exception in test
2022-01-26 14:30:01 -05:00
AndrolGenhald
558208e44e
Add type checking for class const assignments, fix several other const issues.
2022-01-22 17:06:54 -06:00
orklah
0e891f25ad
refactor description of types in Atomic
2022-01-22 19:34:57 +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
orklah
477c0113c2
Merge remote-tracking branch 'upstream/4.x' into upstream-master3
2022-01-18 18:37:04 +01:00
Fabien Villepinte
c9eafa15ad
Improve signature of DOMDocument::loadXML()
2022-01-17 22:52:58 +00:00
orklah
b633619a2c
Merge remote-tracking branch 'upstream/4.x' into upstream-master
2022-01-14 21:01:25 +01:00
orklah
d52c3f0117
Merge pull request #7163 from dvz/explicit-symlink-resolution
...
Add explicit `resolveSymlinks` option for project directories
2022-01-10 21:50:08 +01:00
orklah
611583c481
Merge pull request #7354 from wouterj/issue-7353/issuehandlers-elements
...
Support multiple <issueHandlers> elements
2022-01-10 21:34:43 +01:00
Wouter de Jong
f92841f2df
Only pass existing paths to realpath()
...
`realpath()` returns `false` if the path does not exists. This caused
these tests to not test what they were expected to (due to `false` being
transformed into `""`, which never matches the project paths).
2022-01-09 14:23:48 +01:00
Wouter de Jong
e4e9edda27
Support multiple <issueHandlers> elements
...
This is likely to occur when including multiple Psalm config files.
2022-01-09 14:11:03 +01:00
Bruce Weirdan
1a1b5a9e6a
Merge branch '4.x' into upstream-master
2022-01-08 23:38:29 +02:00
Stefan Vetsch
7f2f0d99ec
Issue #7243 : Do not throw exception on xinclude with fallbacks
2022-01-07 09:40:19 +01:00
Bruce Weirdan
8726065d21
Applied ClosureToArrowFunctionRector
2022-01-06 00:48:04 +02:00
Bruce Weirdan
5758d31161
Apply literal number separator rector
...
I opted for customary 3-digit groups, except version id, where 2-digit
groups are used to match the version id encoding.
2022-01-05 01:00:05 +02:00
Bruce Weirdan
afa6497051
Dropped THtmlEscapedString
2022-01-03 22:48:59 +02:00
Bruce Weirdan
2e24a16cbb
Dropped legacy plugin API
2022-01-03 18:18:44 +02:00
Bruce Weirdan
966b6ae2b2
Merge pull request #6808 from orklah/exitFunctions3
2022-01-03 06:04:01 +02:00
orklah
b658b2738f
remove exitFunctions
2022-01-02 15:20:01 +02:00
orklah
8d6b781b3e
use consistent way to compare php version
2022-01-02 13:35:43 +02:00
Tomasz Mlynski
daaa74ce41
Merge branch 'master' into explicit-symlink-resolution
2021-12-22 18:42:55 +01:00
S.M. Ataur Rahman
e408abf119
Fixed ignoreTypeStats & useStrictTypes flag value detection for directories in config
2021-12-18 19:59:25 +06:00
rarila
97e6511fab
Set number of lines before and after namespace.
2021-12-15 04:58:32 +01:00