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

11373 Commits

Author SHA1 Message Date
orklah
6d450036ad
Merge pull request #8000 from discordier/hotfix/update-property-map
update property map
2022-07-06 20:44:29 +02:00
Christian Schiffler
8ffab5eada Remove now obsolete casts 2022-07-06 08:59:19 +02:00
Christian Schiffler
ea9903a2c6 Fix variable annotation 2022-07-06 08:59:07 +02:00
Christian Schiffler
8e05adb8d4 Regenerate property map file 2022-07-04 11:40:54 +02:00
Christian Schiffler
a8f2b2b85a Skip sub directories when parsing stubs
We now have the extensions in a sub directory and therefore have to skip
that one.
2022-07-04 11:36:32 +02:00
Christian Schiffler
ce4ba69e70 Add missing properties to stubs/Reflection.phpstub
This should fix the now failing tests as the properties got removed from
the autogenerated property map.
2022-07-04 11:14:34 +02:00
Christian Schiffler
631936c678 Skip classes in stub files when generating property map 2022-06-29 09:23:45 +02:00
Christian Schiffler
9cb9b1ef9e Do not convert the file list to array 2022-06-29 09:23:45 +02:00
Christian Schiffler
6305c21b5b Remove now obsolete loop
The class names in property map are now always lowercase
2022-06-29 09:23:45 +02:00
Christian Schiffler
5fd2090526 Add update script and update property map
See #7983
2022-06-29 09:23:45 +02:00
Christian Schiffler
c65e6e817b Sort PropertyMap by keys
We need a defined, reproducible starting point.
2022-06-29 09:23:45 +02:00
orklah
fbd240b6b6
Merge pull request #8191 from Nicelocal/fix_namespace
Fix namespace of test
2022-06-28 18:32:01 +02:00
4bd5ca7e6f
Fix 2022-06-28 15:46:30 +02:00
367b311021
Fix namespace of test 2022-06-28 15:42:32 +02:00
orklah
7dff408b25
Merge pull request #8077 from boesing/bugfix/5657
Feature: allow non-union assertion types
2022-06-27 20:55:37 +02:00
orklah
47d83093c3
Merge pull request #8181 from Nicelocal/avoid_reparsing
Avoid re-parsing template types
2022-06-27 19:14:43 +02:00
Maximilian Bösing
df927d076d
qa: drop unnecessary ensure_source_equality check
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2022-06-27 18:19:34 +02:00
38089ebec3
Avoid re-parsing template types 2022-06-27 11:38:17 +02:00
orklah
8b7bc07ad6
Merge pull request #8155 from Nicelocal/prohibition_analyzer_clone
Run method call prohibition analyzer when cloning
2022-06-25 01:31:00 +02:00
orklah
f2f211c1ab
Merge pull request #8150 from muglug/track-taints-in-static-properties
Track taints in static properties
2022-06-24 18:33:41 +02:00
7a5120c4f7
Run method call prohibition analyzer when cloning 2022-06-24 12:37:33 +02:00
Matt Brown
7be32f2020 Remove unused use 2022-06-23 21:30:12 -04:00
Matt Brown
e6c444410c Remove debug code 2022-06-23 18:03:33 -04:00
Matt Brown
15387d19cd Track taints in static properties 2022-06-23 16:43:42 -04:00
orklah
cbc597f80c
Merge pull request #8140 from AndrolGenhald/stubs-dom-simplexml
Update DOM stub and add separate SimpleXML stub
2022-06-22 18:52:45 +02:00
AndrolGenhald
4e3c2ea4d0 Fix tests. 2022-06-22 01:53:42 -05:00
AndrolGenhald
79603820d8 Fix SimpleXMLIterator::current() return type. 2022-06-22 01:38:58 -05:00
AndrolGenhald
c0de59c943 Add simplexml stub. 2022-06-22 01:15:43 -05:00
AndrolGenhald
ea987697dc Update DOM stub. 2022-06-22 00:44:19 -05:00
orklah
29a21624f6
Merge pull request #8135 from ThomasLandauer/patch-1
PossiblyNullArgument: Adding common problem cases and possible solutions
2022-06-21 23:04:15 +02:00
Thomas Landauer
3bca297fba
Bringing back <?php 2022-06-21 22:45:45 +02:00
Thomas Landauer
80bcc8b5e3
Improving second link too :-) 2022-06-21 21:55:32 +02:00
Matt Brown
710768e496 Remove comma 2022-06-21 14:59:01 -04:00
Thomas Landauer
7201f0941b
Improving link syntax 2022-06-21 20:56:20 +02:00
Thomas Landauer
fd2683fcc6
Adding common problem cases and possible solutions
See https://github.com/vimeo/psalm/issues/8133#issuecomment-1162010190

Don't know if this is the best way to explain this, but it's a start :-)

Is there a better way to add the link to https://psalm.dev/docs/annotating_code/supported_annotations/#psalm-mutation-free ?

I also removed the `<?php` tag from the code block.
2022-06-21 20:23:23 +02:00
Matt Brown
6fa0da9e37 Fix minor taint analysis bug with nested array assignment 2022-06-21 12:42:32 -04:00
orklah
10ea05a5a3
Merge pull request #8102 from bitwise-operators/8096-createFromInterface-return-type
Change return type of createFromInterface() on DateTime and DateTimeImmutable to static
2022-06-13 23:05:15 +02:00
orklah
eb1ef40bb6
Merge pull request #8098 from Nicelocal/fix_parameter_storage_corruption
Fix nasty parameter storage corruption bug
2022-06-13 21:19:48 +02:00
Bitwise Operators
651ad6cb50 release:fix: Change return type of createFromInterface() methods on DateTime and DateTimeImmutable to 'static' so extending classes are recognized. 2022-06-13 14:41:02 +02:00
f8724761b3
Fix parameter storage corruption 2022-06-13 10:28:33 +02:00
Maximilian Bösing
0d96766640
bugfix: single does not mean that only one single atomic type is stored within a union
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2022-06-12 19:39:13 +02:00
Maximilian Bösing
3fd7a8b6d7
qa: refactor code to avoid too many nesting levels
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2022-06-12 19:27:54 +02:00
Maximilian Bösing
7e033d8051
bugfix: do not extend the type - only narrow down
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2022-06-12 19:20:38 +02:00
orklah
c74b2fcc1c
Merge pull request #8080 from zoonru/fix_reflection_aliases
Skip native classlike aliases
2022-06-12 10:03:26 +02:00
Maximilian Bösing
ed1bb8a9a6
bugfix: in case the old type is already more accurate than the new type, do not consider the new type as a replacement
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2022-06-12 03:35:59 +02:00
Maximilian Bösing
02d4f0c614
feature: add more accurate equals checks for TLiteralFloat, TLiteralInt and TLiteralString
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2022-06-12 03:34:45 +02:00
Maximilian Bösing
92b4bf1f01
qa: use dedicated variable for asserting a specific value
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2022-06-12 02:58:08 +02:00
Maximilian Bösing
083da24551
qa: add more specific unit test(s) for the oneOf detection
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2022-06-12 02:53:04 +02:00
Maximilian Bösing
6a73fbd1d2
bugfix: tighten the detection of types which narrow down other types
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2022-06-12 02:51:36 +02:00
Maximilian Bösing
4068f5cbb0
feature: add Union#allFloatLiterals as it was missing
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2022-06-12 02:50:48 +02:00