1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-11 16:59:45 +01:00
Commit Graph

412 Commits

Author SHA1 Message Date
3f82312ffa Merge remote-tracking branch 'vimeo/5.x' into merge_5.x 2024-01-15 13:08:20 +01:00
Karl Thaler
b2e53f6cf8 Implement __set method in SimpleXMLElement 2024-01-09 15:28:23 -08:00
9b8251416f Merge remote-tracking branch 'vimeo/5.x' into HEAD 2023-12-19 10:41:33 +01:00
Antonio del Olmo
d6cf9faebb
Add support for Override attribute 2023-12-15 11:14:53 +01:00
761f390d9b Use same parameter names in stubs 2023-12-12 18:51:31 +01:00
orklah
a75d26a3d4
Merge pull request #10417 from cgocast/tainted_extract
TaintedExtract
2023-12-10 09:40:49 +01:00
25be3c1d88 Fix 2023-12-08 12:48:46 +01:00
f980689d97 Fix iteration over weakmaps 2023-12-08 12:31:42 +01:00
Niels Dossche
6eba2f564c Fix return type of DOMXPath::query
This can also return namespace nodes, which are not a child class of
DOMNode.
2023-12-02 12:02:56 +01:00
cgocast
083584d115 TaintedExtract 2023-11-28 10:13:55 +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-objects 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