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

65 Commits

Author SHA1 Message Date
bugreportuser
b34dbe26e2 Allow setting superglobal types 2019-03-06 15:59:41 -05:00
bugreportuser
056e5a5b1e Allow setting globals in config 2019-03-06 15:59:41 -05:00
Matthew Brown
a6755cc523 Fix default test versions to 7.3 2019-02-07 15:27:43 -05:00
SignpostMarv
e587a80181 symlink perms are not available by default under windows 2019-02-06 14:29:10 -05:00
Andrii
21d383d6c6 🐛 #1225 Allow use lead asterisk wildcard in referenceClass 2019-02-01 07:59:44 -05:00
Brown
b5059f45a0 Allow users to ignore missing ignorefiles 2019-01-28 11:50:18 -05:00
Matthew Brown
930a8b2689 Fix #1225 - ignore classes using patterns 2019-01-21 16:48:12 -05:00
Matthew Brown
e9b7c9e08b Fix #1129 - mock class method arguments should be evaluated 2019-01-13 09:49:34 -05:00
Matthew Brown
195cb289ed Add float-checking plugin, and support for custom plugin issues 2019-01-07 08:38:56 -05:00
Matthew Brown
07b29e4a2f Fix #1141 - add symlinked symlinked repos to directory list 2019-01-06 09:14:35 -05:00
Brown
4e183abdc6 Add better message when reconciling fails with bad result
Ref #1114
2018-12-05 10:36:42 -05:00
Matthew Brown
21f29e7385 Fix #1108 - add support for referencedFunction to UndefinedFunction 2018-11-29 23:19:33 -05:00
Matthew Brown
4040626853 Add support for special *::someMethod syntax for referencedMethod
Fixes #1105
2018-11-28 20:09:20 -05:00
Brown
06974221df Change DependencyFinderVisitor name to ReflectorVisitor and update docs 2018-11-13 14:09:43 -05:00
Brown
110ca66692 Namespace test providers under Internal cc @TysonAndre 2018-11-12 11:20:59 -05:00
Brown
0254322bed Migrate Codebase-namespaced and FileManipulation-namespaced classes to internals 2018-11-12 11:20:59 -05:00
Matthew Brown
4d79b61e93 Change _checker to _analyzer 2018-11-12 11:20:59 -05:00
Matthew Brown
4688b25fd9 Move internal classes to own namespace 2018-11-12 11:20:59 -05:00
Brown
05d1ce6dcd Move plugin tests into new file 2018-10-29 11:52:16 -04:00
Brown
53719447f5 Add tests for new functionality 2018-10-17 15:54:31 -04:00
Matthew Brown
890412b557 Add support back for parser errors 2018-09-30 11:34:51 -04:00
Brown
d0bd10d143 Improve provider architecture, upping test coverage 2018-09-30 11:34:51 -04:00
Matt Brown
db3ddaa42c Allow InvalidCatch and InvalidThrow to be suppressed per-class
Ref #411
2018-09-21 11:35:51 -04:00
Matt Brown
4d4e84e6e9 Add specific ForbiddenEcho issue if a config flag is set 2018-09-18 17:08:32 -04:00
Matt Brown
414057e281 Fix #938 - allow forbiddenFunctions to be specified in the config 2018-09-18 16:42:51 -04:00
Matthew Brown
4fcef5c0d6 Add more tests for globbing 2018-07-21 22:34:22 -04:00
Matthew Brown
d41a9a8dcc Fix #806 - allow specification of functions and static methods that exit 2018-07-12 23:26:08 -04:00
Matt Brown
b8636eb326 Improve memoisation of chained calls 2018-07-03 12:45:29 -04:00
Matthew Brown
16e270f0ee Improve loading of stub file and autoload file information
Ref #849
2018-06-30 15:29:37 -04:00
Matthew Brown
952bc9bdfd Fix #84 - add pattern matching for files as well as directories 2018-06-05 20:15:18 -04:00
Matthew Brown
a33d52d935 Add support for referencedProperty error restrictions 2018-05-11 00:07:41 -04:00
Matthew Brown
da6209276f Allow ability to memoize empty method calls based on config 2018-04-28 13:05:43 -04:00
Matt Brown
6b3759a266 Fix #699 - prevent stubs from overriding known functions 2018-04-27 15:00:22 -04:00
Matthew Brown
2b34c1d315 Add extra level 8 containing PHP autoload landmines 2018-04-19 01:03:28 -04:00
Matt Brown
aa3ea9c14c Add a 7th level with even more permissive checks 2018-04-18 15:31:00 -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
5384f193d1 Allow class and method issues to be suppressed by their identifiers
Ref #603
2018-03-20 22:36:03 -04:00
Matt Brown
e04c4f866c Fix #524 - prevent fatal error when checking stubbed function from namespace 2018-02-21 11:32:52 -05:00
Matthew Brown
81fd016120 Fix #193 - allow caching of storages 2018-02-19 00:27:39 -05:00
Matthew Brown
8fd0b120df Fix test config loading 2018-01-28 12:46:58 -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
Matthew Brown
fb9f20f4b8 Find unused properties with dead code checks
Fixes #424
2018-01-10 23:29:18 -05:00
Matt Brown
928b01a7c7 Find and fix code issues where functionality is available 2018-01-07 17:25:23 -05:00
Matthew Brown
657d154288 CacheProvider -> ParserCacheProvider 2017-10-15 11:57:44 -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
22a716f4da Improve formatting of phpdocs 2017-05-26 20:16:18 -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
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
a89018d9ae Only warn about issues in files that we’re trying to scan 2017-03-24 18:34:46 -04:00