Matt Brown
542fa77896
Remove unused use
2021-06-10 12:59:37 -04:00
Matt Brown
5c1d8489da
Improve test cases
2021-06-10 12:57:13 -04:00
Matt Brown
34c1f9dccf
Nest conditional for more accurate flow
2021-06-10 12:52:23 -04:00
Matt Brown
a6d79fd409
Clean up more unused return values
2021-06-10 12:23:53 -04:00
Matt Brown
8509999f3f
Remove some unused return values
2021-06-10 12:09:46 -04:00
Matthew Brown
e5a7478b38
Fix order
2021-06-10 09:07:15 -04:00
Matt Brown
f5bc841295
Prevent nested literal coercion
2021-06-09 16:01:45 -04:00
Matthew Brown
d12cf88e83
Add back supported for templated index assignment
2021-06-09 12:55:37 -04:00
Matthew Brown
0a7d254689
Fix #5911 - improve non-terminating switch type inference
2021-06-09 09:06:23 -04:00
Bruce Weirdan
6abce3525a
Enforce use
sort ( #5900 )
2021-06-07 22:55:21 -04:00
Christer Edvartsen
3f0de269ee
Update signatures according to the PHP manual ( #5904 )
...
* Update signatures according to the PHP manual (#5903 )
* Fix return type based on php-src
2021-06-07 13:20:32 -04:00
Bruce Weirdan
5bfb841072
Prevent crashes when class constant references missing class ( #5902 )
...
Fixes vimeo/psalm#5861
2021-06-07 13:20:07 -04:00
Bruce Weirdan
689315b05f
Fix sscanf()
signature ( #5901 )
...
Fixes vimeo/psalm#5870
2021-06-07 13:19:17 -04:00
Matthew Brown
7301e3a35f
Fix redundant cast
2021-06-07 13:19:00 -04:00
Bruce Weirdan
80e8d40013
Deprecate legacy hook interfaces ( #5898 )
...
Refs vimeo/psalm#4700
2021-06-07 10:46:56 -04:00
Bruce Weirdan
86050df4d0
Formally deprecate allowCoercionFromStringToClassConst
( #5897 )
...
* Mark allowCoercionFromStringToClassConst as deprecated in xml schema
* Emit deprecation warning for `allowCoercionFromStringToClassConst`
2021-06-07 10:46:26 -04:00
Bruce Weirdan
a5080f2cf6
Do not provide mixed return type on unrelated methods ( #5895 )
...
Fixes vimeo/psalm#5894
2021-06-07 10:45:43 -04:00
Andrey Klimenko
3ad3375777
Fix generic destruction in assertion ( #5888 )
2021-06-04 15:33:37 -04:00
Bruce Weirdan
a4871c1ef8
Provide stricter types for spl_autoload functions ( #5885 )
2021-06-04 15:33:12 -04:00
Oliver Hader
e457a7d5af
[FEATURE] Allow plugins to declare their custom scanner or analyzer ( #5883 )
...
* [FEATURE] Allow plugins to declare their custom scanner or analyzer
Related: #5882
* [TEST] Check plugin declaring own scanner/analyzer
* [TASK] Document plugins declaring scanner or analyzer
* [TEST] Clean up code
* [!!!][TASK] Extend Psalm\Plugin\RegistrationInterface
* add method `addFileTypeScanner(string $fileExtension, string $className): void`
* add method `addFileTypeAnalyzer(string $fileExtension, string $className): void`
* [TASK] Ignore IntelliJ/PhpStorm workspace folder in VCS
* [TASK] Remove superfluous class import
2021-06-04 15:32:53 -04:00
Matt Brown
b33f87f68d
Treat all assignment operations as equivalent binary ops
2021-06-04 14:39:38 -04:00
Matt Brown
be254efec6
Break out tests for readonly properties
2021-06-04 13:37:03 -04:00
Andrey Klimenko
e5e397a6c5
Type negation in generic context ( #5879 )
...
* Type negation in generic context
* Fix cs
2021-06-03 01:06:25 -04:00
Matthew Brown
1a2e761918
Remove incorrectly-committed code
2021-06-02 17:26:40 -04:00
Matthew Brown
577ae090c4
Bump LS memory to Psalm’s
2021-06-02 10:49:04 -04:00
Barney Laurance
e0eb8f88e5
Apply De Morgan's to output copy ( #5872 )
2021-06-02 06:32:50 -04:00
Matt Brown
f3fc112bae
Fix #4523 - fix short-circuiting for properties and method calls
2021-06-01 16:06:12 -04:00
Fran Moreno
76225e54f6
Make toPHP second parameter optional ( #5864 )
2021-06-01 11:24:13 -04:00
kesselb
36d670b955
Add false as return value for mb_convert_encoding ( #5862 )
2021-05-31 22:24:34 -04:00
Bruce Weirdan
448534fd7c
Cli command classes ( #5858 )
...
* Move psalm entry-point to a Cli command class
* Moved psalter to the CLI command class
* Moved psalm-language-server to the CLI command class
* Moved psalm-refactor to the CLI command class
* Moved psalm_plugin to the CLI command class
* Use CLI commands directly and deprecate trampolines
* Require CLI commands directly and don't use trampolines
* Announce isAbsolutePath() removal
* Deprecate \Psalm\requireAutoloaders() function
* Deprecate \Psalm\getVendorDir() function
* Deprecate Psalm\getArguments() function
* Deprecate \Psalm\getPathsToCheck() function
* Deprecate \Psalm\getPsalmHelpText() function
* Deprecate \Psalm\initialiseConfig() function
* Deprecate Psalm\update_config_file() function
* Deprecate \Psalm\get_path_to_config() function
* Deprecate Psalm\getMemoryLimitInBytes() function
* CS fix
* Untangle Psalm entrypoint
* Untangle Psalter entrypoint
* Drop command_functions.php references
* Adjust phar build
2021-05-31 22:23:54 -04:00
orklah
0e8ca1d852
fix wrong version used in psalter ( #5855 )
2021-05-28 18:49:12 -04:00
Bruce Weirdan
997ffcda4c
Add $filter
parameter to ReflectionClass::getConstants()
( #5847 )
...
Fixes vimeo/psalm#5837
2021-05-28 09:48:22 -04:00
Bruce Weirdan
e6607935a9
Encode control characters in literal strings ( #5846 )
...
Fixes vimeo/psalm#5733
2021-05-28 09:48:04 -04:00
Bruce Weirdan
c98b20247b
Flag unexpected tags on function docblocks ( #5845 )
...
* Flag unexpected tags on function docblocks
Fixes vimeo/psalm#5782
* Document new issue
* Fix spacing
Co-authored-by: Matthew Brown <github@muglug.com>
2021-05-28 09:47:39 -04:00
orklah
3bcfd2e726
allow psalter to add literal string/int in psalm phpdoc ( #5844 )
...
* allow psalter to add literal string/int in psalm phpdoc
* fix CS
2021-05-28 09:46:11 -04:00
Bruce Weirdan
0c77ccc238
Check whether constructor is internal on new
call ( #5843 )
...
Fixes vimeo/psalm#5841
2021-05-28 09:44:07 -04:00
Ian Dunn
2a5afe3d03
Docs: Correct beeing
typo ( #5840 )
2021-05-28 09:43:36 -04:00
orklah
276d355ebb
fix issue reporting when baseline already exists ( #5838 )
2021-05-28 09:43:15 -04:00
Oliver Hader
b259296457
[BUGFIX] Continue processing psalm-flow graph after first taint sink ( #5832 )
...
Related: #5830
2021-05-26 16:04:22 -04:00
Oliver Hader
4898cd262e
[TASK] Enrich taint details for outputting core stubs ( #5827 )
...
Affects `printf`, `print_r`, `var_dump`, `var_export`
2021-05-24 16:42:18 -04:00
Matt Brown
38c452ae58
Add example given in ticket and ensure that works too
2021-05-24 00:09:51 -04:00
Matt Brown
c258303f78
Fix test
2021-05-23 22:03:43 -04:00
Matt Brown
8f333337cb
Fix #5804 - don’t choke on conditional return types when converting to callables
2021-05-23 21:41:07 -04:00
orklah
67413c88f9
fix #5797 ( #5822 )
2021-05-23 19:12:02 -04:00
orklah
aaab522a98
update baseline and fix issues ( #5821 )
2021-05-23 16:49:46 -04:00
orklah
de1bb954cf
Handle the case where a switch return on each case ( #5819 )
...
* Handle the case where a switch return on each case
* introduce a "hybrid" case exit type for cases where there's both "none" and something else
2021-05-23 16:24:29 -04:00
Matt Brown
7354ec9903
Fix #5298 - improve handling of method that may write properties
2021-05-23 16:22:52 -04:00
orklah
350df114f3
Transform bad offsets ( #5817 )
...
* Transform bad offset access
* fix build
2021-05-23 14:43:30 -04:00
Matt Brown
d1262b0bec
Fix #5799 — improve expansion of templated types
2021-05-23 14:39:59 -04:00
orklah
89f815ff62
Add assertions for >=0 ( #5815 )
2021-05-23 14:24:15 -04:00