1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00
Commit Graph

55 Commits

Author SHA1 Message Date
Matt Brown
3d4e77beb6 Fix int-mask-of expansion 2020-11-02 00:40:36 -05:00
Matt Brown
be1cd5275e Fix #4349 - improve types for suggested unions 2020-10-16 17:56:31 -04:00
Matt Brown
4488d5fb1f Use more accurate arguments count 2020-10-14 18:51:15 -04:00
orklah
ead107fa9e
More return types (#4173)
* add native return types

* redundant phpdoc
2020-09-12 11:24:05 -04:00
Brown
983f233026 Improve unpacking 2020-07-22 00:35:18 -04:00
Brown
a1bec0cd5a Consolidate generator tests 2020-04-06 08:57:18 -04:00
Matthew Brown
4166e5a4ef Fix tests 2020-03-17 16:30:03 -04:00
Brown
16c33d1565 Add support for list type
Fixes #2209
2019-10-08 18:44:46 -04:00
Matthew Brown
da42be175f Apply PHPCS fixes
Fixes #1880
2019-07-05 16:27:53 -04:00
Matthew Brown
a553adb232 Fix test array spacing 2019-06-16 09:42:34 -04:00
Brown
1348d634ed Improve handling of variadic parameters 2019-04-09 13:58:49 -04:00
Bruce Weirdan
9bdc9f774f More provider typing 2019-03-02 08:43:19 -05:00
Matthew Brown
f06ed8bf84 Fix #1273 - don’t change type with unpacked var 2019-02-03 16:36:10 -05:00
Brown
fd88f00526 Fix a few small bugs 2019-01-31 17:48:48 -05:00
Matthew Brown
214fd7d461 Add DuplicateFunction issue
Fixes #49
2019-01-06 16:40:44 -05:00
Matthew Brown
4688b25fd9 Move internal classes to own namespace 2018-11-12 11:20:59 -05:00
Matt Brown
dce8d14e1b Fix syntax errors in tests 2018-09-17 12:15:45 -04:00
Matthew Brown
e836f69ca2 Fix #502 - check for bad generator return in more places 2018-07-15 17:47:58 -04:00
Matt Brown
bbf48bbdfe Fix #873 - allow unpacking of all iterables 2018-07-09 09:59:51 -04:00
Matt Brown
2fc816a6e1 Fix repeated use of spread operator 2018-06-28 17:05:50 -04:00
Matt Brown
0882b9c0f9 Fix #687 - interpret unpacked arguments in array_push and array_unshift 2018-04-20 17:14:38 -04:00
Matt Brown
52b6a5cbde Fix #571 - fix buggy handling of packed vars 2018-03-13 13:50:41 -04:00
Matthew Brown
7940268a13 Fix #512 - check for undefined constant in param default 2018-02-15 20:27:42 -05:00
Matthew Brown
e05a7c00cc Break FileScanner out from FileChecker 2018-01-21 12:44:46 -05:00
Matthew Brown
e2e1094ec6 Fix #407 - improve treatment of array_merge unpacked args 2017-12-23 02:09:58 +01: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
Matt Brown
ac70ea31b2 Change test assertion keying 2017-06-29 10:22:49 -04:00
Matthew Brown
d6909193ea Add additional formatting changes 2017-05-26 20:05:57 -04:00
Matthew Brown
4fd46e1752 Improve formatting 2017-05-24 22:07:49 -04:00
Matthew Brown
4d020bcbdb Remove unnecessary imports in tests 2017-05-19 00:52:15 -04:00
Jon Ursenbach
11bc153deb Rewriting and streamlining every unit test with data providers. (#147)
* Rewriting and streamlining every unit test with data providers.

All unit tests have been rewritten into PHPUnit data providers
to reduce the amount of unnecessary code-reuse through out the
test suite.
2017-04-24 23:45:02 -04:00
Matthew Brown
65ef5ba8b7 Improve native understanding of docblock-less variadics 2017-02-07 22:02:46 -05:00
Matt Brown
a7872472be Add stubbing tests and modify config initialisation 2017-01-31 19:22:05 -05:00
Matthew Brown
bc668e2c7a Change variadic docblock param to match language syntax 2017-01-17 01:14:43 -05:00
Matthew Brown
693811abed Allow non-array docblock typehints for variadic params 2017-01-17 00:26:40 -05:00
Matthew Brown
e4769fd04a Don’t give up when faced with variadic type 2017-01-17 00:07:58 -05:00
Matthew Brown
b3726c9de5 Use getcwd() for the project’s base, not the config file parent directory 2017-01-16 18:33:04 -05:00
Matt Brown
6e6106c080 Add docblocks to tests 2017-01-13 14:07:23 -05:00
Matthew Brown
17329015dc Discriminate between checking, visiting and analyzing in method names 2017-01-07 15:09:47 -05:00
Matthew Brown
7609ca02c0 Fix #32 by evaluating all class references in files lazily 2017-01-04 23:42:58 -05:00
Matthew Brown
8b5e066ba6 Add case-sensitive function names 2016-12-30 13:09:00 -05:00
Matthew Brown
2bf515be5f Check return types of functions in namespaces 2016-12-28 19:57:18 -05:00
Matthew Brown
52b3e1ba8c Simplify test config setup; 2016-12-18 19:00:32 -05:00
Matt Brown
c91e457c28 Add psalm.xml support for checking tests 2016-12-14 12:55:23 -05:00
Matt Brown
154d023a9d Add more robust config testing 2016-12-14 12:28:38 -05:00
Matt Brown
c9557d47ce Fix exponentiation and modulo type inference 2016-12-08 16:37:14 -05:00
Matt Brown
55a060b53a Add support for closure checks 2016-12-07 14:13:39 -05:00
Matthew Brown
df18ad27d2 Add lots of tests for use 2016-11-20 21:49:29 -05:00
Matthew Brown
8c64dfd7fb Add return types everywhere 2016-11-11 17:13:30 -05:00
Jon Ursenbach
27c2db1d1d PSR-2 2016-11-02 17:50:54 -04:00