1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-02 09:37:59 +01:00
Commit Graph

545 Commits

Author SHA1 Message Date
Valentin Udaltsov
7bea6f5b3c
Improved PDO::pgsqlGetNotify signature (#5169) 2021-02-06 22:07:37 -05:00
Philip Hofstetter
25659dd1a9
add missing parameter names to DateTime::createFromInterface (#5138)
this causes `Trying to access array offset on value of type int in
src/Psalm/Internal/Codebase/InternalCallMapHandler.php`
2021-02-01 10:20:12 -05:00
sji
f1123d0ccc
Fix wrong comments in CallMap_80_delta.php (#5104) 2021-01-25 11:05:13 -05:00
sji
4b9003ae9c
Bump the CURRENT PHP TARGET VERSION to 8.0 in CallMap.php (#5103) 2021-01-25 11:04:57 -05:00
sji
e61daf5c2f
Fix CallMap of PDOStatement for PHP8 (#5100)
The definitions are based on the php-src stub. 4bbb98c24f/ext/pdo/pdo_stmt.stub.php
2021-01-25 11:04:30 -05:00
Bruce Weirdan
3209ef76fe
Remove ReflectionType::getName(), move ReflectionType::isBuiltin() (#5090)
* Remove ReflectionType::getName(), move ReflectionType::isBuiltin()

* `ReflectionType::getName()` was never there: https://3v4l.org/1iZt4
* `ReflectionType::isBuiltin()` was moved to
`ReflectionNamedType::isBuiltin()` in PHP 8

Fixes vimeo/psalm#5089

* Fix test

* Mark test as php 8.0 only
2021-01-24 13:31:10 -05:00
orklah
592f6794a8
fix wrong order of types (#5058) 2021-01-20 17:41:41 -05:00
orklah
9e0525439d
add createFromInterface in PHP 8 (#5055) 2021-01-19 17:22:25 -05:00
Bruce Weirdan
fac9e46ba8
Correct gzread signature (#4960)
Fixes vimeo/psalm#4959
2021-01-08 19:50:10 -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
Benjamin Morel
2be2f1eb1a
GEOS stubs (#4902) 2020-12-29 11:39:46 +00:00
Benjamin Morel
3b6550f892
Return type for DateTimeZone::getTransitions() (#4879) 2020-12-26 10:34:18 +00:00
Benjamin Morel
15accfe61d
Improve DateTimeZone signatures (#4870) 2020-12-21 17:10:25 +00:00
Christer Edvartsen
2a4e5a2b1f
According to the PHP docs the session_name signature is: (#4855)
session_name ([ string|null $name = null ] ) : string|false

Resolves Possibly incorrect handling of session_name() #4854
2020-12-16 20:40:46 -05:00
Fabien Villepinte
e393a45ac7
ftp_misd may return false (#4830) 2020-12-11 14:27:32 -05:00
orklah
7c837addf5
allow passing mixed in is_a (#4780) 2020-12-06 11:28:34 -05:00
orklah
9f9b090f6a
improve pg_fetch return types (#4777) 2020-12-04 15:11:35 -05:00
Benjamin Morel
1c012caa5e
Fix ImagickPixel::getColor() (#4758) 2020-12-03 09:27:46 -05:00
Benjamin Morel
021f316ca2
Improve Imagick call map (#4757) 2020-12-02 20:42:36 -05:00
orklah
98053ead98
sync param names with php (#4745)
* sync param names with php

* fiw prefixes
2020-12-01 12:05:58 -05:00
LeSuisse
e32ed43253
Fix incorrect taint sink map for \rmdir (#4703)
Closes #4690
2020-11-25 16:45:53 -05:00
Benjamin Morel
e938933ff3
Fix PDOStatement::fetchObject() return type (#4682) 2020-11-23 15:52:14 -05:00
Matt Brown
ea9cb72143 First creation_function param isnÆt really a sink 2020-11-20 09:56:53 -05:00
Markus Staab
acb4bb42e1
documented type in InternalTaintSinkMap (#4627) 2020-11-19 19:27:40 -05:00
Lukas Reschke
78f4a0691c
Add dedicated types for 'file', 'header' and 'cookie' (#4630)
* [WIP] Add dedicated sinks for 'file', 'header' and 'cookie'

* Add documentation

* Add mapping for taint flows

* Add tests

* Fix test
2020-11-19 17:47:29 -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
Lukas Reschke
5ba4681c17
Add SSRF sinks (#4592) 2020-11-18 00:52:48 -05:00
Matt Brown
43af3b1a57 Break out TaintedInput issues into a lot of separate ones 2020-11-17 12:44:31 -05:00
Benjamin Morel
08716233e6
DateTimeInterface::getTimeZone() can return false (#4579)
Fixes #4515
2020-11-16 21:48:34 -05:00
Benjamin Morel
d313f57061
mysqli::$insert_id can be a string (#4577) 2020-11-16 21:48:04 -05:00
Tyson Andre
d71ed7b9e9
Fix curl_multi_getcontent signature (#4580) 2020-11-16 21:47:33 -05:00
Lukas Reschke
09abcfb650
Add sinks for popen and proc_open (#4572)
User input in those two functions could lead to a RCE.

popen: https://www.php.net/manual/en/function.popen.php
proc_open: https://www.php.net/manual/en/function.proc-open.php
2020-11-16 15:04:22 -05:00
orklah
317986c7a3
Add undocumented properties in SoapFault (#4510) 2020-11-08 13:15:49 -05:00
Matt Brown
b5a3f45d52 Remove use of PHP 7.2 function 2020-11-04 11:02:34 -05:00
Philip Hofstetter
5abde20fd0
improve mb_strtolower return type (#4469)
this fixes #4455
2020-11-02 08:18:42 -05:00
Matt Brown
dab1aac9d4 Protect more calls 2020-10-28 13:48:13 -04:00
Matt Brown
4aef96bbac Use lists everywhere for args 2020-10-28 12:45:26 -04:00
Matt Brown
f72e2d7de5 Fix #4374 - prevent paradox and allow Psalm to understand more assignments in conditionals 2020-10-20 14:43:05 -04:00
Matt Brown
b904b1d173 getShortName does not return a class-string 2020-10-19 22:35:09 -04:00
Matt Brown
eeacec315a 4.x - fix callmap regressions 2020-10-12 10:08:15 -04:00
Matt Brown
b85cbd01a7 4.x - add support for PHP 8 callmap 2020-10-12 09:41:25 -04:00
Matt Brown
903d7f3601 Add more fixes 2020-10-12 08:26:17 -04:00
Matt Brown
321b81e1f0 Fix order 2020-10-12 02:00:03 -04:00
Matt Brown
c9954b34f6 Add changes from PHPStan‘s functionmap 2020-10-12 01:56:04 -04:00
Matt Brown
f3b05f5ab5 Move static code out of src 2020-10-12 00:59:19 -04:00