1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-15 19:07:00 +01:00
Commit Graph

55 Commits

Author SHA1 Message Date
Brown
76bd5b6278 Refactor type comparison 2020-07-21 19:40:35 -04:00
Tyson Andre
f17a4911d5
Add more impure functions (#3814) 2020-07-14 17:14:09 -04:00
Brown
fbe3433edd Use escape terminology 2020-06-21 11:43:08 -04:00
Matthew Brown
081a284759 Fix #3567 - remember which variables a callable sets byref in use 2020-06-14 11:58:50 -04:00
Matthew Brown
a49a0e5650 Fix #3551 - count method can be impure 2020-06-14 11:06:53 -04:00
Gabriel Ostrolucký
8ca7a88c41
Mark fgetcsv impure (#3582)
fgetcsv standalone is used to skip current row for consecutive reads
2020-06-13 00:32:00 -04:00
Bruce Weirdan
a99f92ae3a
Fix vimeo/psalm#3572 (#3575)
session_decode has side effects
2020-06-13 00:28:56 -04:00
Brown
118b700436 Simplify sink mapping for internal calls 2020-05-25 13:10:06 -04:00
Brown
b62f646388 Fix #3391 - move_uploaded_file mutates 2020-05-18 16:26:08 -04:00
Brown
111303d913 Add non-empty-lowercase-string type 2020-05-15 10:18:05 -04:00
Brown
3e58163180 Prevent empty function id
Ref #3354
2020-05-12 12:54:06 -04:00
Brown
8f57d0c738 Fix #3204 - normalise function ids where possible 2020-04-20 21:38:35 -04:00
Brown
286c396498 Fix #3185 - allow ignore_user_abort calls 2020-04-19 13:19:18 -04:00
Philip Hofstetter
ab9c82e251 mark ftp_close as impure
in theory, all ftp_* functions are impure, but not marking them
encourages the good practice of checking the return value.

However, ftp_close(), while it's possible for it to fail, what good
would checking the return type do? How is one supposed to handle the
failure to close a stream in a way that affects future program flow?
2020-03-05 15:37:08 -05:00
Matthew Brown
653353709a Use MethodIdentifier object instead of string 2020-02-14 20:54:26 -05:00
Matthew Brown
bbdb1254ad Add line break 2020-02-05 08:51:11 -05:00
Lars Moelleken
759cfe4555 add more impure function calls 2020-02-05 08:51:11 -05:00
Philip Hofstetter
5774cfed7d mark additional impure functions (#2699)
both `fflush` and `vprintf` have very similar cousins already declared
as having side-effects.

This fixes #2687
2020-01-27 08:12:40 -05:00
Brown
311164f5ee Fix #2679 - session_start is impure 2020-01-23 10:26:11 -05:00
Brown
7482b9e56f Emit all stubs discovered by Psalm during analysis
Fixes #827
2020-01-08 17:23:40 -05:00
Matthew Brown
9fa2db1b6c Move Union::getTypes to Union::getAtomicTypes 2020-01-04 12:20:26 -05:00
Brown
0bcb7863f3 Use better system for storing inferred types and assertions 2019-11-25 11:44:54 -05:00
Brown
4be3180512 Add more impure functions 2019-11-13 13:22:04 -05:00
Matthew Brown
d0a9bf24f8 Void-returning functions are going to be impure 2019-10-13 09:51:25 -04:00
2e3s
a658566429 Add impure functions for mcrypt and iterator_apply (#2227) 2019-10-13 09:43:25 -04:00
Brown
09cf864d9b Mark preg_replace_callback as sometimes-pure 2019-10-11 13:54:33 -04:00
bugreportuser
d8855282c6 Add more impure functions (#2203) 2019-10-03 15:01:31 -04:00
Matthew Brown
81464d8dbf Fix #2179 - add gz* to list of impure functions 2019-09-27 09:50:33 -04:00
Brown
2fa0e05802 Fix #2169 - always use most immediate function storage when analysing 2019-09-25 18:48:41 -04:00
Matthew Brown
deb36e8b27 Allow array_map alone when it uses a closure 2019-09-09 21:28:56 -04:00
Brown
a6baa2d04c Allow callables to be understood as pure
Fixes #2112
2019-09-09 12:11:04 -04:00
Brown
21aa162d0a Make assert() pure
Fixes #2113
2019-09-09 10:43:10 -04:00
Matthew Brown
a032978a85 Use a better check for functional purity 2019-09-08 11:49:14 -04:00
Matthew Brown
3dbfedb51a Make purity test more strict again 2019-09-08 11:34:16 -04:00
Matthew Brown
0fc8c9a9bb Soften definition of purity to allow functions that return by-ref output 2019-09-08 11:32:04 -04:00
Matthew Brown
8be43398f0 Add better handling of print_r 2019-09-07 13:01:36 -04:00
Matthew Brown
e8500e5e51 Anything calling rand/mt_rand can’t be pure 2019-08-30 16:41:59 -04:00
Ilija Tovilo
e0cd04d809 Add more impure functions to configuration (#2053)
* Add more impure functions to configuration

Closes #2050

* Change note
2019-08-23 08:50:13 -04:00
Thomas Bley
149402abda Extend impure functions (#2042)
* extended impure functions, fixes #2038

* extended UnusedCodeTest #2038
2019-08-21 13:12:13 -04:00
Brown
c3949e3194 Improve taint protection for exec-related commands 2019-08-13 19:18:50 -04:00
Brown
d6e084ec9c Remove false-positive for callmap function arg 2019-08-13 14:53:31 -04:00
Brown
55cfbdcd5f Fix erroneous complaint for str_replace 2019-08-13 14:26:25 -04:00
Brown
b5614d03f8 Add detection for unused function calls 2019-08-13 13:15:23 -04:00
Matthew Brown
da42be175f Apply PHPCS fixes
Fixes #1880
2019-07-05 16:27:53 -04:00
Brown
e876feb0ea Allow users to pass file names to Function::getStorage 2019-07-01 14:20:14 -04:00
LeSuisse
f29826b958 Fully qualify constants and function calls (#1849)
This should give a small performance boost.
Part of #1837.

The change is enforced via phpcs and can be autofixed
with phpcbf.
2019-06-26 16:52:29 -04:00
Brown
0bd4dbcbc4 Bump to PHP 7.1
Fixes #1650
2019-05-16 18:36:36 -04:00
Brown
7f8b47c5cf Fix buggy behaviour around callable tests 2019-04-09 18:09:57 -04:00
Matthew Brown
317f790bde
New plugin hooks (#1405)
* Add a bunch of new hooks

* Add more integrations

* Add some broken tests

* Add more things

* Fix remaining interfaces

* Suppress proper issue

* UndefinedMethod should not stop analysis

* Add handlers for two custom method return types
2019-03-01 08:57:10 -05:00
Bruce Weirdan
8408effe57 Dropped unused uses 2019-02-17 13:17:45 -05:00