1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-11 16:59:45 +01:00
Commit Graph

71 Commits

Author SHA1 Message Date
Brown
1ab6345bac Fix treatment of PDOStatement::setFetchMode
Fixes #1496
2019-03-29 13:26:13 -04:00
Matthew Brown
c772914910 Add some formatting 2019-03-23 14:27:54 -04:00
Bruce Weirdan
9bdc9f774f More provider typing 2019-03-02 08:43:19 -05:00
Brown
601f303de2 Fix position of invalid param 2019-02-27 16:00:44 -05:00
SignpostMarv
4a56688800 adding DIRECTORY_SEPARATOR to tests that fail under windows 2019-02-06 14:29:10 -05:00
Matthew Brown
509709d6bc Fix #1267 - flesh out self static property types 2019-02-01 08:59:01 -05:00
Matthew Brown
45058ea494 Fix possible crash when class-string class doesn’t exist 2019-01-28 01:12:41 -05:00
Matthew Brown
22ee72808a Remove a bunch of hacks around generic offsets
Also fixes #1245
2019-01-26 16:58:49 -05:00
Brown
60e9d4f245 Don’t give up after method_exists if static method exists 2019-01-23 15:50:12 -05:00
Matthew Brown
94aa51ba6d abstract trait method return type override should not be MethodSignatureMistmatch 2019-01-13 13:27:07 -05:00
Brown
14f456e160 Fix #1176 - always evaluate assignments in unknown function calls 2019-01-07 12:24:44 -05:00
Matthew Brown
90e1648d5b Fix #979 - be more conservative about method_exists handling 2019-01-06 09:36:25 -05:00
Matthew Brown
901596281c Fix #1143 - check some variable new calls 2019-01-02 06:58:49 -05:00
Brown
7b03e0159c Prevent invalid static invocation
Fixes #1134
2018-12-17 17:48:13 -05:00
Brown
d9945a0ced Fix issue re-asserting non-empty-mixed 2018-12-10 18:33:26 -05:00
Brown
dc834fdb01 Default allowStringToStandInForClass to true and fix errors found 2018-11-12 12:03:55 -05:00
Matthew Brown
4688b25fd9 Move internal classes to own namespace 2018-11-12 11:20:59 -05:00
Matthew Brown
fe25530cad Fix #1073 - relax constraints around missing reflected methods and PHP Parser version 2018-11-10 20:56:31 -05:00
Matthew Brown
99c9be34e1 Type according to parent param types, if no type is given 2018-10-06 14:00:45 -04:00
Matthew Brown
08d8ff5d70 Allow automatic inheritance from overriding param type definitions 2018-10-06 13:46:35 -04:00
Matthew Brown
37be70a465 Fix issue calling possibly magic method 2018-08-02 16:14:53 -05:00
Matthew Brown
9a9adf897d Fix #896 - improve ReflectionParameter::getType return 2018-07-17 08:45:42 -04:00
Matthew Brown
0fa7cbeb02 Fix #895 - check __call magic method args 2018-07-16 22:48:53 -04:00
Matt Brown
b80440f1e3 Fix #893 - improve error message for missing intersection type method 2018-07-16 11:52:38 -04:00
Matthew Brown
8a4d7e12bd Fix issues found by scanning PHPCS 2018-07-05 23:02:09 -04:00
Matthew Brown
685ae67435 Fix #839 - check args for __call methods 2018-06-26 23:11:16 -04:00
Matt Brown
75e2be8aec Fix #825 - ignore falsable issues on builtin *methods* 2018-06-18 10:07:05 -04:00
Matthew Brown
ea4dc9f2b8 Improve simplexml function inference 2018-06-05 23:42:02 -04:00
Matthew Brown
b5cb2b34a2 Fix #380 - don’t complain about legitimate (if archaic) self calls 2018-06-03 19:11:07 -04:00
Matthew Brown
56a1f744a0 Fix #734 - allow DOMDocument::appendChild to mirror its first arg 2018-05-12 00:28:21 -04:00
Matthew Brown
21261172a8 Fix #713 - support offsets of known array types 2018-05-05 17:30:18 -04:00
Radosław Kowalewski
15c1a82d8c Few fixes to make tests pass on windows
* changed / to DIRECTORY_SEPARATOR in expected messages
* cahnged most occurences PHP_EOL to "\n" in tests and src
* added output buffering in test to avoid marking test as risky
2018-04-12 22:41:13 -04:00
Matthew Brown
ef37f0cfe8 Fix #626 - check __invoke methods 2018-03-31 18:57:13 -04:00
Matt Brown
b664c85642 Add new issue conditional on config flag 2018-03-06 12:19:50 -05:00
Matt Brown
357ad1aa82 Add config flags to allow stricter class invocation checks 2018-03-06 11:20:59 -05:00
Matthew Brown
806b032b13 Downgrade UndefinedMethod to PossiblyUndefinedMethod issue when one type has __call defined 2018-03-04 13:23:40 -05:00
Matthew Brown
b041797cd0 Fix #519 - warn about variable calls on non-objects 2018-02-17 17:16:22 -05:00
Matthew Brown
09f86ceee7 Introduce MissingDependency issue, separate from UndefinedClass
Ref #511
2018-02-17 11:36:20 -05:00
Matt Brown
be75c143d4 Fix #510 - check that constructor parent classes and interfaces exist 2018-02-14 11:21:43 -05:00
Matthew Brown
c0a22d5f55 Increase CallChecker code coverage 2018-01-22 00:17:16 -05:00
Matt Brown
2120d258a4 Fix formatting of return type adder 2018-01-11 15:50:58 -05:00
Matt Brown
45eaea1ed9 Flesh out callmap type 2018-01-05 11:50:27 -05:00
Matthew Brown
c9173c7da3 Add more specific issues for falsable/nullable invalid return types 2018-01-04 21:36:16 -05:00
Matt Brown
ff5b2ce799 DateTimeImmutable::add/sub return static
Fixes #419
2018-01-03 10:35:22 -05:00
Matt Brown
eca7351472 Add return-level issues as well as function-level ones
Fixes #379
2017-12-07 15:50:25 -05:00
Matthew Brown
0eedad4f6a Add UndefinedGlobalVariable issue and asssociated Possibly... one 2017-12-06 00:56:00 -05:00
Matt Brown
c5faa2d06a Fix #299 - add PossiblyInvalidMethodCall 2017-11-15 11:34:40 -05:00
Matthew Brown
3ade4b9559 Fix #293, be case invariant to self & static 2017-11-14 21:56:29 -05:00
Matt Brown
97de8f7684 Allow Psalm to check static call LHS vars 2017-11-06 15:37:49 -05:00
Matthew Brown
e29dd140e3 Refactor scanning and analysis, introducing multithreading (#191)
* Add failing test

* Add visitor to soup up classlike references

* Move a whole bunch of code into the visitor

* Move some methods back, move onto analysis stage

* Use the getAliases method everywhere

* Fix refs

* Fix more refs

* Fix some tests

* Fix more tests

* Fix include tests

* Shift config class finding to project checker and fix bugs

* Fix a few more tests

* transition test to new syntax

* Remove var_dump

* Delete a bunch of code and fix mutation test

* Remove unnecessary visitation

* Transition to better mocked out file provider, breaking some cached statement loading

* Use different scheme for naming anonymous classes

* Fix anonymous class issues

* Refactor file/statement loading

* Add specific property types

* Fix mapped property assignment

* Improve how we deal with traits

* Fix trait checking

* Pass Psalm checks

* Add multi-process support

* Delay console output until the end

* Remove PHP 7 syntax

* Update file storage with classes

* Fix scanning individual files and add reflection return types

* Always turn XDebug off

* Add quicker method of getting method mutations

* Queue return types for crawling

* Interpret all strings as possible classes once we see a `get_class` call

* Check invalid return types again

* Fix template namespacing issues

* Default to class-insensitive file names for includes

* Don’t overwrite existing issues data

* Add var docblocks for scanning

* Add null check

* Fix loading of external classes in templates

* Only try to populate class when we haven’t yet seen it’s not a class

* Fix trait property accessibility

* Only ever improve docblock param type

* Make param replacement more robust

* Fix static const missing inferred type

* Fix a few more tests

* Register constant definitions

* Fix trait aliasing

* Skip constant type tests for now

* Fix linting issues

* Make sure caching is off for tests

* Remove unnecessary return

* Use emulative parser if on PHP 5.6

* Cache parser for faster first-time parse

* Fix constant resolution when scanning classes

* Remove test that’s beyond a practical scope

* Add back --diff support

* Add --help for --threads

* Remove unused vars
2017-07-25 16:11:02 -04:00