Use new column builder #1421
Annotations
11 warnings
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Run infection.:
src/Command/CreateCommand.php#L144
Escaped Mutant for Mutator "GreaterThan":
--- Original
+++ New
@@ @@
$name = $this->generateName($command, $table, $and);
$className = $this->migrationService->generateClassName($name);
$nameLimit = $this->migrator->getMigrationNameLimit();
- if ($nameLimit !== 0 && strlen($className) > $nameLimit) {
+ if ($nameLimit !== 0 && strlen($className) >= $nameLimit) {
$io->error('The migration name is too long.');
return Command::INVALID;
}
|
Run infection.:
src/Command/NewCommand.php#L107
Escaped Mutant for Mutator "ConcatOperandRemoval":
--- Original
+++ New
@@ @@
$io->section("Found {$n} new {$migrationWord}:");
}
foreach ($migrations as $i => $migration) {
- $output->writeln("<info>\t" . ($i + 1) . ". {$migration}</info>");
+ $output->writeln("<info>\t" . ". {$migration}</info>");
}
$this->migrationService->databaseConnection();
return Command::SUCCESS;
}
}
|
Run infection.:
src/Command/UpdateCommand.php#L144
Escaped Mutant for Mutator "Plus":
--- Original
+++ New
@@ @@
$migrationWas = $migrationsCount === 1 ? 'migration was' : 'migrations were';
foreach ($instances as $i => $instance) {
try {
- $this->updateRunner->run($instance, $i + 1);
+ $this->updateRunner->run($instance, $i - 1);
} catch (Throwable $e) {
$output->writeln("\n<fg=yellow> >>> Total {$i} out of {$migrationsCount} new {$migrationWas} applied.</>\n");
$io->error($i > 0 ? 'Partially updated.' : 'Not updated.');
|
Run infection.:
src/Service/MigrationService.php#L141
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
foreach ($migrationPaths as $item) {
[$sourcePath, $namespace] = $item;
if (!is_dir($sourcePath)) {
- continue;
+ break;
}
$handle = opendir($sourcePath);
while (($file = readdir($handle)) !== false) {
|
Run infection.:
src/Service/MigrationService.php#L152
Escaped Mutant for Mutator "PregMatchRemoveCaret":
--- Original
+++ New
@@ @@
continue;
}
$path = $sourcePath . DIRECTORY_SEPARATOR . $file;
- if (is_file($path) && preg_match('/^(M(\\d{12}).*)\\.php$/s', $file, $matches)) {
+ if (is_file($path) && preg_match('/(M(\\d{12}).*)\\.php$/s', $file, $matches)) {
[, $class, $time] = $matches;
if (!empty($namespace)) {
$class = $namespace . '\\' . $class;
|
Run infection.:
src/Service/MigrationService.php#L152
Escaped Mutant for Mutator "PregMatchRemoveDollar":
--- Original
+++ New
@@ @@
continue;
}
$path = $sourcePath . DIRECTORY_SEPARATOR . $file;
- if (is_file($path) && preg_match('/^(M(\\d{12}).*)\\.php$/s', $file, $matches)) {
+ if (is_file($path) && preg_match('/^(M(\\d{12}).*)\\.php/s', $file, $matches)) {
[, $class, $time] = $matches;
if (!empty($namespace)) {
$class = $namespace . '\\' . $class;
|
Run infection.:
src/Service/MigrationService.php#L152
Escaped Mutant for Mutator "PregMatchRemoveFlags":
--- Original
+++ New
@@ @@
continue;
}
$path = $sourcePath . DIRECTORY_SEPARATOR . $file;
- if (is_file($path) && preg_match('/^(M(\\d{12}).*)\\.php$/s', $file, $matches)) {
+ if (is_file($path) && preg_match('/^(M(\\d{12}).*)\\.php$/', $file, $matches)) {
[, $class, $time] = $matches;
if (!empty($namespace)) {
$class = $namespace . '\\' . $class;
|
Run infection.:
src/Service/MigrationService.php#L162
Escaped Mutant for Mutator "Concat":
--- Original
+++ New
@@ @@
}
/** @psalm-var class-string $class */
if (!isset($applied[$class])) {
- $migrations[$time . '\\' . $class] = $class;
+ $migrations['\\' . $time . $class] = $class;
}
}
}
|
Run infection.:
src/Service/MigrationService.php#L162
Escaped Mutant for Mutator "ConcatOperandRemoval":
--- Original
+++ New
@@ @@
}
/** @psalm-var class-string $class */
if (!isset($applied[$class])) {
- $migrations[$time . '\\' . $class] = $class;
+ $migrations['\\' . $class] = $class;
}
}
}
|
Run infection.:
src/Service/MigrationService.php#L162
Escaped Mutant for Mutator "ConcatOperandRemoval":
--- Original
+++ New
@@ @@
}
/** @psalm-var class-string $class */
if (!isset($applied[$class])) {
- $migrations[$time . '\\' . $class] = $class;
+ $migrations[$time . $class] = $class;
}
}
}
|
Loading