Paweł Tomulik
24ddf9e739
revised tests for #9496
2023-03-13 06:07:19 +01:00
Paweł Tomulik
f61ffe4e27
Merge branch 'pvandommelen-issue-9496' into issue-9494-merged
2023-03-13 05:56:37 +01:00
Paweł Tomulik
1dfeaf8c06
add test for #9496
2023-03-13 05:43:18 +01:00
Peter van Dommelen
6bbcfb2429
Reuse the normal docblock-type parser when parsing type aliases instead of doing regex magic.
...
Fixes #9496 .
Also resolves an additional issue with comments after a type which does not contain brackets.
Includes a test for multiline types which did not yet exist.
2023-03-12 22:58:20 +01:00
orklah
47c482188d
Merge pull request #9474 from othercorey/missing-callmap-types
...
Add missing array, float, int and bool types to callmaps
2023-03-12 18:58:42 +01:00
Paweł Tomulik
b12ed07793
add test for #9496
2023-03-12 18:34:41 +01:00
Paweł Tomulik
388efaf85c
append commas to array items
2023-03-12 18:23:10 +01:00
Paweł Tomulik
fc402b1c95
add tests for #9433
2023-03-12 18:23:07 +01:00
Bruce Weirdan
d6daaa842e
Merge pull request #9479 from fluffycondor/json_throw_with_unescaped_unicode
2023-03-11 22:04:09 -04:00
Bruce Weirdan
46493ab358
Compare list generic params
...
So that `list<int>` does not accept `list{1, new stdClass}`
Fixes vimeo/psalm#9485
2023-03-11 05:23:49 -04:00
fluffycondor
7ba0f9798c
Fix test
2023-03-10 11:44:53 +06:00
fluffycondor
2abefb9618
Return a non-empty-string with JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE
2023-03-10 11:34:23 +06:00
Corey Taylor
e71e2edd3c
Add missing array, float, int and bool types to callmaps
2023-03-09 13:04:03 -06:00
Corey Taylor
ee77ca63e8
Fix remaining intl callmaps
2023-03-08 20:59:14 -06:00
Bruce Weirdan
193a0dbe0e
Don't crash on unary minus overflow
...
Fixes vimeo/psalm#9464
2023-03-07 12:29:40 -04:00
Corey Taylor
8bd2267060
Fix DOM callmaps
2023-03-06 04:33:59 -06:00
Peter van Dommelen
c72edefc9e
Do not strip the last )
bracket when parsing phpdoc type aliases.
...
Fixes https://github.com/vimeo/psalm/issues/6782
Reworked the regex logic to not check each grouping character separately. Removed the `^` character from the character list, which was likely unintended.
2023-03-05 22:28:22 +01:00
Bruce Weirdan
f801561ea7
Improce enum case reconciliation
...
Fixes vimeo/psalm#9456
2023-03-05 16:34:51 -04:00
Bruce Weirdan
9abd4285df
Use 8.2 in tests for 8.2 attributes
2023-03-03 04:39:04 -04:00
Bruce Weirdan
468dd1be4c
PHP 8.2 attributes moved to 8.2 stub
2023-03-03 04:28:37 -04:00
Bruce Weirdan
36913b13d5
Support for readonly
classes
2023-03-03 04:04:12 -04:00
Bruce Weirdan
7b8a0a61b9
Require <?php
tag in tests
...
This had me puzzled for some time on several occasions
2023-03-03 02:50:11 -04:00
Bruce Weirdan
98d96fbe9c
Forbid private final methods
...
Fixes vimeo/psalm#8374
2023-03-03 02:00:09 -04:00
Andrew Boyton
e8bd52eba6
Merge param descriptions when adding or updating types
2023-03-03 08:32:24 +11:00
Bruce Weirdan
839dc10da2
Merge pull request #9435 from vimeo/revert-9434-array_pop-is-impure
2023-03-01 01:48:26 -04:00
orklah
83051cfe87
Merge pull request #9291 from lptn/disableExtensions-hides-warnings
...
Do not display ext deprecation note when `disableExtensions` used
2023-03-01 00:06:59 +01:00
Bruce Weirdan
5130563d9f
Revert "array_pop
is impure"
2023-02-28 19:06:07 -04:00
Bruce Weirdan
007ffaecd8
array_pop
is impure
...
Fixes vimeo/psalm#9429
2023-02-28 18:53:36 -04:00
Alies Lapatsin
feb0cb8598
Merge branch 'master' into disableExtensions-hides-warnings
...
# Conflicts:
# src/Psalm/Config.php
2023-02-28 22:51:43 +01:00
Paweł Tomulik
68fc72e139
add unit test for #4460
2023-02-28 11:38:44 +01:00
orklah
e212b06970
Merge pull request #9420 from othercorey/iterator-spl-callmap
...
Fix remaining spl and iterator callmaps
2023-02-27 22:32:32 +01:00
Corey Taylor
879d9cd788
Fix remaining spl and iterator callmaps
2023-02-27 15:23:48 -06:00
orklah
99b598716d
Merge pull request #9422 from EgorBakulin/#9411/concat-should-never-remove-non-empty-non-falsy-from-string
...
concat should never remove non empty non falsy from string #9411
2023-02-27 18:49:24 +01:00
ebakulin
a9b9d386a9
added testcases with undefined constant concatination
2023-02-27 22:00:36 +07:00
Paweł Tomulik
ee032d4ca9
add unit tests for #9401
2023-02-27 00:07:00 +01:00
Evan Shaw
f7eaa5daec
Preserve PossiblyUndefinedVariable when fixing UnusedVariable
2023-02-25 20:08:01 +13:00
Bruce Weirdan
caac14c4a4
Consistently report docblock issues on all classlikes
...
Fixes vimeo/psalm#9365
2023-02-24 03:31:00 -04:00
Bruce Weirdan
5f59f07163
Allow array
as magic method name
...
Fixes vimeo/psalm#9321
2023-02-24 02:23:09 -04:00
Bruce Weirdan
3f52ded9c3
Correctly process use aliases in @psalm-scope-this
...
Fixes vimeo/psalm#9386
2023-02-24 00:53:36 -04:00
Corey Taylor
74a67a0416
Update Phar callmaps
2023-02-23 21:02:24 -06:00
Bruce Weirdan
2315c98a73
Merge pull request #9381 from weirdan/enforce-literal-string-length-limit
2023-02-23 16:47:53 -04:00
Yannick Gottschalk
f026226aa3
Fixes #9384
2023-02-23 17:23:46 +01:00
Bruce Weirdan
f4e66a0fbf
Add test
2023-02-23 04:01:29 -04:00
Bruce Weirdan
e96a929451
Merge pull request #9383 from weirdan/process-psalm-api-on-methods
2023-02-23 04:00:42 -04:00
Bruce Weirdan
2e90cb6c6a
Process @psalm-api
tags on methods
2023-02-23 03:52:10 -04:00
Bruce Weirdan
d0a14005a8
Merge pull request #9380 from weirdan/array-in-foreach-is-not-empty
2023-02-23 02:20:46 -04:00
Bruce Weirdan
1769f8b9a4
Refine arrays in foreach
loops to non-empty-array
...
Fixes vimeo/psalm#9378
2023-02-22 20:44:50 -04:00
Javier Sanahuja
4f83324a91
Support sizeof alias of count
2023-02-22 23:11:10 +01:00
Ulrich Eckhardt
4596301290
FFI Stubs: Define a set of tests.
...
Mostly, those are derived from examples from the documentation.
2023-02-21 23:08:58 +01:00
Bruce Weirdan
c46eccda76
Merge pull request #9358 from weirdan/revert-8761
2023-02-21 02:57:53 -04:00