Historically it was often not quite clear to users what PHP version
Psalm assumes, and why. This PR addresses this issue by printing the
version and where we got it from right before scanning the files.
Convert deltafile format to new style proposed by weirdan
Modify CallMapTest to use new format
Modify InternalCallMapHandler to use new format
Move assertions to base testcase
* 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
See: https://github.com/vimeo/psalm/issues/2869\#issuecomment-590490908
Previously, If a plugin tried to reuse the TestConf / TestCase
an exception would likely occur since the default testconfig
is hardcoded to our internal psalm codebase
This commit allows a custom config to be passed into a testcase
thus, a plugin's codebase does not need to match our own.
* 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
* upgrade phpunit, test with low and high deps
* work around possibly-anonymous test cases introduced by newer PHPUnit
* Alternative TestCase::getName() nullability workaround
Previous workaround was failing due to PHP warnings on 7.1 or 7.2
(depending on specific signature). There's just no signature that would
be working for all 4 variants of (ver / dep) matrix.
* don't disable xdebug if it's not enabled
* allowed 7.0/high to fail until PHPUnit 6.5.10 is released
see sebastianbergmann/phpunit#3209