CLI-1276: no-scripts doesn't disable composer hooks #2093
Annotations
7 warnings
Run Infection for added files only:
src/EventListener/ComposerScriptsListener.php#L50
Escaped Mutant for Mutator "UnwrapStrReplace":
--- Original
+++ New
@@ @@
$composerJson = json_decode($command->localMachineHelper->readFile($composerJsonFilepath), TRUE, 512, JSON_THROW_ON_ERROR);
$commandName = $command->getName();
// Replace colons with hyphens. E.g., pull:db becomes pull-db.
- $scriptName = $prefix . '-acli-' . str_replace(':', '-', $commandName);
+ $scriptName = $prefix . '-acli-' . $commandName;
if (array_key_exists('scripts', $composerJson) && array_key_exists($scriptName, $composerJson['scripts'])) {
$event->getOutput()->writeln("Executing composer script `{$scriptName}` defined in `{$composerJsonFilepath}`", OutputInterface::VERBOSITY_VERBOSE);
$event->getOutput()->writeln($scriptName);
|
Run Infection for added files only:
src/EventListener/ComposerScriptsListener.php#L51
Escaped Mutant for Mutator "LogicalAnd":
--- Original
+++ New
@@ @@
$commandName = $command->getName();
// Replace colons with hyphens. E.g., pull:db becomes pull-db.
$scriptName = $prefix . '-acli-' . str_replace(':', '-', $commandName);
- if (array_key_exists('scripts', $composerJson) && array_key_exists($scriptName, $composerJson['scripts'])) {
+ if (array_key_exists('scripts', $composerJson) || array_key_exists($scriptName, $composerJson['scripts'])) {
$event->getOutput()->writeln("Executing composer script `{$scriptName}` defined in `{$composerJsonFilepath}`", OutputInterface::VERBOSITY_VERBOSE);
$event->getOutput()->writeln($scriptName);
$command->localMachineHelper->execute(['composer', 'run-script', $scriptName]);
|
Run Infection for added files only:
src/EventListener/ComposerScriptsListener.php#L52
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
// Replace colons with hyphens. E.g., pull:db becomes pull-db.
$scriptName = $prefix . '-acli-' . str_replace(':', '-', $commandName);
if (array_key_exists('scripts', $composerJson) && array_key_exists($scriptName, $composerJson['scripts'])) {
- $event->getOutput()->writeln("Executing composer script `{$scriptName}` defined in `{$composerJsonFilepath}`", OutputInterface::VERBOSITY_VERBOSE);
+
$event->getOutput()->writeln($scriptName);
$command->localMachineHelper->execute(['composer', 'run-script', $scriptName]);
} else {
|
Run Infection for added files only:
src/EventListener/ComposerScriptsListener.php#L53
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$scriptName = $prefix . '-acli-' . str_replace(':', '-', $commandName);
if (array_key_exists('scripts', $composerJson) && array_key_exists($scriptName, $composerJson['scripts'])) {
$event->getOutput()->writeln("Executing composer script `{$scriptName}` defined in `{$composerJsonFilepath}`", OutputInterface::VERBOSITY_VERBOSE);
- $event->getOutput()->writeln($scriptName);
+
$command->localMachineHelper->execute(['composer', 'run-script', $scriptName]);
} else {
$event->getOutput()->writeln("Notice: Composer script `{$scriptName}` does not exist in `{$composerJsonFilepath}`, skipping. This is not an error.", OutputInterface::VERBOSITY_VERBOSE);
|
Run Infection for added files only:
src/EventListener/ComposerScriptsListener.php#L54
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
if (array_key_exists('scripts', $composerJson) && array_key_exists($scriptName, $composerJson['scripts'])) {
$event->getOutput()->writeln("Executing composer script `{$scriptName}` defined in `{$composerJsonFilepath}`", OutputInterface::VERBOSITY_VERBOSE);
$event->getOutput()->writeln($scriptName);
- $command->localMachineHelper->execute(['composer', 'run-script', $scriptName]);
+ $command->localMachineHelper->execute(['run-script', $scriptName]);
} else {
$event->getOutput()->writeln("Notice: Composer script `{$scriptName}` does not exist in `{$composerJsonFilepath}`, skipping. This is not an error.", OutputInterface::VERBOSITY_VERBOSE);
}
|
Run Infection for added files only:
src/EventListener/ComposerScriptsListener.php#L54
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
if (array_key_exists('scripts', $composerJson) && array_key_exists($scriptName, $composerJson['scripts'])) {
$event->getOutput()->writeln("Executing composer script `{$scriptName}` defined in `{$composerJsonFilepath}`", OutputInterface::VERBOSITY_VERBOSE);
$event->getOutput()->writeln($scriptName);
- $command->localMachineHelper->execute(['composer', 'run-script', $scriptName]);
+
} else {
$event->getOutput()->writeln("Notice: Composer script `{$scriptName}` does not exist in `{$composerJsonFilepath}`, skipping. This is not an error.", OutputInterface::VERBOSITY_VERBOSE);
}
|
Run Infection for added files only:
src/EventListener/ComposerScriptsListener.php#L57
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$event->getOutput()->writeln($scriptName);
$command->localMachineHelper->execute(['composer', 'run-script', $scriptName]);
} else {
- $event->getOutput()->writeln("Notice: Composer script `{$scriptName}` does not exist in `{$composerJsonFilepath}`, skipping. This is not an error.", OutputInterface::VERBOSITY_VERBOSE);
+
}
}
}
}
}
|
The logs for this run have expired and are no longer available.
Loading