1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00
Commit Graph

5452 Commits

Author SHA1 Message Date
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
Corey Taylor
c62465ceef Fix several spl callmap methods 2023-02-20 22:30:21 -06:00
Bruce Weirdan
01c19d94ba
Added a bunch of tests from referenced issues 2023-02-20 23:45:01 -04:00
Bruce Weirdan
ac86981a79
Revert "#7387 Add asserting non-empty-string by strlen"
This reverts commit 0ef7ec100a.
2023-02-20 23:07:22 -04:00
Evan Shaw
a03299f3d0 Include setrawcookie as an impure function 2023-02-21 14:24:05 +13:00
Ismail Turan
bec8ddf525 fix (DateTime|DateTimeImmutable)::modify() return types
vimeo#9042 caused issues to any called method on an instance
of DateTime|DateTimeImmutable after calling the modify
method.

This fixes vimeo#9171
2023-02-20 08:47:05 +01:00
Bruce Weirdan
38cc316ce9
Update tests/TypeReconciliation/ConditionalTest.php 2023-02-19 06:02:12 -04:00
Evan Shaw
a25fe35584 Negated is_numeric narrows scalar type 2023-02-19 22:38:34 +13:00
Bruce Weirdan
863f15ab15
Merge pull request #9337 from weirdan/validate-test-environment 2023-02-19 04:35:11 -04:00
Bruce Weirdan
73bad8967d
Forbid first-class callables in new
It's an invalid construct in PHP, not rejected by PHPParser for some
reaason.

Fixes vimeo/psalm#9335
2023-02-19 04:18:32 -04:00
Bruce Weirdan
236c1a8ae5
Added the test to validate test environment itself
We should make sure that the environment the tests are run is as strict
as possible. For example, zend.assertions should be enabled.
2023-02-19 03:52:12 -04:00
Evan Shaw
d4a57c863c Enable store_node_types for all test cases 2023-02-19 19:52:45 +13:00
Evan Shaw
c8393bd50d Fix language server first-class callable crashes 2023-02-19 14:18:17 +13:00
Bruce Weirdan
4f22c2e7c6
Propagate phantom classes to closure context
Fixes vimeo/psalm#9317
2023-02-18 01:52:10 -04:00
Corey Taylor
e813a54d03 Skip verifying memcache extension callmap 2023-02-17 01:27:37 -06:00
Alies Lapatsin
2ddc54331d Merge branch 'master' into disableExtensions-hides-warnings 2023-02-16 10:55:38 +01:00
Bruce Weirdan
1c2bc49838
Forbid non-null defaults for callable parameters
Fixes vimeo/psalm#3284
2023-02-16 01:36:06 -04:00
Bruce Weirdan
f70f6517a7
Merge pull request #9314 from weirdan/flag-unused-docblock-params
Flag docblock parameters that have no counterparts in function signature
2023-02-15 22:31:41 -04:00
Bruce Weirdan
1e71da3799
Merge pull request #9309 from othercorey/fix-memcached-callmap 2023-02-15 22:24:39 -04:00
Bruce Weirdan
0e9f04c55d
Merge pull request #9313 from othercorey/allow-ignored-callmap 2023-02-15 22:23:02 -04:00
Bruce Weirdan
e6aa63731d
Flag docblock parameters that have no counterparts in function signature
Fixes vimeo/psalm#3166
2023-02-15 22:04:26 -04:00
Corey Taylor
0598402620 Skip verifying callmaps based on name pattern 2023-02-15 20:00:04 -06:00
Bruce Weirdan
ee823619b8
Flag direct constructor calls
Fixes vimeo/psalm#2975
2023-02-15 20:14:00 -04:00
Corey Taylor
ab77cfd490 Fix memcached extension callmap 2023-02-15 17:26:58 -06:00
Alies Lapatsin
4da3252886
Merge branch 'master' into disableExtensions-hides-warnings 2023-02-15 22:01:38 +01:00