Skip to content

Merge pull request #185 from bizley/dependabot/github_actions/actions… #140

Merge pull request #185 from bizley/dependabot/github_actions/actions…

Merge pull request #185 from bizley/dependabot/github_actions/actions… #140

Triggered via push January 18, 2024 17:57
Status Success
Total duration 1h 3m 10s
Artifacts

mutation.yml

on: push
Matrix: Tests
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
PHP 8.1 + Infection: src/Updater.php#L93
Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ * Generates migration based on the blueprint. * @throws NotSupportedException */ - public function generateFromBlueprint(BlueprintInterface $blueprint, string $migrationName, bool $usePrefix = true, string $dbPrefix = '', string $namespace = null) : string + public function generateFromBlueprint(BlueprintInterface $blueprint, string $migrationName, bool $usePrefix = false, string $dbPrefix = '', string $namespace = null) : string { return $this->view->renderFile($this->getUpdateTableMigrationTemplate(), ['className' => $migrationName, 'namespace' => $this->getNormalizedNamespace($namespace), 'bodyUp' => $this->blueprintRenderer->renderUp($blueprint, 8, $this->tableMapper->getSchemaType(), $this->tableMapper->getEngineVersion(), $usePrefix, $dbPrefix), 'bodyDown' => $this->blueprintRenderer->renderDown($blueprint, 8, $this->tableMapper->getSchemaType(), $this->tableMapper->getEngineVersion(), $usePrefix, $dbPrefix)]); } }
PHP 8.1 + Infection: src/controllers/BaseMigrationController.php#L279
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ if ($this->extractor === null) { $db = Instance::ensure($this->db, Connection::class); // cloning connection here to not force reconnecting on each extraction - $configuredObject = Yii::createObject($this->extractorClass, [clone $db, $this->experimental]); + $configuredObject = Yii::createObject($this->extractorClass, [$db, $this->experimental]); if (!$configuredObject instanceof ExtractorInterface) { throw new InvalidConfigException('Extractor must implement bizley\\migration\\ExtractorInterface.'); }
PHP 8.1 + Infection: src/controllers/MigrationController.php#L940
Escaped Mutant for Mutator "CastArray": --- Original +++ New @@ @@ // +1 for potential foreign keys migration $folders = []; if ($this->migrationNamespace !== null) { - foreach ((array) $this->migrationNamespace as $namespacedMigration) { + foreach ($this->migrationNamespace as $namespacedMigration) { /** @var string $translatedPath */ $translatedPath = Yii::getAlias('@' . FileHelper::normalizePath($namespacedMigration, '/')); if (\is_dir($translatedPath)) {
PHP 8.1 + Infection: src/controllers/MigrationController.php#L967
Escaped Mutant for Mutator "GreaterThanOrEqualTo": --- Original +++ New @@ @@ $path = $folder . DIRECTORY_SEPARATOR . $file; if (\is_file($path) && \preg_match('/m(\\d{6}_?\\d{6})\\D.*?/i', $file, $matches)) { $time = \str_replace('_', '', $matches[1]); - if ($time >= $nowDate && $time <= $lastTimestampDate) { + if ($time > $nowDate && $time <= $lastTimestampDate) { $foundCollision = true; break; }
PHP 8.1 + Infection: src/controllers/MigrationController.php#L967
Escaped Mutant for Mutator "LessThanOrEqualTo": --- Original +++ New @@ @@ $path = $folder . DIRECTORY_SEPARATOR . $file; if (\is_file($path) && \preg_match('/m(\\d{6}_?\\d{6})\\D.*?/i', $file, $matches)) { $time = \str_replace('_', '', $matches[1]); - if ($time >= $nowDate && $time <= $lastTimestampDate) { + if ($time >= $nowDate && $time < $lastTimestampDate) { $foundCollision = true; break; }
PHP 8.1 + Infection: src/controllers/MigrationController.php#L967
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ $path = $folder . DIRECTORY_SEPARATOR . $file; if (\is_file($path) && \preg_match('/m(\\d{6}_?\\d{6})\\D.*?/i', $file, $matches)) { $time = \str_replace('_', '', $matches[1]); - if ($time >= $nowDate && $time <= $lastTimestampDate) { + if ($time >= $nowDate || $time <= $lastTimestampDate) { $foundCollision = true; break; }
PHP 8.1 + Infection: src/controllers/MigrationController.php#L967
Escaped Mutant for Mutator "LogicalAndNegation": --- Original +++ New @@ @@ $path = $folder . DIRECTORY_SEPARATOR . $file; if (\is_file($path) && \preg_match('/m(\\d{6}_?\\d{6})\\D.*?/i', $file, $matches)) { $time = \str_replace('_', '', $matches[1]); - if ($time >= $nowDate && $time <= $lastTimestampDate) { + if (!($time >= $nowDate && $time <= $lastTimestampDate)) { $foundCollision = true; break; }
PHP 8.1 + Infection: src/renderers/ColumnRenderer.php#L183
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ $definition = $column->getDefinition(); if ($this->generalSchema) { if ($column instanceof PrimaryKeyColumnInterface) { - $this->isPrimaryKeyPossible = false; + $this->isPrimaryKeyPossible = true; $this->isNotNullPossible = false; } elseif ($column instanceof PrimaryKeyVariantColumnInterface && $primaryKey && !$primaryKey->isComposite() && $column->isColumnInPrimaryKey($primaryKey)) { $this->isPrimaryKeyPossible = false;
PHP 8.1 + Infection: src/renderers/ColumnRenderer.php#L202
Escaped Mutant for Mutator "UnwrapStrReplace": --- Original +++ New @@ @@ if ($this->generalSchema) { $alias = Schema::getAlias($schema, $type, (string) $length); if ($alias !== null) { - $this->definition[] = \str_replace('{renderLength}', '', $alias); + $this->definition[] = $alias; return; } }
PHP 8.1 + Infection: src/renderers/ColumnRenderer.php#L282
Escaped Mutant for Mutator "UnwrapTrim": --- Original +++ New @@ @@ } $this->definition[] = "append('" . $this->escapeQuotes($schemaAppend) . "')"; } elseif (!empty($columnAppend)) { - $this->definition[] = "append('" . $this->escapeQuotes(\trim($columnAppend)) . "')"; + $this->definition[] = "append('" . $this->escapeQuotes($columnAppend) . "')"; } $comment = $column->getComment(); if ($comment) {