1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00
Commit Graph

34 Commits

Author SHA1 Message Date
orklah
d8fea8aabb
implement DTO for plugins (#4881)
* implement DTO for plugins

* introduce EventHandler + reintroduce legacy API for plugins
2021-01-29 11:47:27 +01:00
orklah
e3e5a55907
unused use statements (#4228) 2021-01-29 11:39:42 +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
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
Bruce Weirdan
b23deaad01
Prevent tests from producing output (#3847)
* Prevent tests from producing output

- These are considered risky by PHPUnit
- And they mess up PHPUnit output

* Import used functions
2020-07-20 04:52:01 -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
d578c44a37 Add more mocking to tests 2020-06-06 16:57:25 -04:00
Brown
110df3e4f1 Fix ProjectAnalyzer test 2020-04-12 12:02:19 -04:00
Brown
aa5d82d30d Fix #2228 - load functions defined on traits included in a class 2019-10-15 12:09:08 -04:00
Matthew Brown
c5f62d261d Remove redundant @psalm-suppress in Psalm’s codebsae 2019-08-18 16:10:12 -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
Matthew Brown
b5cbc84351 Fix #1617 - add option to only show errors in reports 2019-06-09 12:37:28 -04:00
Brown
f9b509a210 Fix project checker test 2019-05-30 10:47: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
Matthew Brown
304ffeb0a3 Revert "Switch to VoidProgress by default"
This reverts commit 63b46be361.
2019-05-27 13:04:38 -04:00
Ilija Tovilo
63b46be361 Switch to VoidProgress by default 2019-05-26 23:18:48 -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
c772914910 Add some formatting 2019-03-23 14:27:54 -04:00
Matthew Brown
ee56419fd6 Improve accuracy and durability of mixed counts 2019-03-23 09:50:47 -04:00
Bruce Weirdan
9bdc9f774f More provider typing 2019-03-02 08:43:19 -05:00
Bruce Weirdan
3a2c457d87 More tests fixed 2019-03-02 08:43:19 -05:00
Bruce Weirdan
624789f6c0 dropped unused var 2019-02-26 01:16:22 -05:00
Bruce Weirdan
3f56f468dc added test 2019-02-26 01:16:22 -05:00
Bruce Weirdan
8408effe57 Dropped unused uses 2019-02-17 13:17:45 -05:00
Brown
c68209b8f3 Fix #1300 - add functions mentioned in class file where class is used 2019-02-08 17:41:03 -05:00
Brown
110ca66692 Namespace test providers under Internal cc @TysonAndre 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
1d5759a35c Improve test coverage of ProjectChecker 2018-10-17 11:03:32 -04:00