1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00
Commit Graph

56 Commits

Author SHA1 Message Date
Matthew Brown
313e1c383c Fix edge-case issue with abstract class not fully implementing interface 2017-09-13 23:57:11 -04:00
Matt Brown
eee8442af6 Fix #199 - allow classes to suppress PropertyNotSetInConstructor warnings 2017-09-13 11:32:13 -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
67338c4bf5 Also detect non-inherited private constructors 2017-07-08 22:01:26 -04:00
Matthew Brown
c7b0f6685f Make Psalm a bit faster 2017-07-08 21:19:16 -04:00
Matthew Brown
d8654b8389 Slow down Psalm by checking parent initialisations too 2017-06-30 01:24:45 -04:00
Matt Brown
ac70ea31b2 Change test assertion keying 2017-06-29 10:22:49 -04:00
Matthew Brown
878696b72c Fix #173 - don’t emit MissingConstructor issues from trait constructor 2017-06-21 01:25:41 -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
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
0c4824b2cc Take property defaults into account when suggesting missing type 2017-04-14 23:46:55 -04:00
Matthew Brown
8d46c65815 Only make non-null if inside constructor 2017-04-14 23:26:58 -04:00
Matthew Brown
60be6f07a0 Delay checks for MissingPropertyType so we can give more useful messages 2017-04-14 23:09:34 -04:00
Matthew Brown
ce6ca58291 Fix #114 - add optional Hack-like checks calls 2017-04-14 21:32:14 -04:00
Matt Brown
f9f38f283e Emit issue when property type is not defined 2017-03-02 12:19:18 -05:00
Matthew Brown
81e24de76f Fix invalid NullPropertyFetch warning 2017-02-12 18:06:18 -05:00
Matthew Brown
35e4b380cc Add collection of PossiblyNull* issues 2017-02-11 17:55:08 -05:00
Matt Brown
a7872472be Add stubbing tests and modify config initialisation 2017-01-31 19:22:05 -05:00
Matthew Brown
ce93c4ef2d Assert smart things when offset is variable 2017-01-31 01:35:44 -05:00
Matthew Brown
965a79251d Fix #82 by updating how isset calls are handled 2017-01-31 00:34:06 -05:00
Matthew Brown
c485a3d056 Check for not-set-in-constructor errors across traits too 2017-01-27 08:28:21 -07:00
Matthew Brown
6bcc763414 Fix #3 by checking inside __constructor calls for initialisations 2017-01-26 23:23:12 -07: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
Matthew Brown
faccc73dc1 Fix #52 by analysing non-main parts of issets 2017-01-15 13:58:20 -05:00
Matt Brown
37e8b4adfe Fix a few issues in tests 2017-01-13 14:14:24 -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
694da2cabd Simplify a lot of APIs 2017-01-07 14:35:07 -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
93c1366bd8 Tighten up what array assignments can happen 2017-01-02 01:07:44 -05:00
Matthew Brown
882c8a8d0c Add better checking of property array assignments 2017-01-02 00:08:35 -05:00
Matthew Brown
30c910109c Fix inherited reflected properties/methods 2017-01-01 19:50:29 -05:00
Matthew Brown
883ca6a5db Fix #30 by consolidating properties into single storage array 2017-01-01 19:09:17 -05:00
Matthew Brown
8b5e066ba6 Add case-sensitive function names 2016-12-30 13:09:00 -05:00
Matthew Brown
685eaeb4fe Reimagine XML schema, fixes #21 2016-12-29 20:10:06 -05:00
Matthew Brown
749735a3ec Update config file API still further 2016-12-29 10:24:10 -05:00
Matthew Brown
ff466b7992 Change config API 2016-12-29 08:42:39 -05:00
Matthew Brown
1007d1682c Fix mixed operand issues 2016-12-24 18:29:11 +00:00
Matthew Brown
d88bb4e135 Finish adding tests for all issues 2016-12-16 22:16:29 -05:00
Matt Brown
6755c8724a Add tests for M* issues, fixing bugs along the way 2016-12-16 18:56:23 -05:00
Matt Brown
a44dd4f6b0 Add more tests 2016-12-14 19:43:44 -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
Matthew Brown
4c21a5af7c Add so many new tests 2016-12-11 23:41:11 -05:00
Matthew Brown
562f71b21f Add TypeDoesNotContainType issue and fix those issues in Psalm code 2016-12-11 13:48:11 -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
Matthew Brown
18a55e2854 Also inspect arrays from strings 2016-10-15 13:10:05 -04:00