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

42 Commits

Author SHA1 Message Date
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
Matthew Brown
d76459e138 Move to a PHPStan-like return type provider class model 2019-02-15 18:00:40 -05:00
Brown
184ee76176 Remove erroneous regular namespace check
Fixes #1235
2019-01-24 10:41:06 -05:00
Matthew Brown
590bea305d Fix #1218 - find issues with bad callables 2019-01-19 19:49:58 -05:00
Matthew Brown
b32000fa05 Fix #689 - add checks for @internal annotations 2018-12-01 18:37:49 -05:00
Brown
0254322bed Migrate Codebase-namespaced and FileManipulation-namespaced classes to internals 2018-11-12 11:20:59 -05:00