-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#599 add infection (mutation testing) to test runs #606
Conversation
… exception This failure was highlighted by random test execution order: hard to spot otherwise
…ed AST nodes Before this change, the `MemoizingParser` would keep the AST in memory as-is, but `nikic/php-parser`'s AST is mutable, and our tests do mutate that state. Running `vendor/bin/phpunit --random-order-seed=1590604675 --order-by=random` does highlight a number of failures caused by tests modifying the AST and tripping on each other. By making the memoization referentially transparent, we get rid of this huge design issue completely at the cost of some performance.
This is according to documentation at https://infection.github.io/guide/mutation-badge.html#How-to-set-it-up Reports will be at https://dashboard.stryker-mutator.io/reports/github.com/Roave/BetterReflection/master
…files If, for some reason, files are no longer accessible after having been included by the PHP process, then the `AutoloadSourceLocator` is supposed to skip them when looking for declared constants.
…HP 7.2 for good There's no point in trying to keep compatibility with multiple infection versions: killing the support for PHP 7.2 instead. This also means that this particular change will not land in `4.3.0`, but in a later release instead. Locking `composer.json` platform to PHP 7.3.0 to be sure that we don't update dependencies against something that is too new (most developers on the project are already on PHP 7.4.6+)
…lode them manually This leads to a lot of repetitive, but all-equal YAML, easy to split across multiple files and to compare later on. Ref: https://github.community/t/support-for-yaml-anchors/16128/33
… very-similar files While this is repetitive, it allows for quick introspection to check if they are still the same, or whether they need updating. Individual differences become much more evident, if you don't have to scroll through thousands of lines of YAML garbage. Ref: https://github.community/t/support-for-yaml-anchors/16128/33
…ed to look for constants We were using `is_readable()` before, but that's a bit fragile: we've already written a well-tested utility to verify file accessibility, so we use that instead. Ref: #606 (comment)
Windows images used by github actions don't seem to understand `php -dmemory_limit=-1`, possibly being escaped somehow: working around the issue by removing the limit in the base configuration of PHP itself.
@@ -0,0 +1,62 @@ | |||
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My eyes were spinning too much, so I split the workflows into multiple files that I could compare with diff
without going bananas.
Tried using anchors, but they aren't supported by GitHub's server-side parser.
@@ -3,7 +3,7 @@ | |||
"description": "Better Reflection - an improved code reflection API", | |||
"license": "MIT", | |||
"require": { | |||
"php": ">=7.2.0,<7.5.0", | |||
"php": ">=7.3.0,<7.5.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PHP 7.2.0 is gone: it isn't supported by infection/infection
, so I'd rather have it gone, and have this target 4.4.0
of this repo instead.
@ondrejmirtes I got this interesting error with this new patch:
Do you have a clue on what may be going on? It's running the phar version ( EDIT: looks like this was a hiccup 🤔 |
…ster` or pull requests Pushes are not going to be relevant to us unless a pull request is opened against upstream.
Gonna cut 4.3.0 as soon as I have a moment, will then merge and release with this too 👍 |
Co-authored-by: Alexander Berl <a.berl@outlook.com>
…ed to look for constants We were using `is_readable()` before, but that's a bit fragile: we've already written a well-tested utility to verify file accessibility, so we use that instead. Ref: Roave#606 (comment)
|
…ed to look for constants We were using `is_readable()` before, but that's a bit fragile: we've already written a well-tested utility to verify file accessibility, so we use that instead. Ref: Roave#606 (comment)
Fixes #599