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
Invalid mutator config #1479
Comments
I can't reproduce the issue for 0.21 and master locally for Infection itself. It also works for 0.20.1
Could you please provide the whole config (probably it's a combination of settings leading to this issue), or minimal reproducible case? |
Hm for some reasons I cannot reproduce it anymore locally... I'll close it for now and open it again with a more thorough investigation or a reproducer |
Hi, I have the same issue updating from Hereafter the trace: ./vendor/bin/infection -s --threads=$(nproc) --min-msi=95 --min-covered-msi=95
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Infection\Mutator\MutatorResolver::Infection\Mutator\{closure}() must be of the type array, object given in /mnt/vendor/infection/infection/src/Mutator/MutatorResolver.php:142
Stack trace:
#0 [internal function]: Infection\Mutator\MutatorResolver::Infection\Mutator\{closure}()
#1 /mnt/vendor/infection/infection/src/Mutator/MutatorResolver.php(143): array_map()
#2 /mnt/vendor/infection/infection/src/Mutator/MutatorResolver.php(90): Infection\Mutator\MutatorResolver::resolveSettings()
#3 /mnt/vendor/infection/infection/src/Configuration/ConfigurationFactory.php(196): Infection\Mutator\MutatorResolver->resolve()
#4 /mnt/vendor/infection/infection/src/Configuration/ConfigurationFactory.php(137): Infection\Configuration\ConfigurationFactory->resolveMutators()
#5 /mnt/vendor/infection/infection/src/Mutator/MutatorResolver.php on line 142 My configuration file: {
"source": {
"directories": [
"src"
]
},
"logs": {
"text": "infection.log"
},
"mutators": {
"@default": true,
"global-ignoreSourceCodeByRegex": [
"\\$this->logger.*",
"\\$this->cache->save.*",
"parent::build(\\$container);"
],
"MBString": {
"settings": {
"mb_substr": false,
"mb_strlen": false
}
}
}
} |
Can't reproduce it on the playground but it has not been updated to 0.21 yet: https://infection-php.dev/r/yg6k |
Good news: deployed 0.21.2 to Playground |
Fixed and released https://github.com/infection/infection/releases/tag/0.21.4 cc @Spomky |
Excellent! I will update ASAP my projects and check if it is fine now. |
At first glance:
results in an error although I believe it's the correct way to configure it or at least it's the one suggested from the schema...
Error (in PHP 7.4, infection 0.21.0):
The text was updated successfully, but these errors were encountered: