Mark McEver
828b093964
Prevent unnecessary filter_var() warnings on primitive types
2022-02-15 14:13:44 -06:00
orklah
fac55576ab
Merge remote-tracking branch 'upstream/4.x' into upstream-master7
2022-02-12 09:59:55 +01:00
orklah
c13a536386
Merge pull request #7614 from kkmuffme/add-phpredis-stubs
...
add phpredis stubs
2022-02-11 23:15:48 +01:00
Bruce Weirdan
11e60fa261
Merge branch '4.x' into upstream-master
2022-02-11 03:51:48 +02:00
orklah
0702a0b3e7
add ReflectionIntersectionType stub
2022-02-09 19:32:17 +01:00
Office
9d120896d5
add phpredis stubs
2022-02-09 08:14:58 +01:00
orklah
2e01e9b7cd
Merge pull request #7396 from Patrick-Remy/feat/key-of-value-of-improvements
...
feat: make key-of/value-of usable with non-const arrays
2022-01-31 21:39:01 +01:00
orklah
1220320e0b
fix some iterator stubs ( #6970 )
...
* fix some iterator stubs
* fix iterators
* update stubs
* fix a test
* fixes
* fixes
* fix a test
* fix
2022-01-30 01:18:05 +01:00
AndrolGenhald
653d17ff81
Add stub for PDOException.
2022-01-27 17:05:48 -06:00
AndrolGenhald
02cd7bbbba
Add SoapHeader stub.
2022-01-27 16:30:14 -06:00
AndrolGenhald
63cd3f3b95
Add SoapFault stub.
2022-01-27 16:30:14 -06:00
AndrolGenhald
2fe4fc397c
Enable extensions based on composer.json instead of those loaded at runtime ( fixes #5482 ).
2022-01-27 16:30:14 -06:00
Patrick Remy
8cd5ccd076
feat: make value-of<T>
capable for template types
2022-01-27 22:28:40 +01:00
Patrick Remy
2880d046ce
feat: make key-of/value-of usable with non-const arrays
2022-01-27 22:22:14 +01:00
orklah
841d4f4429
improve support for enum_exists
2022-01-22 18:27:24 +01:00
Bruce Weirdan
3fb3db3516
Merge branch '4.x' into upstream-master
2022-01-06 10:05:53 +02:00
Andreas Hennings
9da6b3f094
Issue #6618 : All reflection classes should implement Reflector.
2022-01-06 01:55:55 +01:00
Bruce Weirdan
c1acab4606
Merge branch '4.x' into upstream-master
2022-01-03 22:06:12 +02:00
Markus Staab
3de9c68830
pdo: more precise generic type
2022-01-03 17:11:03 +01:00
Matthew Brown
83911c7408
Remove unnecessary references to empty in TypeCombiner
2022-01-03 04:10:41 +02:00
orklah
0747b48d06
remove TEmpty
2022-01-03 04:09:59 +02:00
Markus Staab
457dd2f1c9
typo
2021-12-29 16:56:09 +01:00
Markus Staab
5361cda062
typo
2021-12-29 16:53:47 +01:00
Markus Staab
dd245f0dc5
mysqli_fetch_object: added missing generic
2021-12-29 16:50:38 +01:00
Saif Eddin Gmati
40ab6551a4
fix(stubs): UnitEnum::cases() can return an empty list
2021-12-21 12:06:41 +01:00
Ricardo Boss
f0d7556200
Added pure annotations to enum functions
2021-12-20 23:20:50 +01:00
orklah
c8959bd02a
fix other occurences of getAttributes
2021-12-20 10:19:01 +01:00
orklah
639b1b94a3
fix stub and fix test
2021-12-20 09:57:06 +01:00
orklah
9583d6a7e7
invert stub, add test
2021-12-17 00:12:54 +01:00
orklah
e9073eb059
doesn't infer empty for ReflectionClass::getAttributes without params
2021-12-16 23:39:23 +01:00
orklah
646ba983a0
Merge pull request #7140 from yethee/soap
...
Fixed compatibility with SoapClient
2021-12-15 00:55:57 +01:00
orklah
b2de778fb8
Merge pull request #7156 from simPod/set-map
...
Add Set::map() to ext-ds stub
2021-12-15 00:48:23 +01:00
orklah
93689c2860
add isStatic in stubs to solve the issue
2021-12-14 20:04:33 +01:00
Simon Podlipsky
9f13b73a01
Add Set::map() to ext-ds stub
2021-12-14 10:19:08 +01:00
yethee
0897714964
Update signatures of methods of SoapClient
2021-12-12 19:43:06 +03:00
Bruce Weirdan
3cce69189f
array_count_values return type for uncertain arrays
...
Fixes vimeo/psalm#7114
2021-12-10 02:45:58 +02:00
AndrolGenhald
b29fc6ad3c
Allow operator overloading for Decimal extension ( fixes #3938 ).
2021-12-08 10:59:37 -06:00
marcosh
07224e7d31
abs should always return a positive integer
2021-12-07 11:52:13 +01:00
Bruce Weirdan
9c324a7d74
Refined strlen()
return type to not include negative ints
...
Fixes vimeo/psalm#7062
2021-12-05 21:35:58 +02:00
Bruce Weirdan
dc271fe25c
Consider emptiness for array_count_values()
...
Fixes vimeo/psalm#7044
2021-12-02 04:51:06 +02:00
ralila
d57c246c93
Add stub for preg_match
2021-11-29 14:21:58 +01:00
Kamil Tekiela
d64539faa1
Fix indentation
2021-11-28 12:22:41 +00:00
Bruce Weirdan
41256c74d1
Added enum-related stubs and callmaps
...
Fixes vimeo/psalm#6430
2021-11-28 11:41:43 +02:00
Bruce Weirdan
806db287d2
Infer ::from()
and ::tryFrom()
return types on backed enums
...
Fixes vimeo/psalm#6429
2021-11-28 09:47:01 +02:00
Kamil Tekiela
d922808e8f
Create mysqli.phpstub
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2021-11-24 22:30:22 +00:00
Ricardo Boss
f93c84b918
Made name property of UnitEnum readonly
2021-11-22 13:47:36 +01:00
Ricardo Boss
6d58a708fc
Make UnitEnum name property non-empty
2021-11-22 13:38:08 +01:00
ralila
e5ed2e7066
Add @psalm-ignore-falsable-return to the stub
2021-11-14 10:59:24 +01:00
ralila
930ee578f1
Add missing false return value to the stub
2021-11-14 10:36:03 +01:00
ralila
af1b00f212
Add stub for mb_convert_encoding
2021-11-13 22:13:55 +01:00
Toon Verwerft
b72da42dd1
Remove invalid SoapClient::__doRequest stub
2021-11-13 10:27:48 +01:00
orklah
de443192c7
Merge pull request #6873 from orklah/ReturnTypeWillChange3
...
load the ReturnTypeWillChange stubs for all versions to allow using it on every PHP version
2021-11-09 23:18:07 +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
orklah
3ff3616ef4
add stub for taint detection on vprintf
2021-11-07 09:25:27 +01:00
tminich
2013adafee
Fix missed names in psalm annotations
2021-11-04 16:10:59 +01:00
tminich
541bd6cb36
Fix parameter names in CoreGenericFunctions.phpstub for PHP 8 named parameters
2021-11-04 10:27:07 +01:00
orklah
ce87fc4882
fix is_a when used with Stringable classes
2021-10-28 20:08:43 +02:00
orklah
8bf8036213
add ReturnTypeWillChange with attribute attribute
2021-10-24 23:21:57 +02:00
Tomas Norre Mikkelsen
dd49ac5975
Resolve forgotten merge conflict
2021-10-14 20:38:26 +02:00
Tomas Norre Mikkelsen
b39b523fb4
Convert pgsql functions to use object instead of a resource
2021-10-14 19:30:03 +02:00
Bruce Weirdan
6abdb092bc
Merge pull request #6667 from SCIF/bugfix-5135-reflectionnamedtype-stub
2021-10-14 13:26:50 +03:00
Aleksandr Zhuravlev
657f8e22ed
Made the test marked 7.4
2021-10-14 22:05:40 +13:00
Aleksandr Zhuravlev
ff1b745e2a
Since 8.0 added
2021-10-14 11:35:54 +13:00
Aleksandr Zhuravlev
cbb67c0672
Stubbed RelfectionNamedType
2021-10-14 11:09:52 +13:00
orklah
f387c3f535
fix stub
2021-10-13 10:33:26 +02:00
orklah
1efe272aed
stub for is_a
2021-10-12 22:12:51 +02:00
orklah
870ee4ff93
->args to ->getArgs
2021-10-09 23:37:04 +02:00
Dgame
a8ce748d1b
Fixed trim-stub
2021-10-07 20:10:36 +02:00
Manuel VACELET
40cdb2f912
php 8.0 introduced visibility constants on ReflectionClassConstant
...
Spotted in issue #6588
2021-10-06 08:58:53 +02:00
sasezaki
014543b0ec
Fix invalid class/method declaration in stub
2021-10-05 21:41:27 +09:00
Tomas Norre Mikkelsen
960af957db
Convert PSpell resources to objects
2021-10-04 13:41:31 +02:00
orklah
b0842c6b6f
Merge pull request #6475 from orklah/range6
...
3> min/max, rand inference improvement with integer range
2021-10-04 13:23:03 +02:00
Tomas Norre Mikkelsen
a49ff46448
Update typo in PHP81.phpstub
2021-10-04 12:58:01 +02:00
Tomas Norre Mikkelsen
993349d64d
Convert LDAP resources to objects
2021-10-04 12:57:12 +02:00
Tomas Norre Mikkelsen
232ebb7e57
Convert imap functions to use object instead of a resource
2021-10-02 11:58:08 +02:00
orklah
b9f14f8687
improve min/max inference, add a return type provider for rand, mt_rand and random_int
2021-10-02 09:53:58 +02:00
orklah
ef82910de3
Merge pull request #6537 from mmcev106/master
...
Prevent unnecessary filter_var() warnings on primitive types
2021-09-27 20:15:01 +02:00
Mark McEver
79340b4a6f
Prevent unnecessary filter_var() warnings
2021-09-27 18:46:01 +01:00
Mark McEver
76dade477d
Prevent unnecessary filter_var() warning
2021-09-27 18:34:58 +01:00
orklah
7328456a33
Merge pull request #6438 from SCIF/serializable-interface
...
Changed signature of Serializable::unserialize stub
2021-09-20 16:49:00 +02:00
Simon Podlipsky
d0370de0db
Fix wrong template type in Sequence::copy()
2021-09-16 18:59:05 +02:00
Aleksandr Zhuravlev
65407cc10d
Got rid of test
2021-09-16 23:07:32 +12:00
Aleksandr Zhuravlev
e76cbf75e8
Merge remote-tracking branch 'origin/master' into serializable-interface
2021-09-16 22:05:08 +12:00
Alessandro Lai
1aba202a5a
Fix #6464 : false positive for RecursiveArrayIterator::CHILD_ARRAYS_ONLY
2021-09-09 11:12:24 +02:00
Tim van Dijen
417ea9c43d
Fix return-type
2021-09-07 23:02:28 +02:00
Aleksandr Zhuravlev
f290e0fa3e
Changed signature of Serializable::unserialize stub
2021-09-06 22:55:12 +12:00
Bruce Weirdan
08155dcb41
Added FTP\Connection
class
2021-09-04 23:45:21 +03:00
Bruce Weirdan
cc1335022f
Fix SimpleXMLIterator
historic and current signatures
...
Historically, `SimpleXMLIterator` had only implemented `Iterator` and
`RecursiveIterator` methods. This changed in 8.0, when iterator methods
were moved to `SimpleXMLElement`, and `SimpleXMLIterator` was made a
dummy class extending `SimpleXMLElement`.
Fixes vimeo/psalm#6305 , in the sense that Psalm would no longer report
different errors depending on the runtime PHP version.
2021-08-16 00:04:59 +03:00
Bruce Weirdan
6c475e0be5
Merge pull request #6206 from Jack97/update-return-types
...
Update return types for get_headers and get_meta_tags
2021-07-29 22:38:06 +03:00
Jack Robertson
6ed8a4d292
Update return types for get_headers and get_meta_tags
2021-07-29 20:05:06 +01:00
Bruce Weirdan
c766a1d38d
Correct param names for array_combine()
...
Fixes vimeo/psalm#6189
2021-07-27 18:05:27 +03:00
Jack Robertson
ce6642d1aa
Handle malformed parentheses
2021-07-25 10:43:34 +01:00
Matthew Brown
88c4e2468e
Support interface-string<Foo> as temporary alias of class-string<Foo> ( #6106 )
2021-07-16 18:38:39 -04:00
Bruce Weirdan
f015c30a43
Merge pull request #6107 from orklah/get_defined_constants
2021-07-16 12:28:45 +03:00
orklah
45d2aede3c
fix syntax
2021-07-15 23:47:00 +02:00
orklah
38767166cf
stub get_defined_constants with parameter
2021-07-15 23:39:16 +02:00
Markus Staab
e037c4496a
Utilize non-falsy-string
2021-07-15 20:40:18 +02:00
Markus Staab
2671ea78da
Detailed return type for strtoupper
2021-07-15 20:15:08 +02:00
Bruce Weirdan
a5a2377dcf
Detailed return types for str_pad()
and str_repeat()
...
Fixes vimeo/psalm#6049
2021-07-15 01:54:03 +03:00
Bruce Weirdan
f93d925bdc
Updated join
signature to match implode
...
Fixes vimeo/psalm#6080
2021-07-12 23:59:34 +03:00
Bruce Weirdan
83bf9b8ed9
Merge pull request #5608 from paxal/patch/preg_replace_callback
...
Allow to use string key for preg_replace_callback callable argument
2021-07-11 04:55:03 +03:00
Fran Moreno
decb397b8e
Add ReflectionProperty::getType() and hasType()
2021-07-10 13:05:57 +02:00
elnoro
ec7aaa4a47
Update stubs/CoreGenericFunctions.phpstub
...
Co-authored-by: Bruce Weirdan <weirdan@gmail.com>
2021-07-09 23:25:12 +05:00
Ruslan Karimov
b373c0c7f9
added str_word_count to the stub file ( fix #6016 )
2021-07-09 21:45:18 +05:00
Matt Brown
6d4d1668f6
Allow more types for back-compat
2021-06-21 20:11:00 -04:00
Matt Brown
d8f4eb2d6d
Restrict type of implode to prevent Array-to-string conversion;
2021-06-21 19:55:27 -04:00
Matt Brown
9dde8eed9d
Add support for literal-int annotations as well
2021-06-14 23:24:09 -04:00
Matt Brown
3140654a44
Experiment with implode literal tracking
2021-06-14 16:03:37 -04:00
Matt Brown
47bf5ed567
Fix #5918 - add new issue to detect unquoted strings
2021-06-10 17:43:04 -04:00
Bruce Weirdan
689315b05f
Fix sscanf()
signature ( #5901 )
...
Fixes vimeo/psalm#5870
2021-06-07 13:19:17 -04:00
Oliver Hader
4898cd262e
[TASK] Enrich taint details for outputting core stubs ( #5827 )
...
Affects `printf`, `print_r`, `var_dump`, `var_export`
2021-05-24 16:42:18 -04:00
orklah
67413c88f9
fix #5797 ( #5822 )
2021-05-23 19:12:02 -04:00
Fran Moreno
e89f7e3960
Add mongodb Cursor and CursorInterface stubs and fix WriteConcern::__construct ( #5813 )
...
* Add mongodb Cursor and CursorInterface stubs
* Use proper variable name
* Update WriteConcern constructor
Based on https://www.php.net/manual/es/mongodb-driver-writeconcern.construct.php
2021-05-22 19:03:07 -04:00
still-dreaming-1
ecb4ca8730
strlen can return positive-int ( #5793 )
2021-05-19 15:20:56 -04:00
still-dreaming-1
a62ee22adb
htmlspecialchars can return non-empty-string ( #5785 )
2021-05-17 19:43:08 -04:00
Robert Chettleburgh
fe190c2eb7
unpack() can return false on error ( #5726 )
...
* Unpack() can return false on error
* unpack only returns false rarely
supporess with @psalm-ignore-falsable-return
Co-authored-by: Bruce Weirdan <weirdan@gmail.com>
Co-authored-by: Bruce Weirdan <weirdan@gmail.com>
2021-05-06 14:32:17 -04:00
Matthew Brown
832a190dd4
Support enums ( #5699 )
...
* Add initial enum preparation
* Support cases method
* Ignore bad use error
cc @weirdan
* Fix type
2021-05-03 17:54:09 -04:00
AndrolGenhald
518d0af895
Strict int/float comparison for conditional types, improve range return type ( #5601 )
2021-04-09 11:28:48 -04:00
Cyril PASCAL
c45e47d8ad
Allow to use string key for preg_replace_callback callable argument
2021-04-09 15:33:16 +02: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
Valentin Udaltsov
6851b5c1f1
Added TValue template to PDOStatement stub ( #5579 )
2021-04-05 18:20:59 -04:00
orklah
09ee4c1d79
json_encode does not return false if JSON_THROW_ON_ERROR is in flags ( #5417 )
2021-03-18 09:41:44 -04:00
orklah
1149050817
adapt bcdiv for PHP8 in stubs ( #5401 )
2021-03-16 13:45:54 -04:00
orklah
1a3ff5676a
fix stub for array_combine + remove false in PHP8 + improve tests ( #5395 )
2021-03-16 13:43:49 -04:00
orklah
dd4d970a37
makes array_combine return non-empty-array for most cases ( #5393 )
...
* makes array_combine return non-empty-array for most cases
* Add back newline
Co-authored-by: Matthew Brown <github@muglug.com>
2021-03-14 21:18:19 -04:00
Matt Brown
c97ee5ccdb
Fix #5258 - allow ReflectionParameeter::hasType() to inform getType() return
2021-03-06 16:54:23 -05: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
Matt Brown
e60c333f2d
Fix completion of Foo:: before an if statement
2021-02-15 11:12:04 -05:00
Tarmo Leppänen
ede95105ac
Update CoreImmutableClasses.phpstub ( #5218 )
...
Fixes wrong parameter names - https://psalm.dev/r/8cfdb309d9
2021-02-14 12:07:39 -05:00
Vincent Langlet
a80d5b736b
Rename stub to avoid phpstorm conflict ( #5213 )
2021-02-13 18:42:34 -05:00
Matt Brown
98ff5b5f8a
Fix #5099 - use class constant for default
2021-01-26 21:33:52 -05:00
Lukas Bestle
fdb181fe00
Stubs: Don't explicitly depend on \Stringable ( #5037 )
...
Fixes #5007 .
2021-01-17 10:56:24 -05:00
orklah
7997766e8b
use coherent annotations ( #5031 )
2021-01-17 10:54:45 -05:00
orklah
26f756d244
remove signature return types in stubs ( #5014 )
...
* remove return types from signatures for some stubs
* fix duplicate type
2021-01-14 16:34:22 -05:00
Bruce Weirdan
7007000a68
Allow Attribute::IS_REPEATABLE ( #4971 )
...
This allows Attribute::IS_REPEATABLE to be specified as attribute flag.
Fixes vimeo/psalm#4892 , vimeo/psalm#4970
2021-01-10 21:55:06 -05:00
Matthew Brown
ec4c7bde73
Fix #4951 - add Traversable interface to PDOStatement
2021-01-07 15:53:19 -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
Holger Woltersdorf
30696f9089
Add missing param for constructor arguments in PDOStatement#fetchObject ( #4915 )
...
* Add missing param for constructor arguments
PDOStatement#fetchObject allows a second, optional parameter for constructor arguments, which - if given - will be passed to the given class' constructor.
See: https://www.php.net/manual/de/pdostatement.fetchobject.php
Also see the PhpStorm stubs: https://github.com/JetBrains/phpstorm-stubs/blob/master/PDO/PDO.php#L1441
* Fix wrong nullability for 2nd argument in PDOStatement#fetchObject
2020-12-31 00:59:10 +00:00
orklah
1d9987e0ed
fix phpdoc ( #4905 )
2020-12-29 11:42:41 +00:00
Benjamin Morel
5341eec951
Change ReflectionUnionType::getTypes() return type ( #4903 )
2020-12-29 11:40:19 +00:00
Benjamin Morel
2be2f1eb1a
GEOS stubs ( #4902 )
2020-12-29 11:39:46 +00:00
Matthew Brown
3390097b35
Fix #4874 - remove strok stub
2020-12-21 17:14:25 +00: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
Alies Lapatsin
c07cba8da4
#4772 Mark 3rd argument of get_headers nullable and optional ( #4774 )
...
There is no documentation that $context is nullable but it’s better to mark is nullable and use default value so psalm will not ask to use all 3 parameters.
2020-12-03 23:14:43 -05:00
Jáchym Toušek
0d977f7341
Fix Ds\Sequence::toArray() return type ( #4763 )
2020-12-03 09:28:26 -05:00
Matt Brown
0ea4a702ed
Fix range return type to always non-empty lists
2020-11-27 20:09:53 -05:00
Markus Staab
8a0feaffa9
Declare PdoStatement->fetchObject($class_name) a taint sink ( #4701 )
...
* Declare PdoStatement
* Change to a callable sink
Co-authored-by: Matthew Brown <github@muglug.com>
2020-11-25 15:50:19 -05:00
Markus Staab
d393b4a69d
Added PDOStatement->fetchObject() stub ( #4693 )
...
* Added PDOStatement->fetchObject() stub
* fix stub param
* fix Xdebug spelling
* Use extension_loaded check instead
Co-authored-by: Matthew Brown <github@muglug.com>
2020-11-25 12:08:04 -05:00
Matthew Brown
1320081d27
Fix core return types
2020-11-25 11:49:51 -05:00
orklah
45c6189190
restore str_split as a list ( #4694 )
2020-11-24 15:01:46 -05:00
Matt Brown
27b7de285e
Fix some stubs
2020-11-24 10:44:33 -05:00
Lukas Reschke
7ac42551de
Add some more flows ( #4659 )
...
* Add some more flows
- Adds all relevant JSON flows https://www.php.net/manual/en/ref.json.php
- Adds all relevant misc flows https://www.php.net/manual/en/ref.misc.php
- Adds a small subset of URL flows https://www.php.net/manual/en/ref.url.php
* Update CoreGenericFunctions.phpstub
2020-11-22 12:09:55 -05:00
Lukas Reschke
3943b55f8a
Add psalm-flow for string functions from sscanf to wordwrap ( #4591 )
...
* Add string functions from sscanf to wordwrap
This should conclude all string functions from https://www.php.net/manual/en/book.strings.php
Continuation of https://github.com/vimeo/psalm/pull/4576
Ref https://github.com/vimeo/psalm/issues/3636
* Add StrTrReturnTypeProvider
* Fix psalm error
* phpcs
* Line length
* Ignore false return on vsprintf
Co-authored-by: Matthew Brown <github@muglug.com>
2020-11-21 17:35:07 -05:00
Lukas Reschke
ddbfbb28e6
Split LDAP into custom category ( #4604 )
...
- Adds ldap_escape as sanitizer
- Defines the right parameters to ldap_search as sink
- Wrote documentation
- Added tests
2020-11-18 11:39:36 -05:00
Michael Stilkerich
fec51eac8d
Stub for preg_filter ( #4587 )
2020-11-17 15:15:29 -05:00
Matt Brown
fda2377812
Fix #4578 - replace number type in ext-ds stubs
2020-11-16 21:50:23 -05:00
Matt Brown
42802e11d1
Allow PHP major version to determine substr return type
2020-11-16 16:31:33 -05:00
Lukas Reschke
6780b01453
Add more Psalm flows for string functions ( #4576 )
...
This adds string functions from
https://www.php.net/manual/en/ref.strings.php
This commit adds the flows for functions from "addcslashes" to "sprintf".
More are to follow in later commits.
Ref #3636
2020-11-16 15:50:07 -05:00
Matt Brown
e97a9c86eb
Fix #4517 - track type contradiction issues in match expressions
2020-11-09 10:00:53 -05:00
Matt Brown
114440cb81
Add ReflectionUnionType stub
2020-11-08 14:22:32 -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
Matt Brown
579327a470
Detect when targets are incorrectly targeted
2020-10-30 13:28:45 -04:00
Matt Brown
4ea87b9054
Add support for int-mask<...> and int-mask-of<...>
2020-10-30 13:28:45 -04:00
Jáchym Toušek
8929bde535
Add psalm-mutation-free to ext-ds ( #4425 )
...
* Add psalm-mutation-free to ext-ds
* Update ext-ds.php
* Update stubs/ext-ds.php
Co-authored-by: Jáchym Toušek <enumag@gmail.com>
Co-authored-by: Matthew Brown <github@muglug.com>
2020-10-29 19:55:10 -04:00
Matt Brown
438bcc6ab7
Use softer return
2020-10-29 16:14:16 -04:00
Matt Brown
0344ff6858
Add polyfill for Stringable interface
2020-10-28 00:55:53 -04:00
Simon Podlipsky
6bbf06f7cc
Fix preg_match_all param name ( #4416 )
2020-10-26 11:53:03 -04:00
Benjamin Morel
b01c56f1ef
Ds\Queue & Ds\Set implement ArrayAccess as well ( #4415 )
2020-10-25 21:16:12 -04:00
Matt Brown
5cda754a9c
Remove stubs with variadic middle params
...
Fixees #4377
2020-10-25 21:07:13 -04:00
Benjamin Morel
b4c7b66ccc
Document ArrayAccess in PHP-DS ( #4401 )
2020-10-22 20:28:39 -04:00
orklah
6aa4f17cb7
changing the templates order to match existing stub in PHPStan ( #4332 )
2020-10-14 20:01:25 -04:00
Marcus Bointon
e172e88274
Fix preg_match_all stub ( #4325 )
...
* preg_match_all can return false
* Test for preg_match_all returning false
* Fix test
* Add @psalm-ignore-falsable-return
2020-10-14 19:59:07 -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
bb7d7132f7
Do arithmetic for preg_split arguments
2020-10-12 20:26:02 -04:00
Matt Brown
2ac2da6079
Improve preg_split return more
2020-10-12 19:16:48 -04:00
Matt Brown
f83b50460a
Add better return type for preg_split
2020-10-12 13:04:28 -04:00
Matt Brown
f3b05f5ab5
Move static code out of src
2020-10-12 00:59:19 -04:00