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

58 Commits

Author SHA1 Message Date
Matt Brown
7206db2cb6
Fix #4705 - clear documenting method ids when scanning stubs 2021-01-29 11:47:10 +01:00
Matt Brown
14040ed1fa
Add failing testcase for #4705 2021-01-29 11:47:10 +01:00
Matt Brown
fbafb9e97f
Fix #4509 - treat expression-derived constants as mixed 2021-01-29 11:46:06 +01:00
orklah
e3e5a55907
unused use statements (#4228) 2021-01-29 11:39:42 +01:00
Brown
e9fb3dcad2
Fix various things 2021-01-29 11:39:36 +01:00
Brown
d53a9313a5
Fix stub test 2021-01-29 11:39:36 +01:00
Bruce Weirdan
4319132057
Added @psalm-stub-override for classlikes and methods (#4177)
Fixes vimeo/psalm#1252
2021-01-29 11:39:34 +01:00
orklah
db45ff1ba4
More return types (#4173)
* add native return types

* redundant phpdoc
2021-01-29 11:38:57 +01:00
orklah
61512da144
add native return types (#4116)
* add native return types

* remove redundant phpdoc
2021-01-29 11:38:53 +01:00
Brown
e585955c96
Use immutable data structures for clause calculations 2021-01-29 11:38:45 +01:00
Bruce Weirdan
dabfb16e34
Test parallelization (#4045)
* Run tests in random order

Being able to run tests in any order is a pre-requisite for being able
to run them in parallel.

* Reset type coverage between tests, fix affected tests

* Reset parser and lexer between test runs and on php version change

Previously lexer was reset, but parser kept the reference to the old
one, and reference to the parser was kept by StatementsProvider. This
resulted in order-dependent tests - if the parser was first initialized
with phpVersion set to 7.4 then arrow functions worked fine, but were
failing when the parser was initially constructed with settings for 7.3

This can be demonstrated on current master by upgrading to
nikic/php-parser:4.9 and running:

```
vendor/bin/phpunit --no-coverage --filter="inferredArgArrowFunction" tests/ClosureTest.php
```

Now all tests using PHP 7.4 features must set the PHP version
accordingly.

* Marked more tests using 7.4 syntax

* Reset newline-between-annotation flag between tests

* Resolve real paths before passing them to checkPaths

When checkPaths is called from psalm.php the paths are resolved, so we
just mimicking SUT behaviour here.

* Restore newline-between-annotations in DocCommentTest

* Tweak Appveyor caches

* Tweak TravisCI caches

* Tweak CircleCI caches

* Run tests in parallel

Use `vendor/bin/paratest` instead of `vendor/bin/phpunit`

* Use default paratest runner on Windows

WrapperRunner is not supported on Windows.

* TRAVIS_TAG could be empty

* Restore appveyor conditional caching
2021-01-29 11:38:04 +01:00
Brown
209d17c868 Fix #2891 - treat autoloaded constants better 2020-08-13 09:14:27 -04:00
Bruce Weirdan
931d35a703
Collect and scan files included by the autoloaders (#3183)
Refs vimeo/psalm#2861
2020-07-11 17:17:22 -04:00
Brown
317571f1b2 Fix reset call 2020-06-21 13:03:55 -04:00
Brown
fbe3433edd Use escape terminology 2020-06-21 11:43:08 -04:00
Matthew Brown
39f7296670 Fix #2191 - allow inheritance from stub-only files 2020-03-29 00:13:01 -04:00
Matthew Brown
47c1470e3b Refactor reference checks to use more appropriate properties 2020-03-28 16:30:56 -04:00
Matthew Brown
2e6fe993a8 Fix #2890 - phpstorm.meta.php scanner should be insensitive to method names 2020-03-01 17:11:44 -05:00
kolja
d3727fe45f Made StubTest for relative and absolute paths work on windows too. 2020-02-27 17:07:24 -05:00
kolja
f189b25b99 Fixed stub files with absolute paths not being loaded. 2020-02-26 17:13:40 -05:00
Brown
821f3528d2 Fix #701 - indicate issues fixable with Psalter 2019-12-02 15:24:01 -05:00
Matthew Brown
5f0514b3da Remove stray comma 2019-09-01 16:55:03 -04:00
Matthew Brown
9cbe389285 Fix #910 - dead code issues with abstract vendor method 2019-09-01 16:52:40 -04:00
Brown
12eeb8b320 Fix #1935 - clear stub grandchildren 2019-07-11 18:23:02 -04:00
Brown
7d05568e22 Add skipped test for broken stubbing behaviour
Ref #1935
2019-07-11 12:51:43 -04:00
Matthew Brown
da42be175f Apply PHPCS fixes
Fixes #1880
2019-07-05 16:27:53 -04:00
Brown
6514f2084c Fix #1860 - be less restrictive about class_exists checks 2019-06-28 10:17:59 -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
Matthew Brown
158a2150a7 Fix #1752 - don’t enter if/else when class/interfaces/functions don’t exist 2019-06-09 23:50:28 -04:00
Ilija Tovilo
5a14e4b1cf Progress bar (#1709)
* Revert "Revert "Implement better progress""

This reverts commit 4302596654.

* Revert "Revert "Implement dots progress bar""

This reverts commit e41733d789.

* Revert "Revert "Switch to VoidProgress by default""

This reverts commit 304ffeb0a3.

* Revert "Revert "Pass success flag to progress""

This reverts commit 62a690ee4e.

* Improve socket communication

* Use an underscore

* Add means to disable progress

* Add extra newline before progress bar
2019-05-30 10:30:41 -04:00
Matthew Brown
4302596654 Revert "Implement better progress"
This reverts commit 042070d0fd.
2019-05-27 13:07:02 -04:00
Ilija Tovilo
042070d0fd Implement better progress 2019-05-26 23:18:48 -04:00
Brown
0bd4dbcbc4 Bump to PHP 7.1
Fixes #1650
2019-05-16 18:36:36 -04:00
Brown
d75ac7f55d Move test fixtures to a single directory 2019-05-09 18:23:14 -04:00
Matthew Brown
d68e501bfa Fix #1528 - double check for missing dependency 2019-04-21 11:30:50 -04:00
Matthew Brown
496a175a9f Fix #1497 - respect constants stubbed in define() calls 2019-03-25 00:07:32 -04:00
Matthew Brown
c772914910 Add some formatting 2019-03-23 14:27:54 -04:00
Matthew Brown
6eb634da7e Fix #1477 - use less common exception for stubbing 2019-03-17 12:46:48 -04:00
Brown
601f303de2 Fix position of invalid param 2019-02-27 16:00:44 -05:00
Matthew Brown
356a45a155 Improve ergonomics of PHPStorm meta parsing 2019-02-16 18:50:25 -05:00
Matthew Brown
fa362b04cb Fix treatment of '' => '@' mapped value 2019-02-16 12:16:34 -05:00
Matthew Brown
0739d017ac Use information from .phpstorm.meta.php files in stubs 2019-02-16 11:16:52 -05:00
Matthew Brown
a6755cc523 Fix default test versions to 7.3 2019-02-07 15:27:43 -05:00
Matthew Brown
fab4d135b2 Fix static calls on class_aliased classes 2018-12-21 11:39:28 -05:00
Matthew Brown
e744e71946 Fix class_alias treatment for interfaces and others 2018-12-21 09:29:23 -05:00
Matthew Brown
02003d9996 Understand class_alias calls better
Ref #1135
2018-12-21 01:21:00 -05:00
Brown
4e183abdc6 Add better message when reconciling fails with bad result
Ref #1114
2018-12-05 10:36:42 -05:00
Brown
ef49e3984b Fix #945 - allow ...$foo in docblock for non-user files to inform variadic 2018-11-30 19:21:14 -05:00
Matthew Brown
1eb11a43b0 Fix #1102 by supporting class_alias properly 2018-11-29 00:46:34 -05:00
Matthew Brown
26947888f6 Add some basic support for class_alias 2018-11-29 00:05:56 -05:00