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

28 Commits

Author SHA1 Message Date
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
Sergei Morozov
9ac3e88c70
Unmark DateInterval::$invert as read-only
Despite the PHP documentation recommending that DateInterval properties
should be considered as read-only, there is no way to specify an
inverted interval via the constructor. Therefore, setting this property
on an existing object should not be considered an error.

See: https://www.php.net/manual/en/class.dateinterval.php
2023-06-11 16:43:51 -07:00
RobChett
38d39c27ce Add stub for DateInterval 2023-04-20 15:52:29 +01:00
Bruce Weirdan
468dd1be4c
PHP 8.2 attributes moved to 8.2 stub 2023-03-03 04:28:37 -04:00
Bruce Weirdan
3693300b2d
Made WeakReference mutable
Fixes vimeo/psalm#6544
2023-02-14 19:30:28 -04:00
Mark McEver
53c3f1ebb3 Prevent other DB escaping functions from escaping non-sql taints 2022-12-28 14:19:01 -06:00
Mark McEver
69f31dcd4a Prevent mysqli escaping functions from escaping non-sql taints 2022-12-28 13:39:01 -06:00
Tim Düsterhus
3c2018a1e0 Configure a correct attribute target in stubs/CoreGenericClasses.phpstub 2022-08-24 21:32:26 +02:00
Markus Staab
63915d1e2c added SensitiveParameter, AllowDynamicProperties php 8.2 attributes 2022-08-22 16:44:55 +02:00
Fran Moreno
ff195e76c9
Allow null to ArrayAccess::offsetSet $offset param 2022-03-06 13:47:32 +01:00
orklah
b7e70f3cd7 load the ReturnTypeWillChange stubs for all versions to allow using it on every PHP version 2021-11-09 19:57:03 +01:00
Aleksandr Zhuravlev
65407cc10d Got rid of test 2021-09-16 23:07:32 +12:00
Aleksandr Zhuravlev
f290e0fa3e Changed signature of Serializable::unserialize stub 2021-09-06 22:55:12 +12:00
ccf4c91688
The return value of generator methods can potentially be null (#5577)
* The return value of generator methods can potentially be null

* Add @psalm-ignore-nullable-return
2021-04-06 11:28:39 -04:00
Matt Brown
c05a3ea073 Break up CoreGenericClasses 2021-03-06 16:05:14 -05:00
Bruce Weirdan
841efbdfaf
Make WeakMap generic (#5313) 2021-03-02 22:25:19 -05:00
Lukas Bestle
fdb181fe00
Stubs: Don't explicitly depend on \Stringable (#5037)
Fixes #5007.
2021-01-17 10:56:24 -05:00
orklah
0e17a3354f
add stubs for standard iterators (#4725)
* add stubs for standard iterators

* Apply suggestions from code review cc @weirdan

Co-authored-by: Bruce Weirdan <weirdan@gmail.com>

* complete stub + delete code made redundant by stubs + fix some syntax in stubs

* fix parse error

Co-authored-by: Bruce Weirdan <weirdan@gmail.com>
2021-01-07 10:07:07 -05:00
orklah
665170eadb
add ArrayAccess to SimpleXmlElement (#4934)
* add ArrayAccess to SimpleXmlElement

* add test
2021-01-06 09:44:12 -05:00
Matt Brown
387ab14bda Use better stubs for Serializable and SoapClient 2020-12-08 11:27:51 -05:00
Matt Brown
d8df622ab4 Add more to SimpleXMLElement stub 2020-12-07 01:30:41 -05:00
Matt Brown
b30842e981 Add PHP8-compat stub for SimpleXMLElement::current 2020-12-06 11:04:16 -05:00
Matt Brown
e9dd16f336 Fix #4481 - ReflectionProperty implements Reflector 2020-11-05 09:29:20 -05:00
Matt Brown
938cebc9f8 Use better inference for getAttributes return type
Fixes #4367
2020-10-30 17:37:16 -04:00
orklah
6aa4f17cb7
changing the templates order to match existing stub in PHPStan (#4332) 2020-10-14 20:01:25 -04:00
Pol Dellaiera
446a833d18
CachingIterator - Add forgotten constructor parameter. (#4322)
Signed-off-by: Pol Dellaiera <pol.dellaiera@protonmail.com>
2020-10-13 11:48:37 -04:00
Pol Dellaiera
31c924c314
Add more standard iterators (#4320)
* Add CachingIterator, LimitIterator, InfiniteIterator, CallbackFilterIterator, NoRewindIterator.

Signed-off-by: Pol Dellaiera <pol.dellaiera@protonmail.com>

* Add related Iterator tests.

Signed-off-by: Pol Dellaiera <pol.dellaiera@protonmail.com>
2020-10-13 11:35:49 -04:00
Matt Brown
f3b05f5ab5 Move static code out of src 2020-10-12 00:59:19 -04:00