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

107 Commits

Author SHA1 Message Date
Matt Brown
d67f1e3c28 Fix #252 - allow custom vendor directory 2018-01-25 11:32:54 -05:00
Matt Brown
cf7c5c2a0d Fix #470 - follow vendor directory symlinks 2018-01-25 11:07:16 -05:00
Matt Brown
b0f3992f36 Remove stopOnFirstError config option, because it hasn’t worked for a while
Fixes #248
2018-01-24 16:22:54 -05:00
Matthew Brown
bc9761f6c9 Create Codebase out from ProjectChecker 2018-01-21 13:45:33 -05:00
Matthew Brown
e05a7c00cc Break FileScanner out from FileChecker 2018-01-21 12:44:46 -05:00
Matthew Brown
9b6b03ff9f Create Config before ProjectChecker, and remove test-specific code from FileChecker 2018-01-21 10:22:04 -05:00
Tyson Andre
77b41f4e9f Bring phpdoc @param up to date 2018-01-18 16:07:48 -05:00
Matthew Brown
6e6c20b968 Remove unused property 2018-01-13 00:45:28 -05:00
Matthew Brown
d61829adde Allow the use of property docblocks without all docblocks 2018-01-13 00:32:20 -05:00
Matthew Brown
fb9f20f4b8 Find unused properties with dead code checks
Fixes #424
2018-01-10 23:29:18 -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
c9173c7da3 Add more specific issues for falsable/nullable invalid return types 2018-01-04 21:36:16 -05:00
Matthew Brown
8da23605bb Add unqualifier plugin test to remove unnecessary namepaces 2018-01-02 09:46:50 -05:00
Matthew Brown
cc81d78dfd Add code replacement api to allow Psalm to update arbitrary parts of the codebase
Fixes #264
2018-01-02 09:46:50 -05:00
Matthew Brown
72b127e061 Allow plugins to be run via the command line 2018-01-02 09:46:50 -05:00
Matthew Brown
5afe3b10fa Scan compoer autoload files before any sweep of code 2018-01-01 11:47:03 -05:00
Matthew Brown
8efc939a5f Move Psalm execution code into PHP file that Psalm can analyse 2017-12-29 17:02:56 -05:00
Matthew Brown
becce4ae36 Use composer classmap where available to remove need for reflection of vendor classes 2017-12-28 00:56:10 +01:00
Matthew Brown
942bc0a663 Add new MixedTypeCoercion issue, fixes #320 2017-11-19 13:42:48 -05:00
Matthew Brown
1a39224abc Fix issues that improved array checks found 2017-11-19 12:14:02 -05:00
Matthew Brown
b618bd798d Add new issues for missing required files 2017-10-29 14:39:23 -04:00
Matthew Brown
295792d550 Fix #235 - add psalm.xml option to support igbinary serializer 2017-10-15 12:38:47 -04:00
Matt Brown
8f9fdcb637 Create storage for plugins before scanning 2017-08-08 11:03:45 -04:00
Matthew Brown
4175295113 Isolate where we load static storage objects (#195)
* Move FileChecker::$storage calls to provider

* Add ClassLikeStorageProvider

* Use ClassLikeStorageProvider everywhere

* Move storage arrays into providers
2017-07-29 15:05:06 -04:00
Matt Brown
76ba419330 Group unused tests together 2017-07-25 17:04:58 -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
4a590000a6 Fix whitespace issue 2017-06-26 20:14:58 -04:00
Matthew Brown
678b6113d5 Fix #127 - allow Psalm to analyse composer autloaded files 2017-06-26 20:13:10 -04:00
Matthew Brown
f9b16c9a2d Explicitly cast mock class to string 2017-06-13 00:51:16 -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
4fd46e1752 Improve formatting 2017-05-24 22:07:49 -04:00
Matthew Brown
754a4d9950 Allow Psalm to be run outside of the directory it's installed in (#154)
* Add --root option when not running Psalm from root directory

* Add informative error when running Psalm outside of its project directory

* Add better message in help

* Fix autoloader precedence
2017-05-04 14:25:58 -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
ce6ca58291 Fix #114 - add optional Hack-like checks calls 2017-04-14 21:32:14 -04:00
Matthew Brown
a89018d9ae Only warn about issues in files that we’re trying to scan 2017-03-24 18:34:46 -04:00
Matt Brown
cbb8252125 Don’t be sensitive to casing differences in file paths 2017-02-27 12:02:13 -05:00
Matthew Brown
cd5f727d2e Collect explicit references to classes/methods 2017-02-26 23:09:18 -05:00
Matt Brown
0049e4deb4 Fix #105 and also the issues found in its wake 2017-02-23 19:36:51 -05:00
Matthew Brown
45577f123c Don’t add Symony and Composer to predefined (Reflectable) classes 2017-02-21 02:07:43 -05:00
Matthew Brown
f32fabd798 Remove dead code 2017-02-11 19:30:06 -05:00
Matthew Brown
8ff6634e7b Add issue for possibly unused variables in public/private methods
also changed a lot of access
2017-02-11 18:56:38 -05:00
Matt Brown
c0a6fc9125 Fix #90 - add genericised stubs for common array functions 2017-02-10 18:12:59 -05:00
Matt Brown
34980fc718 Remove dead code and fix config.xsd 2017-02-07 18:27:28 -05:00
Matt Brown
ba4f47a41c Config for caching file hashes during run 2017-02-02 12:39:39 -05:00
Matthew Brown
0fbf8b5619 Remove more dead code 2017-02-02 00:45:23 -05:00
Matthew Brown
bf042772bd Get config constants after autoload script 2017-02-01 14:56:10 -05:00
Matthew Brown
a0711de023 Update config key to be more accurate ref #85 2017-02-01 10:13:37 -05:00
Matthew Brown
eeccf791ad Add unused method & unused class analysis ref #80 2017-01-31 20:47:16 -05:00
Matt Brown
004fd42062 Fix #83 - add support for stubbing 2017-01-31 19:21:33 -05:00