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

20 Commits

Author SHA1 Message Date
orklah
6e3546d900
return types (#4311)
* return types

* remove willReturn for void methods
2021-01-29 11:39:53 +01:00
orklah
f1aba254be
Use array destructuring when possible (#4221)
* list usage

* fix inversion
2021-01-29 11:39:39 +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
1ac27d6d22
Fix prophecy warnings (#4051)
* Use weirdan/prophecy-shim to avoid PHPUnit warnings on prophesize() calls

* Drop vcs repo as the package is already available on packagist

* Bump psalm/plugin-phpunit

Fixes Prophecy-related issues
2021-01-29 11:38:44 +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
Matthew Brown
77fbbe4c11 Fix commas 2020-02-16 18:30:05 -05:00
Matthew Brown
196a0a5c4e Replace issue data array with object 2020-02-16 18:24:40 -05:00
Matthew Brown
d4ceabc174 Fix error baseline test 2020-01-21 21:22:38 -05:00
Baptiste Clavié
5217156068 Support comments in ErrorBaseline (#2311) 2019-11-07 13:03:18 -05:00
Brown
73b1571bd7 Remove php version from default baseline generation 2019-07-11 10:41:44 -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
3a5a347b0b Fix #1747 - be tolerant of slash differences in baseline 2019-06-09 10:30:14 -04:00
Brown
0bd4dbcbc4 Bump to PHP 7.1
Fixes #1650
2019-05-16 18:36:36 -04:00
Matthew Brown
c772914910 Add some formatting 2019-03-23 14:27:54 -04:00
Maria Luiza Soares
5bd16c686f Show total fixed errors when updating baseline 2019-02-09 11:20:48 -05:00
Matthew Brown
27687244f0 Normalise baseline file slashes
Fixes #1192
2019-01-10 00:10:16 -05:00
Matthew Brown
4688b25fd9 Move internal classes to own namespace 2018-11-12 11:20:59 -05:00
Matthew Brown
f2f8edef20 Fix #1062 - improve handling of baseline messaging 2018-11-09 00:47:43 -05:00
Erik Booij
635410ea41 Introduce issue baseline with --set-baseline and --with-baseline 2018-11-01 11:16:08 -04:00