- Guide
- Playground
- GitHub
-
Ecosystem
Help
Resource Lists
Recent Posts
- What's new in Infection 0.26.0
- What's new in Infection 0.25.0
- What's new in Infection 0.24.0
- What's new in Infection 0.23.0
- What's new in Infection 0.21.0
- What's new in Infection 0.20.0
- What's new in Infection 0.19.0
- What's new in Infection 0.18.0
- What's new in Infection 0.17.0
- What's new in Infection 0.16.0
What's new in Infection 0.12.0
Jan 24, 2019
Release: https://github.com/infection/infection/releases/tag/0.12.0
BC Breaks
TrueValue
mutator does not mutate the 3rd parameter true
in the following functions anymore:
in_array
array_search
New features and enhancements
Settings for Mutators
We’ve added an ability to configure Mutators in infection.json
file. For example, TrueValue
Mutator can be explicitly enabled for in_array
and array_search
functions:
{ |
symfony/phpunit-bridge
support
Previously, Infection didn’t recognize simple-phpunit
executable, failing with an error. Now it works as expected when bridge is used separately or as part of symfony/flex
installation.
Logging
Running command with --only-covered
now logs only covered code mutations, making it easier to analyze results.
New Mutators
array_splice
This mutator takes the first argument of array_splice()
function and assigns it to the variable, removing the function call.
- $a = array_splice(['A', 'B', 'C'], 1); |
array_slice
- $a = array_slice(['A', 'B', 'C'], 1); |
array_change_key_case
- $a = array_change_key_case(['foo' => 'bar']); |
array_column
- $a = array_column([['foo' => 'bar]], 'foo'); |
array_diff_key
- $a = array_diff_key(['foo' => 'bar'], ['baz' => 'bar]); |
array_diff_ukey
- $a = array_diff_ukey(['foo' => 'bar'], ['baz' => 'bar], $callable); |
array_diff_assoc
- $a = array_diff_assoc(['foo' => 'bar'], ['baz' => 'bar]); |
array_diff_uassoc
- $a = array_diff_assoc(['foo' => 'bar'], ['baz' => 'bar], $callback); |
array_intersect_ukey
- $a = array_intersect_ukey(['foo' => 'bar'], ['bar' => 'baz']); |
array_intersect_key
- $a = array_intersect_key(['foo' => 'bar'], ['bar' => 'baz']); |
array_intersect_uassoc
- $a = array_intersect_uassoc(['foo' => 'bar'], ['bar' => 'baz']); |
array_merge_recursive
- $a = array_merge_recursive(['A', 'B', 'C'], ['D']); |
array_udiff_assoc
- $a = array_udiff_assoc(['foo' => 'bar'], ['baz' => 'bar], $callback); |
Enjoy!