Bruce Weirdan
79acbadfad
Added InvalidParent issue ( #2320 )
...
Refs vimeo/psalm#2304
2019-11-11 00:21:43 -05:00
lhchavez
216f991b0c
Normalize stringified type names ( #2239 )
...
This change makes stringified types more normalized. Concretely it sorts
all union types, reconciled types, and sorts the keys within object-like
types.
2019-10-17 01:14:33 -04:00
Brown
3de056cdc2
Remove test that’s a bit broken
2019-10-04 14:00:53 -04:00
Jay Klehr
27961045a0
allowing null as type for mysqli real_connect for host and passwd parameters ( #2210 )
2019-10-04 13:07:28 -04:00
Matthew Brown
da42be175f
Apply PHPCS fixes
...
Fixes #1880
2019-07-05 16:27:53 -04:00
LeSuisse
f29826b958
Fully qualify constants and function calls ( #1849 )
...
This should give a small performance boost.
Part of #1837 .
The change is enforced via phpcs and can be autofixed
with phpcbf.
2019-06-26 16:52:29 -04:00
Brown
b00d51b7db
Allow misplaced required params so Psalm still inspects the code
2019-06-07 09:25:12 -04:00
Matthew Brown
790bc53bfd
Fix #1681 - interpret parent annotation properly
2019-05-25 11:51:09 -04:00
Brown
0bd4dbcbc4
Bump to PHP 7.1
...
Fixes #1650
2019-05-16 18:36:36 -04:00
Brown
e7f4a52d2b
Use better metric for a properly mismatching type
2019-05-14 16:15:38 -04:00
Brown
30cbcb6c36
Add ImplementedParamTypeMismatch issue
...
Fixes #1633
2019-05-14 15:44:46 -04:00
Brown
24dbc34bbe
Use better solution for inherited more-specific return types
2019-05-09 10:41:30 -04:00
Brown
0e4c8ce482
Split apart TypeCoercion issues, allowing more granular issue filtering
2019-04-25 18:02:19 -04:00
Brown
1348d634ed
Improve handling of variadic parameters
2019-04-09 13:58:49 -04:00
Brown
af4d10cb63
Fix #1499 - use TraitMethodSignatureMismatch when dealing with trait methods
2019-03-29 14:09:06 -04:00
Matthew Brown
230680fd1c
Fix #1513 - use correct param types when examining abstract trait methods
2019-03-28 22:47:17 -04:00
Brown
691d71cdb4
Fix #1504 and ignore SoapClient errors
2019-03-25 11:49:05 -04:00
Matthew Brown
c772914910
Add some formatting
2019-03-23 14:27:54 -04:00
bugreportuser
c8fffe362a
Allow capitalized @inheritDoc
2019-03-09 20:26:17 -05:00
Matthew Brown
becef300b1
Add test for #1422
2019-03-02 15:29:43 -05:00
Matthew Brown
f9b1a63146
Fix #1421 - variadic params are extra
2019-03-02 15:26:18 -05:00
Bruce Weirdan
9bdc9f774f
More provider typing
2019-03-02 08:43:19 -05:00
Brown
601f303de2
Fix position of invalid param
2019-02-27 16:00:44 -05:00
SignpostMarv
4a56688800
adding DIRECTORY_SEPARATOR to tests that fail under windows
2019-02-06 14:29:10 -05:00
Brown
c195e8fd21
Add more nuanced analysis of array access fetch
2019-01-30 15:40:37 -05:00
Brown
0d52dc4e00
Fix #1232 - allow checking of extended templated function returns
2019-01-24 15:03:13 -05:00
Brown
006801f661
Fix #1233 - inherit docblock return types from interfaces and classes when signature exists
2019-01-24 11:55:59 -05:00
Brown
67a14cefde
Still complain about less specific types when signature type is present
...
Ref #1233
2019-01-24 10:58:59 -05:00
Matthew Brown
4f3d7fca0d
Fix issue where @inheritdoc could override local param types
2019-01-19 12:42:46 -05:00
Matthew Brown
9bd5f06c7d
Allow inheritdoc to propogate param types
2019-01-19 12:19:07 -05:00
Brown
d068f1535d
Fix issue with implemented class interface in subclass
2019-01-16 15:08:11 -05:00
Matthew Brown
94aa51ba6d
abstract trait method return type override should not be MethodSignatureMistmatch
2019-01-13 13:27:07 -05:00
Matthew Brown
9f16ab9cb5
Fix issue where documented self param confuses
2019-01-05 08:45:12 -05:00
Matthew Brown
4b9ea5472d
Fix #1117 - enforce argument counts on interface __constructors
2018-12-12 22:35:27 -05:00
Matthew Brown
4688b25fd9
Move internal classes to own namespace
2018-11-12 11:20:59 -05:00
Matthew Brown
99c9be34e1
Type according to parent param types, if no type is given
2018-10-06 14:00:45 -04:00
Matthew Brown
350afe3e7f
Fix #998 - use lowercase comparison for method signature checks
2018-09-19 23:12:35 -04:00
Matthew Brown
39870f97c4
Fix #894 - check magic methods with given return types
2018-07-16 20:32:16 -04:00
Matthew Brown
f9ba8d7167
Fix #573 - improve required param message
2018-07-13 20:17:29 -04:00
Matthew Brown
391eef0d9d
Remove line
2018-04-21 17:44:23 -04:00
rightfold
e6d9854883
Use example-based test abstraction
2018-04-21 16:04:03 -04:00
rightfold
5c908da55a
Check that __clone, __construct, __destruct signatures omit return types
...
PHP complains when you have a return type declared for these three methods.
2018-04-21 16:04:03 -04:00
Matthew Brown
3771ea206c
Fix #648 - stop scanning when encountering a duplicate class
2018-04-07 11:38:41 -04:00
Matt Brown
0bd229a86f
Add better checks for trait-related fatal errors
2018-03-13 18:12:05 -04:00
Matt Brown
ef35cfc6fe
Fix #566 - check for abstract methods inheriting from non-abstract ones
2018-03-13 12:52:00 -04:00
Matt Brown
95642aafb4
Fix #339 - when a class is also in the callmap, use the user-defined behaviour
2018-02-22 13:42:34 -05:00
Matt Brown
5471b89391
Make array coercion an error
2018-02-21 18:59:31 -05:00
Matt Brown
316dd78e6a
Fix #509 - don’t complain about a missing param type when system parent has one
2018-02-21 11:57:52 -05:00
Matthew Brown
de9b90297a
Allow inheriting functions with nullable signatures to return void
2018-01-31 19:24:34 -05:00
Matthew Brown
6c38b2fdfe
Fix #348 - don’t warn about a little contravariance
2018-01-29 22:29:49 -05:00
Matt Brown
a2d11cce51
Fix static/self return type handling
2018-01-26 13:51:00 -05:00
Matt Brown
5e0a8c4339
Inherit correct self return type
2018-01-26 10:59:30 -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
d688b51534
Be strict about matching word boundaries for expected messages
...
E.g. don't allow InvalidPropertyAssignmentValue where
InvalidPropertyAssignment was expected
2018-01-11 18:04:11 -05:00
Matt Brown
2120d258a4
Fix formatting of return type adder
2018-01-11 15:50:58 -05:00
Matt Brown
b373d6093a
Be more lenient with nullable docblock types, allow no return statements
2018-01-08 17:17:49 -05:00
Matthew Brown
6f5a214365
Allow param redefinition, but complain if it differs to parent class
2018-01-05 00:19:35 -05:00
Matthew Brown
12aef22f05
Fix issue where byref differences would not be highlighted
2018-01-04 14:01:17 -05:00
Matthew Brown
17d208bdd5
Increase test coverage
2017-12-30 10:54:01 -05:00
Matthew Brown
0c2b2b69b3
Fix #348 - allow signature return types to be non-nullable if parent is nullable
2017-11-28 23:09:09 -05:00
Matthew Brown
afcbc113c9
Fix #228 , fix #336 by improving checking of inherited signatures
2017-11-26 16:03:17 -05:00
Matt Brown
7e8ae33d56
Fix #288 - get rid of MethodSignatureMismatch issues where PHP doesn’t worry
2017-11-13 16:31:33 -05:00
Matthew Brown
dd86513fc5
Fix #271 - remove invalid complaint about private overridden method
2017-11-08 21:27:23 -05: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
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
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
SignpostMarv
82c3a664a8
skip tests that extend SoapClient if SoapClient does not exist
2017-04-11 21:02:18 +01:00
Matthew Brown
41f7dc4a52
Fix #93 - fix MethodSignatureMismatch checks on builtin class methods
2017-02-09 17:49:13 -05:00
Matt Brown
a7872472be
Add stubbing tests and modify config initialisation
2017-01-31 19:22:05 -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
Matt Brown
fbbef2c320
Fix #45 - add issue when optional param used before required
2017-01-13 13:40:20 -05:00
Matt Brown
c104736ead
Fix #42 - detect false and null defaults
2017-01-13 12:26:10 -05:00
Matt Brown
c181f47364
Fix #35 and #40 by improving method signature checks
2017-01-13 12:03:22 -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
ee4a3882a7
Check method defaults to see whether they match
2016-12-30 23:40:32 -05:00
Matthew Brown
23a414a2b3
Fix test failures
2016-12-30 13:14:17 -05:00
Matthew Brown
8b5e066ba6
Add case-sensitive function names
2016-12-30 13:09:00 -05:00
Matthew Brown
9474412343
Add extra test to check good behaviour passes
2016-12-23 20:14:13 +00:00
Matthew Brown
52b3e1ba8c
Simplify test config setup;
2016-12-18 19:00:32 -05:00
Matt Brown
a44dd4f6b0
Add more tests
2016-12-14 19:43:44 -05:00