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

23 Commits

Author SHA1 Message Date
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
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
2369bac943 Preserve self refs where possible 2019-11-16 19:59:08 -05:00
Brown
55bf6a2db3 Migrate static return types 2019-11-15 16:50:43 -05:00
Brown
4747ba709a Migrate more things 2019-11-15 15:34:25 -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
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
1bc1af140f Move method calls outside classes and __CLASS__ constants 2019-06-14 15:54:15 -04:00
Brown
010f911d22 Fix replacement of local types 2019-06-11 10:33:52 -04:00
Brown
45f2d986e6 Allow multiple class renames at once 2019-06-10 17:09:34 -04:00
Matthew Brown
20c66f693e Fix handling of class const types 2019-06-06 18:46:40 -04:00
Matthew Brown
36ac342496 Fix handling of property type with default 2019-06-06 17:42:23 -04:00
Matthew Brown
b091ceaa9a Fix union of literal class string 2019-06-06 17:18:24 -04:00
Brown
b1d1ab974c Preserve formatting of callable type 2019-06-06 14:27:49 -04:00
Brown
0221282074 Be resilient to docblock spaces 2019-06-06 13:57:00 -04:00
Matthew Brown
0287adfd44 Fix const replacements when moving classes 2019-06-06 07:05:30 -04:00
Matthew Brown
4fc5d1d5c8 Rewrite use statements 2019-06-05 22:13:33 -04:00
Brown
ddd287fb3d Move exception classes 2019-06-05 11:33:04 -04:00
Brown
6f0a6201de Fix static calls after moving 2019-06-05 11:22:09 -04:00
Brown
3e15fa8bfe Fix bad namespacing 2019-06-05 11:15:52 -04:00
Brown
f309c755f8 Add ability to move classes 2019-06-05 08:50:24 -04:00