You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This used to work perfectly well as the file was completely ignored but recently (unfortunately I'm not able to check when) it started to fail, as the excluded file started to be processed by the mutant generator (tokenized) and crashed.
I temporarily solved it by passing --only-covered flag to avoid this file from being loaded but ideally, files mentioned in excluded should be omitted completely.
Infection - PHP Mutation Testing Framework version 0.27.11
Running initial test suite...
PHPUnit version: 9.6.15
175 [============================] 5 secs
Generate mutants...
Processing source code files: 25/25
.: killed, M: escaped, U: uncovered, E: fatal error, X: syntax error, T: timed out, S: skipped, I: ignored
.................................................. ( 50 / 357)
.................................................. (100 / 357)
.................................................. (150 / 357)
.................................................. (200 / 357)
.................................................. (250 / 357)
.................................................. (300 / 357)
.................................................. (350 / 357)
....... (357 / 357)
357 mutations were generated:
357 mutants were killed
0 mutants were configured to be ignored
0 mutants were not covered by tests
0 covered mutants were not detected
0 errors were encountered
0 syntax errors were encountered
0 time outs were encountered
0 mutants required more time than configured
Metrics:
Mutation Score Indicator (MSI): 100%
Mutation Code Coverage: 100%
Covered Code MSI: 100%
Output with issue
Infection - PHP Mutation Testing Framework version 0.27.11
Running initial test suite...
PHPUnit version: 9.6.15
174 [============================] 6 secs
Generate mutants...
Processing source code files: 21/26
Fatal error: Declaration of IonBazan\ComposerDiff\Command\BaseNotTypedCommand::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output) must be compatible with Symfony\Component\Console\Command\Command::execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int in /Users/ionbazan/work/composer-diff/src/Command/BaseNotTypedCommand.php on line 16
The text was updated successfully, but these errors were encountered:
I am using Infection together with PHPUnit in my tool: https://github.com/IonBazan/composer-diff which targets PHP versions 5.3~8.4 so I'm conditionally aliasing some classes depending on PHP version as a polyfill for Symfony 7:
https://github.com/IonBazan/composer-diff/blob/d7f3cd5333c760d5bdfe0178571c99f52979bb9f/src/Command/DiffCommand.php#L15-L24
Since
BaseNotTypedCommand
remains uncovered when running under PHP 7+, I added it to excludes:https://github.com/IonBazan/composer-diff/blob/d7f3cd5333c760d5bdfe0178571c99f52979bb9f/infection.json.dist#L2-L9
This used to work perfectly well as the file was completely ignored but recently (unfortunately I'm not able to check when) it started to fail, as the excluded file started to be processed by the mutant generator (tokenized) and crashed.
I temporarily solved it by passing
--only-covered
flag to avoid this file from being loaded but ideally, files mentioned inexcluded
should be omitted completely.The last time it worked was on 29 Dec 2023, if that helps: IonBazan/composer-diff@005967f
Output after passing `--only-covered`
Output with issue
The text was updated successfully, but these errors were encountered: