Skip to content

Commit

Permalink
Merge pull request #195 from Roave/dependabot/composer/infection/infe…
Browse files Browse the repository at this point in the history
…ction-0.23.0

Bump infection/infection from 0.20.2 to 0.23.0
  • Loading branch information
Ocramius authored May 13, 2021
2 parents e11a4e9 + 8528ad9 commit c1e5428
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 63 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
],
"require": {
"php": "~7.4.7|~8.0.0",
"infection/infection": "0.20.2",
"infection/infection": "0.23.0",
"ocramius/package-versions": "^1.9.0 || ^2.0.0",
"sanmai/later": "^0.1.2",
"vimeo/psalm": "^4.7.2"
},
"require-dev": {
Expand Down
138 changes: 103 additions & 35 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
beStrictAboutTodoAnnotatedTests="true"
executionOrder="random"
>
<php>
<ini name="memory_limit" value="-1"/>
</php>

<testsuites>
<testsuite name="Roave\InfectionStaticAnalysis tests">
<directory>./test/unit</directory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
use Infection\Process\MutantProcess;
use Roave\InfectionStaticAnalysis\Psalm\RunStaticAnalysisAgainstMutant;

use function Later\later;

/**
* @internal
*
Expand Down Expand Up @@ -44,12 +46,12 @@ public function createFromProcess(MutantProcess $mutantProcess): MutantExecution
$result->getProcessCommandLine(),
$result->getProcessOutput(),
DetectionStatus::KILLED, // Mutant was squished by static analysis
$result->getMutantDiff(),
later(static fn () => yield $result->getMutantDiff()),
$result->getMutatorName(),
$result->getOriginalFilePath(),
$result->getOriginalStartingLine(),
$result->getOriginalCode(),
$result->getMutatedCode()
later(static fn () => yield $result->getOriginalCode()),
later(static fn () => yield $result->getMutatedCode())
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
use function define;
use function defined;
use function file_put_contents;
use function Later\now;
use function sys_get_temp_dir;
use function tempnam;
use function unlink;
Expand Down Expand Up @@ -112,9 +113,9 @@ function hasMethod(object $input, string $method): bool {
0,
[]
),
$validCode,
'',
''
now($validCode),
now(''),
now('')
);

$this->mutantWithInvalidCode = new Mutant(
Expand All @@ -129,9 +130,9 @@ function hasMethod(object $input, string $method): bool {
0,
[]
),
$invalidCode,
'',
''
now($invalidCode),
now(''),
now('')
);

$this->mutantWithValidCodeReferencingProjectFiles = new Mutant(
Expand All @@ -146,9 +147,9 @@ function hasMethod(object $input, string $method): bool {
0,
[]
),
$validCodeReferencingProjectFiles,
'',
''
now($validCodeReferencingProjectFiles),
now(''),
now('')
);

$this->mutantWithValidCodeReferencingReflectionApi = new Mutant(
Expand All @@ -163,9 +164,9 @@ function hasMethod(object $input, string $method): bool {
0,
[]
),
$validCodeReferencingProjectFiles,
'',
''
now($validCodeReferencingProjectFiles),
now(''),
now('')
);

if (! defined('PSALM_VERSION')) {
Expand Down
Loading

0 comments on commit c1e5428

Please sign in to comment.