1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-12 09:19:40 +01:00
Commit Graph

8237 Commits

Author SHA1 Message Date
Maximilian Bösing
2d9133b35a
bugfix: overriding types based on assertions have to pass more checks
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2022-06-12 00:32:36 +02:00
Maximilian Bösing
7c85e0c0d9
bugfix: only override templated values in case of literals
This will avoid issues with invalid intersection assertions.

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2022-06-11 23:30:52 +02:00
Maximilian Bösing
40971ff57d
bugfix: allow non-single union types in assertions
fixes #5657

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2022-06-09 00:26:34 +02:00
Matt Brown
a9775c656c Fix style 2022-06-08 16:03:27 -04:00
Matt Brown
6d09c3c794 Remove nonsensical taint analysis rule 2022-06-08 16:00:06 -04:00
Bruce Weirdan
fce4272226
PHP 7.4 fixes 2022-05-28 16:40:49 -04:00
Bruce Weirdan
5d21ff98b6
Suppress false posisitives 2022-05-28 16:34:53 -04:00
Bruce Weirdan
242ee344ec
CS fix 2022-05-28 16:26:08 -04:00
Bruce Weirdan
ff50516fbd
Post-merge fixes 2022-05-28 15:05:17 -04:00
Bruce Weirdan
e0acf22e40
Merge branch '4.x' into update-master 2022-05-28 14:49:12 -04:00
AndrolGenhald
6df50159a7 Fix trailing comma in parameter list for PHP 7.4. 2022-05-26 18:41:00 -05:00
AndrolGenhald
31b4dceaf4 Improve handling of unsupported references (fixes #8018). 2022-05-26 18:28:23 -05:00
orklah
06d8e3e399
Merge pull request #8011 from kkmuffme/performance-only-load-files-once
Performance only load files once
2022-05-26 18:03:08 +02:00
orklah
d94f56a88a
Merge pull request #8007 from kkmuffme/add-missing-igbinary-serialize-code
igbinary_serialize code was missing in file
2022-05-26 17:57:02 +02:00
kkmuffme
278e8777d9 dont strolower filename, since file names on linux are case sensitive 2022-05-25 14:12:15 +02:00
kkmuffme
06178d0a6b only load files once
* use static to keep opened files with content
* move position of file cache population to the place where we read files to ensure cache always gets populated and not on open only (since it's called directly in some places)
2022-05-25 13:53:32 +02:00
kkmuffme
5d8b5d197d micro-optimize condition
https://github.com/vimeo/psalm/pull/7997#pullrequestreview-983975049
2022-05-25 11:25:19 +02:00
kkmuffme
ed0db0f7ce igbinary_serialize code was missing in file 2022-05-25 10:52:41 +02:00
kkmuffme
acffb851f6 debug CI 2022-05-24 10:00:54 +02:00
kkmuffme
c1cef60e21 change cache hash type for better performance 2022-05-24 09:59:47 +02:00
AndrolGenhald
80e94daefb Fix class const issue when using floats declared in future consts (fixes #7973).
- Calculate literal type for float arithmetic instead of only for int arithmetic
 - Fix copy/paste fail causing InvalidConstantAssignmentValue to be marked as fixable
2022-05-20 14:46:05 -05:00
Jerome TAMARELLE
afed93b6bd Fix conflict of option -c with shell completion 2022-05-20 09:42:57 +02:00
Matt Brown
990887148c Fix #7968 - combine and simplify types where necessary in ternary analysis 2022-05-19 22:32:14 -04:00
Kevin van Sonsbeek
22080a1b15 bugfix/#7912: Added extension_loaded check for apcu and load internal stub on true 2022-05-17 23:45:42 +02:00
Theodore Brown
4eef964048 Infer object shape when array or scalar is cast to object
Also detect redundant object casts.

Fixes #7916, fixes #7934
2022-05-09 20:31:29 -05:00
Theodore Brown
6f3ceea7d0 Remove several unused use statements 2022-05-08 23:18:18 -05:00
Matt Brown
9c153de6da Fix LSP api discrepancies 2022-04-27 11:56:54 -04:00
Matt Brown
c260626ccd Fix style issues 2022-04-27 10:35:22 -04:00
Matt Brown
fccc366c1e Merge pull request #7887 from ging-dev/lsp-fixes
improve LSP
2022-04-27 10:13:17 -04:00
Matt Brown
84598077f8 better type safety and inference 2022-04-27 01:51:23 -04:00
Matt Brown
5b91506926 cache statements even without persistent parser cache 2022-04-27 01:50:13 -04:00
Matt Brown
d064d9fc6c Add test 2022-04-27 01:47:02 -04:00
Matt Brown
2ef993928c Document @psalm-ignore-variable-* 2022-04-27 01:46:13 -04:00
Matt Brown
a9e3c1fdc1 Fix namespaced min/max int range keyword issue introduced in #7775. 2022-04-27 01:44:57 -04:00
Matt Brown
20351c6667 Avoid json_encode when serializing non-UTF8 literals
`\Psalm\Internal\Clause::$hash` basically holds a hash on
arbitrary input literals, used for later comparison. Using
`json_encode` fails when dealing with non-UTF8 literals,
which has been replaced by plain PHP `serialize`.

Resolves: #7771
2022-04-27 01:42:37 -04:00
Matt Brown
043bbfbbb4 Remove useless array casting as CallMap for stream_select is reset. 2022-04-27 01:40:51 -04:00
Matt Brown
890375d908 Cast the read streams to an array while looping over as it can be NULL. 2022-04-27 01:39:30 -04:00
Matt Brown
d0524c2418 Forbid min bound greater than max bound in int range 2022-04-27 01:38:21 -04:00
Matt Brown
9cc2af56b4 Support Stringable before PhpToken autoloading 2022-04-27 01:36:17 -04:00
Matt Brown
d58736a550 fix #7747: DateInterval::createFromDateString can be false 2022-04-27 01:32:38 -04:00
orklah
038947eb08
Merge pull request #7887 from ging-dev/lsp-fixes
improve LSP
2022-04-26 22:23:00 +02:00
m1ke
70b44d566f Alter order of baseline option operations to allow updating custom baseline 2022-04-26 14:35:33 +01:00
ging-dev
cb10e845e0
improve LSP 2022-04-25 17:43:23 +07:00
orklah
2724c1dba9
Merge pull request #7872 from hirokinoue/float-template-arithmetics-4.x
don't emit issues when doing arithmetics on float templates
2022-04-19 19:35:57 +02:00
Vitaliy Ognev
6afdb0d9b6 better type safety and inference 2022-04-18 21:00:20 +03:00
Vitaliy Ognev
1dc2b3b026 cache statements even without persistent parser cache 2022-04-18 10:26:56 +03:00
hirokinoue
b132c3b751 fix error message 2022-04-16 14:05:40 +09:00
hirokinoue
a99532da5e code format 2022-04-16 14:05:31 +09:00
hirokinoue
23c3d87dcc don't emit issues when doing arithmetics on float templates 2022-04-16 14:05:20 +09:00
Anton Belyaev
e7c2c77ec2 Disable filepath formatting as a link for Drone CI's output 2022-04-11 23:19:55 +03:00