Skip to content

Use new column builder #1414

Use new column builder

Use new column builder #1414

Triggered via pull request December 12, 2024 04:02
Status Success
Total duration 7m 4s
Artifacts

mutation.yml

on: pull_request
Matrix: mutation
Fit to window
Zoom out
Zoom in

Annotations

11 warnings
PHP 8.3
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
PHP 8.3: src/Command/CreateCommand.php#L118
Escaped Mutant for Mutator "PregMatchRemoveCaret": --- Original +++ New @@ @@ } /** @var string $table */ $table = $input->getArgument('name'); - if (!preg_match('/^[\\w\\\\]+$/', $table)) { + if (!preg_match('/[\\w\\\\]+$/', $table)) { $io->error('The migration name should contain letters, digits, underscore and/or backslash characters only.'); return Command::INVALID; }
PHP 8.3: src/Command/CreateCommand.php#L144
Escaped Mutant for Mutator "DecrementInteger": --- 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 !== -1 && strlen($className) > $nameLimit) { $io->error('The migration name is too long.'); return Command::INVALID; }
PHP 8.3: src/Command/CreateCommand.php#L187
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ $file = $migrationPath . DIRECTORY_SEPARATOR . $className . '.php'; file_put_contents($file, $content, LOCK_EX); $output->writeln("\n\t<info>{$className}</info>"); - $output->writeln("\n"); + $io->success('New migration created successfully.'); } $this->migrationService->databaseConnection();
PHP 8.3: src/Command/CreateCommand.php#L203
Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ return match ($command) { 'create' => $name, 'table' => 'Create_' . $name . '_Table', - 'dropTable' => 'Drop_' . $name . '_Table', + 'dropTable' => $name . 'Drop_' . '_Table', 'addColumn' => 'Add_Column_' . $name, 'dropColumn' => 'Drop_Column_' . $name, 'junction' => 'Junction_Table_For_' . $name . '_And_' . (string) $and . '_Tables',
PHP 8.3: src/Command/CreateCommand.php#L203
Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ return match ($command) { 'create' => $name, 'table' => 'Create_' . $name . '_Table', - 'dropTable' => 'Drop_' . $name . '_Table', + 'dropTable' => 'Drop_' . '_Table' . $name, 'addColumn' => 'Add_Column_' . $name, 'dropColumn' => 'Drop_Column_' . $name, 'junction' => 'Junction_Table_For_' . $name . '_And_' . (string) $and . '_Tables',
PHP 8.3: src/Command/CreateCommand.php#L205
Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ 'table' => 'Create_' . $name . '_Table', 'dropTable' => 'Drop_' . $name . '_Table', 'addColumn' => 'Add_Column_' . $name, - 'dropColumn' => 'Drop_Column_' . $name, + 'dropColumn' => $name . 'Drop_Column_', 'junction' => 'Junction_Table_For_' . $name . '_And_' . (string) $and . '_Tables', default => $result, }; } }
PHP 8.3: src/Command/CreateCommand.php#L205
Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ 'table' => 'Create_' . $name . '_Table', 'dropTable' => 'Drop_' . $name . '_Table', 'addColumn' => 'Add_Column_' . $name, - 'dropColumn' => 'Drop_Column_' . $name, + 'dropColumn' => 'Drop_Column_', 'junction' => 'Junction_Table_For_' . $name . '_And_' . (string) $and . '_Tables', default => $result, }; } }
PHP 8.3: src/Command/CreateCommand.php#L206
Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ 'dropTable' => 'Drop_' . $name . '_Table', 'addColumn' => 'Add_Column_' . $name, 'dropColumn' => 'Drop_Column_' . $name, - 'junction' => 'Junction_Table_For_' . $name . '_And_' . (string) $and . '_Tables', + 'junction' => 'Junction_Table_For_' . $name . (string) $and . '_And_' . '_Tables', default => $result, }; } }
PHP 8.3: src/Command/CreateCommand.php#L206
Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ 'dropTable' => 'Drop_' . $name . '_Table', 'addColumn' => 'Add_Column_' . $name, 'dropColumn' => 'Drop_Column_' . $name, - 'junction' => 'Junction_Table_For_' . $name . '_And_' . (string) $and . '_Tables', + 'junction' => 'Junction_Table_For_' . $name . '_And_' . '_Tables' . (string) $and, default => $result, }; } }
PHP 8.3: src/Command/UpdateCommand.php#L127
Escaped Mutant for Mutator "Plus": --- Original +++ New @@ @@ $output->writeln("\n<fg=red>The migration name '{$migration}' is too long. Its not possible to apply " . 'this migration.</>'); return Command::INVALID; } - $output->writeln("\t<fg=yellow>" . ($i + 1) . ". {$migration}</>"); + $output->writeln("\t<fg=yellow>" . ($i - 1) . ". {$migration}</>"); } /** @var QuestionHelper $helper */ $helper = $this->getHelper('question');