Andrew Nagy
24b6a97891
use in-memory cache thanks @ging-dev, remove pnctl fork
2023-03-02 18:45:23 +00:00
Andrew Nagy
0e4b878cbe
fix outstanding issues
2023-03-02 18:14:20 +00:00
Andrew Nagy
7e9638b729
Merge branch 'master' of https://github.com/vimeo/psalm into feature/upgrade-lsp-v5
2023-03-02 18:10:13 +00:00
Andrew Nagy
3467816900
fix
2023-03-02 18:07:50 +00:00
Andrew Nagy
5eed370fa5
fix outstanding CI issues
2023-03-02 18:02:23 +00:00
Andrew Nagy
2efd9c81e0
bump to 5.7.7
2023-03-02 17:05:12 +00:00
Andrew Nagy
6e109aadce
Merge tag '5.7.7' of https://github.com/vimeo/psalm into feature/upgrade-lsp-v5
2023-03-02 17:04:33 +00: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
fcb96f10c2
Fix default for ibm_db2
ext, add description
2023-02-28 23:05:47 +01: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
78e6545d7f
fix #4460
2023-02-28 11:38:47 +01: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
67d26d3c51
added case with literal string
2023-02-28 00:22:34 +07:00
ebakulin
cf35b3ce0c
reworked one known operand case
2023-02-28 00:12:18 +07:00
ebakulin
31fcbd5f69
added case with one null type
2023-02-27 22:03:01 +07:00
Paweł Tomulik
69c5fd69f3
fixed #9401
2023-02-27 00:07:58 +01:00
Bruce Weirdan
e743cd9e8d
Taint map is non-empty as well
2023-02-26 03:17:13 -04:00
Bruce Weirdan
6811547707
Callmap is always non-empty
...
Fixes several baselined issues
2023-02-26 02:45:46 -04:00
Alies Lapatsin
c23cb4bdf0
Merge branch 'master' into php83-dic
2023-02-25 11:14:00 +01:00
Alies Lapatsin
02de61eabe
Update PHP_MINOR_VERSION
2023-02-25 11:13:04 +01:00
Bruce Weirdan
6ac2b8d5a8
Merge pull request #9400 from edsrzf/psalter-possibly-undefined
2023-02-25 04:26:56 -04:00
Evan Shaw
f7eaa5daec
Preserve PossiblyUndefinedVariable when fixing UnusedVariable
2023-02-25 20:08:01 +13:00
Bruce Weirdan
99a69b463c
Merge pull request #9398 from gndk/grpc-extension
2023-02-24 22:21:28 -04:00
gndk
fd2b439e6f
Only disable grpc extension if it is not properly configured
2023-02-25 02:46:56 +01:00
Bruce Weirdan
59e549d2e8
Merge branch '5.7.x' into master
2023-02-24 21:19:43 -04:00
Bruce Weirdan
38d1abc13a
Don't crash on empty jit_buffer_size
...
Fixes vimeo/psalm#9396
2023-02-24 20:38:15 -04:00
Javier Spagnoletti
ab13ddf286
[ibm_db2] Improve return type inference for db2_autocommit()
2023-02-24 19:53:42 -03:00
Bruce Weirdan
682943423e
Merge branch '5.7.x' into master
2023-02-24 15:54:48 -04: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
Bruce Weirdan
ea32d203b6
Disable opcache.preload
if it's enabled
...
Fixes vimeo/psalm#9382
Also reorganized the opcache settings check a bit and enforced
`opcache.jit_buffer_size`
2023-02-23 22:17:23 -04: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
5dec7f3dc3
Enforce literal string length limit
...
Fixes vimeo/psalm#9376
Ensures:
* that we never have a literal string exceeding the length limit
* that we call string interpreter for all literal strings
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
a26d3edb73
Fix newly found issue
2023-02-22 21:16:33 -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
bf56db7623
Fixes
2023-02-23 01:40:30 +01:00
Javier Sanahuja
aee3665014
Fixes
2023-02-22 23:55:27 +01:00
Javier Sanahuja
fa39366cb4
Code style fix
2023-02-22 23:19:47 +01:00
Javier Sanahuja
4f83324a91
Support sizeof alias of count
2023-02-22 23:11:10 +01:00
Alies Lapatsin
e6bcd054b1
Merge branch 'master' into simplify-shepherd
2023-02-22 02:55:40 +01:00
f665e719fb
Describe changes
2023-02-21 15:44:18 +01:00
Alies Lapatsin
df00fd17fc
Fix coding style issues
2023-02-21 12:49:19 +01:00
Alies Lapatsin
609c426133
Add DeprecatedMethod suppression
2023-02-21 12:40:23 +01:00
Alies Lapatsin
46c486b271
Fix output formatting
2023-02-21 12:16:11 +01:00
Alies Lapatsin
124569c8ef
Display debug info for all error responses
2023-02-21 12:13:52 +01:00
Alies Lapatsin
cabeb5b983
Bypass output overlap
...
like:
Shepherd error: https://custom-host.shepherd/hooks/psalm endpoint responded with 0 HTTP status code.
array (
Shepherd response: n/a
'url' => 'https://custom-host.shepherd/hooks/psalm ',
Please check shepherd endpoint — it should be a valid URL. cURL Debug info:
'content_type' => NULL,
'http_code' => 0,
'header_size' => 0,
'request_size' => 0,
'filetime' => -1,
'ssl_verify_result' => 0,
'redirect_count' => 0,
'total_time' => 0.025202,
'namelookup_time' => 0.0,
'connect_time' => 0.0,
'pretransfer_time' => 0.0,
'size_upload' => 0.0,
'size_download' => 0.0,
'speed_download' => 0.0,
'speed_upload' => 0.0,
'download_content_length' => -1.0,
'upload_content_length' => -1.0,
'starttransfer_time' => 0.0,
'redirect_time' => 0.0,
'redirect_url' => '',
'primary_ip' => '',
'certinfo' =>
array (
),
'primary_port' => 0,
'local_ip' => '',
'local_port' => 0,
'http_version' => 0,
'protocol' => 0,
'ssl_verifyresult' => 0,
'scheme' => '',
'appconnect_time_us' => 0,
'connect_time_us' => 0,
'namelookup_time_us' => 0,
'pretransfer_time_us' => 0,
'redirect_time_us' => 0,
'starttransfer_time_us' => 0,
'total_time_us' => 25202,
'effective_method' => 'POST',
)
2023-02-21 12:04:18 +01:00
Alies Lapatsin
6603d84dfb
Display debuging info for a 0 cURL HTTP status response
2023-02-21 11:56:57 +01:00
Alies Lapatsin
66ce363431
Prepend URL scheme for th legacy host
2023-02-21 11:13:20 +01:00
Alies Lapatsin
b78472c752
Display $endpoint on error message (simplify debugging)
2023-02-21 10:59:31 +01:00
575da79801
Fix #9363
2023-02-21 10:09:58 +01:00
Alies Lapatsin
6ba9b1bb17
Merge branch 'master' into simplify-shepherd
2023-02-21 09:30:21 +01: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
Bruce Weirdan
471a8c6a1d
Merge pull request #9354 from othercorey/fix-php74
2023-02-20 18:34:36 -04:00
Corey Taylor
c23de496cf
Replace use of DOMParentNode::append() with appendChild()
2023-02-20 14:45:04 -06:00
88a3d288de
Workaround arm64 opcache bug ( fixes #9350 )
2023-02-20 12:49:59 +01:00
Alies Lapatsin
547dfb4237
Merge branch 'master' into simplify-shepherd
2023-02-20 10:52:02 +01: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
1b0f322bc7
Fix PsalmRestarter::restart()
signature
...
XdebugHandler v2 did not have the param type hint
Fixes vimeo/psalm#9345
2023-02-19 20:38:03 -04:00
5df21fe448
Always use 0x7FFEBFFF opcache optimization level ( fixes #9340 )
2023-02-19 16:57:23 +01:00
Evan Shaw
a25fe35584
Negated is_numeric narrows scalar type
2023-02-19 22:38:34 +13: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
Evan Shaw
c8393bd50d
Fix language server first-class callable crashes
2023-02-19 14:18:17 +13:00
Bruce Weirdan
5fe902bde5
Merge pull request #9326 from vimeo/prevent-jit-warnings
2023-02-18 18:22:59 -04:00
Gregor Harlan
80e781315a
RedundantCast
2023-02-18 12:58:40 +01:00
Bruce Weirdan
4f22c2e7c6
Propagate phantom classes to closure context
...
Fixes vimeo/psalm#9317
2023-02-18 01:52:10 -04:00
Bruce Weirdan
4d871fd241
Disable JIT-incompatible extensions to prevent warnings
...
This also enables JIT for `psalter` and syncs the list of disabled
extensions between `psalm`, `psalter` and `psalm-language-server`
2023-02-17 15:32:37 -04:00
Alies Lapatsin
d805f80f95
Merge branch 'master' into simplify-shepherd
2023-02-16 11:12:24 +01: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
cd5b743d6b
Fix newly found issues
2023-02-15 22:18:30 -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
Bruce Weirdan
01911a06b7
Deprecate FunctionLikeStorage::$unused_docblock_params
...
Refs vimeo/psalm#3166
2023-02-15 21:29:20 -04:00
Bruce Weirdan
ee823619b8
Flag direct constructor calls
...
Fixes vimeo/psalm#2975
2023-02-15 20:14:00 -04:00
Alies Lapatsin
9e9629c474
Fix check for supported php-ext
2023-02-15 22:34:06 +01:00
Alies Lapatsin
4da3252886
Merge branch 'master' into disableExtensions-hides-warnings
2023-02-15 22:01:38 +01:00
Bruce Weirdan
c28d96e25c
Fixed issue message for missing @psalm-external-mutation-free
...
Fixes vimeo/psalm#8604
2023-02-15 03:58:50 -04:00
Bruce Weirdan
2bb590feb6
Allow suppressing MissingThrowsDocblock
for individual exceptions
...
Fixes vimeo/psalm#8638
2023-02-15 03:29:02 -04:00
Bruce Weirdan
8c491e93e8
Flag class constant references where LHS is ordinary string
...
Fixes vimeo/psalm#2185
2023-02-15 02:57:00 -04:00
Bruce Weirdan
3f2ecaec7e
Allow @var
annotations on global vars
...
The actual code was extracted from `StaticAnalyzer`
Fixes vimeo/psalm#1111
2023-02-15 01:20:03 -04:00
Bruce Weirdan
1ab02125b0
Added issue type and psalm.dev link to Emacs report
...
Fixes vimeo/psalm#8331
2023-02-14 21:19:29 -04:00
Alies Lapatsin
766d1487a9
Merge branch 'master' into disableExtensions-hides-warnings
2023-02-14 20:53:54 +01:00
Alies Lapatsin
f1e04f2dc3
Reorganize Shepherd logic to improve redability and support custom endpoint
2023-02-14 20:01:37 +01:00
Alies Lapatsin
cfa4450394
Do not display ext deprecation note when disableExtensions used
...
Fixes #8958
2023-02-14 12:34:49 +01:00
Bruce Weirdan
39c992c255
Emit issues for calls to is_a(string, class-string, false)
...
Fixes vimeo/psalm#4092
2023-02-14 02:25:46 -04:00
Bruce Weirdan
cee90fc071
Compare enum cases thoroughly
...
Fixes vimeo/psalm#7814
2023-02-13 22:39:33 -04:00
b54cefe33f
Emit warning if the opcache cannot be installed or JIT cannot be used
2023-02-13 18:32:54 -04:00
Bruce Weirdan
873d79c5d7
Forbid overriding built-in enum methods
...
Fixes vimeo/psalm#9274
2023-02-13 00:37:59 -04:00
Bruce Weirdan
08f5b3592e
Merge pull request #9265 from weirdan/fix-opcache-loaded-twice
2023-02-12 22:42:44 -04:00
Bruce Weirdan
085e8f6fb2
Forbid implementing some interfaces
...
- `Throwable` can only be implemented when classes extend one of
`Exception` or `Error`
- `UnitEnum` and `BackedEnum` cannot be implemented by user-defined
classes
Refs vimeo/psalm#7722
2023-02-12 02:48:50 -04:00
orklah
93267f298b
Merge pull request #9253 from kkmuffme/fix-lstat-bug-when-removing-cache-dir
...
fix lstat bug cache directory race condition
2023-02-11 12:24:00 +01:00
Bruce Weirdan
528ac003ce
Do not try tweaking JIT if it's not available
2023-02-11 07:04:17 -04:00