25be3c1d88
Fix
2023-12-08 12:48:46 +01:00
f980689d97
Fix iteration over weakmaps
2023-12-08 12:31:42 +01:00
9e535682c4
Merge remote-tracking branch 'origin/5.x' into HEAD
2023-11-27 11:54:44 +01:00
kkmuffme
fdbd9b133c
fix prefixed param and document it
2023-11-18 08:10:44 +01:00
kkmuffme
e9b0103c7f
fix prefix
2023-11-18 08:03:30 +01:00
kkmuffme
a040ad1228
update decimal stubs from documented URL
2023-11-16 09:31:30 +01:00
orklah
b3ef6a0bd7
Merge pull request #10351 from robchett/rdkafka_stubs
...
Add stubs for rdKafka
2023-11-09 20:21:56 +01:00
Grégoire Paris
ba17015dfb
Allow int keys when calling Redis methods
...
In 5bfc0f960b
, risky casting was invoked
as a way to show there is an issue here. However, it is not always
possible to use a string. For instance, there is no such thing as this
in PHP: ["1" => "whatever"]. If you try to create such an array, you
will obtain [1 => "whatever"] instead.
Ironically, this was copied in jetbrains/phpstorm, which is used in
PHPStan, which exhibited that false positive.
See https://github.com/JetBrains/phpstorm-stubs/pull/1454
2023-11-08 22:15:44 +01:00
robchett
3578b42e5c
Add stubs for rdKafka
...
Fixes #3406
2023-11-08 09:51:12 +00:00
orklah
b775d297bb
Merge pull request #10332 from braindawg/addZipExtensionStub
...
Stub constants for ZipArchive from ext-zip
2023-11-04 16:35:31 +01:00
orklah
be48d10ce0
Merge pull request #10340 from robchett/RecursiveArrayIterator_stub_correction
...
Fix stub for RecursiveArrayIterator::getChildren
2023-11-04 09:55:37 +01:00
robchett
f507838ba8
Fix some stub docblocks that were thowing parse errors
2023-11-03 21:41:48 +00:00
robchett
16c06b9dd4
Fix stub for RecursiveArrayIterator::getChildren
2023-11-03 21:41:28 +00:00
Brian Dunne
cfe57e9dbe
Fix redundant PHP tag in SOAP stub
2023-11-01 15:01:48 -05:00
Brian Dunne
349770f6d0
Add constants from SOAP extension to stub
...
The SOAP extension stub was missing some constants we used (really just
SOAP_1_1 and SOAP_1_2), so I thought I'd add the rest of the constants
declared by the extension to the stub. Values are all pulled straight
from the PHP docs.
2023-10-30 22:36:06 -05:00
Brian Dunne
d07b57576d
Stub constants for ZipArchive from ext-zip
...
This stubs out the class constants for ZipArchive, which I believe are
the only constants introduced by the `zip` extension. This should allow
Psalm to run over code utilizing any of these constants even if the
analyzing system doesn't have ext-zip installed/enabled (e.g. a GitHub
Actions container).
2023-10-30 21:46:40 -05:00
Simon Berger
6f32c723f5
Narrow down get_browser
returning array or object based on $return_array
param
2023-10-25 10:34:46 +02:00
71483b72aa
Merge remote-tracking branch 'origin/5.x' into v6_fixes
2023-10-22 20:08:39 +02:00
Brian Dunne
1d6b0e479c
Merge branch 'master' into addIntlExtensionStubs
2023-10-05 22:36:06 -05:00
cgocast
fe0f1fc77d
Merge branch 'vimeo:master' into master
2023-09-28 12:08:10 +02:00
Rudolph Gottesheim
87e0bbcf89
Allow passing stringable-object
s to sprintf() in all PHP versions
2023-09-28 10:23:02 +02:00
Rudolph Gottesheim
aa04c0063b
Allow Stringable in sprintf() values
2023-09-28 10:23:02 +02:00
Bruce Weirdan
7428e49b11
Merge branch '5.x' into upstream-master
2023-09-11 13:13:34 +02:00
Bruce Weirdan
ea1664f30b
Merge pull request #10190 from boesing/feature/array-object-array-key
2023-09-10 20:09:10 +03:00
Maximilian Bösing
e77a4bcbbe
feature: narrow key template for ArrayObject
to array-key
...
This aligns behavior with PHPStan: ab154e1da5/stubs/ArrayObject.stub (L38)
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
2023-09-10 15:54:08 +02:00
George Steel
e98ed16577
DateTimeZone::getName()
always returns non-empty-string
and cannot be constructed with an empty string
...
Signed-off-by: George Steel <george@net-glue.co.uk>
2023-09-09 23:48:49 +01:00
cgocast
84e7423175
Detect DoS by sleep vimeo#10178
2023-09-06 15:58:08 +02:00
Bruce Weirdan
983e4b82dd
Merge branch 'master' into 5.x
2023-08-31 16:32:27 +02:00
cgocast
c16216bc42
Xpath injection #10162
2023-08-30 18:56:10 +02:00
Bruce Weirdan
d3463e30f3
Merge branch '5.x' into upstream-master
2023-08-27 05:28:10 +02:00
Bruce Weirdan
77436b1339
Merge pull request #10154 from cgocast/5.x
2023-08-27 05:27:41 +02:00
Bruce Weirdan
23ad49cbe4
Update mysqli
stub
...
Refs vimeo/psalm#9851
2023-08-27 04:17:23 +02:00
cgocast
bb902990f8
Sink for ReflectionFunction::__construct()
2023-08-26 22:09:27 +02:00
cgocast
72c9bf8575
New sinks for TaintedCallable #10117
2023-08-26 19:29:00 +02:00
Bruce Weirdan
65243a4e72
Merge branch '5.x' into upstream-master
2023-08-22 18:51:05 +02:00
kkmuffme
4f87da19e2
stubs exec param-out for $output
2023-08-22 15:28:28 +02:00
Bruce Weirdan
82a1806102
Merge branch '5.x' into upstream-master
2023-08-20 02:17:59 +02:00
Bruce Weirdan
32445023d8
strip_tags()/$allowed_tags
can accept arrays since 7.4
...
Fixes vimeo/psalm#4317
2023-08-17 21:36:47 +02:00
Bruce Weirdan
76a62db2ea
Merge branch '5.x' into upstream-master
2023-08-13 19:46:13 +02:00
The Devick
313267082b
Fix bcdiv nullable scale stub
2023-08-12 14:36:00 -03:00
Yannick Gottschalk
a4de6d9dc0
Fix #9997
...
- make SimpleXmlElement and SimpleXmlIterator not a universal object crate
- added typed magic __get method to SimpleXmlElement
- adjusted tests to reflect new behaviour of SimpleXmlElement
- added tests
2023-08-05 17:07:08 +02:00
Bruce Weirdan
c83b0c96a9
Fixed DOMDocument::load*
signatures
...
Prior to 8.0 those methods could be called statically, returning a
`DOMDocument` instance. In 8.0 and above they no longer can be.
2023-08-01 11:56:46 +02:00
cgocast
165df42e00
Apply code review remarks
2023-07-25 10:33:25 +02:00
cgocast
c754a0ea08
Remove TaintedSql sink for PDOStatement related methods
2023-07-25 09:22:49 +02:00
cgocast
719496b46e
#10030 Add PDOStatement::bindValuebindValue() and PDOStatement::bindParam() as sources for TaintedSql
2023-07-21 15:27:47 +02:00
Andreas Braun
bea3090aff
Add generic stubs for MongoDB BSON classes
2023-07-13 08:42:06 +02:00
orklah
3e54feb9b4
Merge pull request #9964 from ygottschalk/fix/phpparser-deprecation-name-parts
...
Fix/phpparser deprecation name parts
2023-07-03 20:59:09 +02:00
kkmuffme
26eb870e47
fix mixed replace return types for arrays
...
* remove useless replace return type provider code that returned incorrect type for array replacements and was worse duplicate of existing stubs
* require preg patterns to be non-empty-strings as otherwise it will throw a PHP notice
* improve return type of array replacements to be more correct (not fully correct due to https://github.com/vimeo/psalm/issues/5994#issuecomment-1614601590 )
2023-06-30 17:08:03 +02:00
Yannick Gottschalk
7aac142a44
Added stub for PhpParser\Node\Name
2023-06-28 03:13:42 +02:00
Yannick Gottschalk
f93d23899d
Fix glob CallMap and stub to prevent crash on alpine (and possibly other systems)
2023-06-25 13:17:13 +02:00