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

98 Commits

Author SHA1 Message Date
Matt Brown
8d7c365e5f Fix #679 - improve template param type checks 2018-04-20 10:52:23 -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
Matt Brown
6abbc23947 Catch type exception when fixing local type 2018-04-05 17:18:49 -04:00
Matthew Brown
2a544c3076 Fix #560 - ignore @param $var annotations 2018-03-30 17:46:12 -04:00
Matthew Brown
fb802540d6 Fix variadic format cc @TysonAndre and allow callable param types
Ref #580
2018-03-27 00:12:41 -04:00
Matthew Brown
58115599a1 Add support for callable(...) syntax
Ref #580
2018-03-26 22:13:10 -04:00
Matt Brown
cc3aafe4c4 Improve intersection type parsing 2018-03-22 17:55:36 -04:00
Matthew Brown
c2002d0250 Add intersection iteration test 2018-03-21 12:21:46 -04:00
Matthew Brown
8ce46aabd2 Allow intersection types in comments 2018-03-18 20:46:45 -04:00
Matthew Brown
eb3750d8f3 Remove unnecessary @var annotations 2018-03-17 00:19:55 -04:00
Matthew Brown
6955f77e2e Fix #493 - add support for multiple @var lines per docblock 2018-02-07 23:33:31 -05:00
Matthew Brown
473a174f23 Memoise type tokenisation and move functions to more logical locations 2018-02-04 12:23:32 -05:00
Matt Brown
8ad863614c Don’t add unnecessary space between paras 2018-01-29 13:42:04 -05:00
Matt Brown
543872f186 Allow @psalm-ignore-falsable-return annotation
Downgrades issues around use of current(), reset(), end() etc.
2018-01-24 18:52:58 -05:00
Matthew Brown
e05a7c00cc Break FileScanner out from FileChecker 2018-01-21 12:44:46 -05:00
Matt Brown
72848477c2 Add all Possibly* issues to more lenient config
And add granularity to InvalidPropertyAssignment* issues
2018-01-10 10:56:43 -05:00
Matthew Brown
89af8f2c2c Fix #434 - preserve formatting when replacing docblocks 2018-01-09 22:33:36 -05:00
Matthew Brown
0e67aae21b Allow updating of params 2018-01-07 17:25:23 -05:00
Matthew Brown
5bae869dc6 Break file manipulation out into Psalter 2018-01-07 17:25:23 -05:00
Matthew Brown
81cfe09fae Improve reporting of classlike locations in docblocks 2018-01-01 20:04:03 -05:00
Matt Brown
3b4a7a97bc Don’t treat callmap scalar types as any sort of filtering mechanism
Fixes #393 and fixes #394
2017-12-15 16:48:06 -05:00
Tyson Andre
136d48f77c Support @property-read and @property-write as new tags. (#317)
In combination with `@psalm-seal-properties`, this can be used to
have in-depth checking of magic properties.
2017-12-14 14:22:27 -05:00
Tyson Andre
cea5dca5dc Allow using nullable shorthand (?) within an array (#326) 2017-11-19 23:36:37 -05:00
Matthew Brown
75b6e21801 Fix #315 - improve checking of object-like arrays in function params 2017-11-19 13:05:35 -05:00
Matthew Brown
a08306973a Fix #302 - add a way to seal objects with magic properties 2017-11-16 20:47:58 -05:00
Matthew Brown
b2ae9a2892 Fix #291, #292 and #297 by improving docblock parsing 2017-11-14 21:43:31 -05:00
Matthew Brown
a0a9128375 Fix #285 - add PossiblyInvalidArrayAccess 2017-11-11 21:22:11 -05:00
Matthew Brown
126fd9a3a1 Fix #286 - ignore terrible param types 2017-11-11 11:28:49 -05:00
Matt Brown
59265ef2bf Fix #276 - fix false positive in magic call 2017-11-10 18:08:26 -05:00
Matthew Brown
765d82548d Remove more dead code 2017-11-08 23:27:51 -05:00
Matthew Brown
a651fad6f0 Fix #263 - add support for @psalm-param and @psalm-var annotations 2017-11-02 21:45:17 -04:00
Matthew Brown
e84586cfaa Fix return type space issue 2017-09-16 15:08:11 -04:00
Matthew Brown
7c261d7d1f Add return after every special type 2017-09-16 15:00:50 -04:00
Matthew Brown
9a3cb742cb Refactor docblock manipulation and add tests for it 2017-09-16 12:45:20 -04:00
Matt Brown
eee8442af6 Fix #199 - allow classes to suppress PropertyNotSetInConstructor warnings 2017-09-13 11:32:13 -04: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
Matthew Brown
e60f085741 Fix #178 - complain when encountering bad @return type 2017-07-09 20:32:35 -04:00
Matthew Brown
368b6670d7 Fix a few edgecases 2017-06-29 00:28:37 -04:00
Matthew Brown
fa4678912f Fix possible nullref 2017-05-29 23:21:46 -04:00
Matthew Brown
22a716f4da Improve formatting of phpdocs 2017-05-26 20:16:18 -04:00
Matthew Brown
d6909193ea Add additional formatting changes 2017-05-26 20:05:57 -04:00
Matthew Brown
688a72c794 Fix #36 - emit issues on deprecated properties 2017-05-25 01:32:34 -04:00
Matthew Brown
4fd46e1752 Improve formatting 2017-05-24 22:07:49 -04:00
Matthew Brown
42b435e23f Fix #134 - warn when docblock type is ill-formatted 2017-05-24 21:11:18 -04:00
Matthew Brown
7532e32b9d Fixed spacing and use statement formatting 2017-05-19 00:48:26 -04:00
Matt Brown
39ece995b6 Add @psalm-ignore-nullable-return annotation 2017-05-10 12:36:11 -04:00
Matthew Brown
c9b9b29cf4 Fix all phpcs issues 2017-05-04 21:57:26 -04:00
Matt Brown
df890fbfb0 Fix #155 - support @property declaration for classes with magic getters & setters 2017-05-04 18:35:05 -04:00
Jon Ursenbach
f65c618b2e PSR-2 adjustments and adding PHPCS checks into the Travis config. (#149)
* PSR-2 adjustments and adding PHPCS checks into the Travis config.

* Reverting some CallChecker changes and no longer casting vars to null.
2017-04-28 00:31:55 -04:00
Matthew Brown
23401672c0 Fix issue parsing return types with brackets 2017-04-19 09:03:24 -04:00