Skip to content

Add ENUM column

Add ENUM column #1755

Triggered via pull request November 29, 2025 10:25
@vjikvjik
synchronize #465
enum-col
Status Success
Total duration 11m 50s
Artifacts

mutation.yml

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

Annotations

10 warnings
PHP 8.4-ubuntu-latest: src/Column/ColumnFactory.php#L185
Escaped Mutant for Mutator "DecrementInteger": @@ @@ /** @var string $value */ $value = preg_replace("/::[^:']+\$/", '$1', $defaultValue); if (str_starts_with($value, "B'") && $value[-1] === "'") { - return $column->phpTypecast(substr($value, 2, -1)); + return $column->phpTypecast(substr($value, 1, -1)); } $value = parent::normalizeNotNullDefaultValue($value, $column); if ($value instanceof Expression) {
PHP 8.4-ubuntu-latest: src/Column/ColumnBuilder.php#L49
Escaped Mutant for Mutator "LogicalOr": @@ @@ } public static function bigint(?int $size = null, bool $unsigned = false): BigIntColumn|IntegerColumn { - return PHP_INT_SIZE === 4 || $unsigned ? new BigIntColumn(ColumnType::BIGINT, size: $size, unsigned: $unsigned) : new IntegerColumn(ColumnType::BIGINT, size: $size, unsigned: $unsigned); + return PHP_INT_SIZE === 4 && $unsigned ? new BigIntColumn(ColumnType::BIGINT, size: $size, unsigned: $unsigned) : new IntegerColumn(ColumnType::BIGINT, size: $size, unsigned: $unsigned); } public static function binary(?int $size = null): BinaryColumn {
PHP 8.4-ubuntu-latest: src/Column/ColumnBuilder.php#L49
Escaped Mutant for Mutator "IncrementInteger": @@ @@ } public static function bigint(?int $size = null, bool $unsigned = false): BigIntColumn|IntegerColumn { - return PHP_INT_SIZE === 4 || $unsigned ? new BigIntColumn(ColumnType::BIGINT, size: $size, unsigned: $unsigned) : new IntegerColumn(ColumnType::BIGINT, size: $size, unsigned: $unsigned); + return PHP_INT_SIZE === 5 || $unsigned ? new BigIntColumn(ColumnType::BIGINT, size: $size, unsigned: $unsigned) : new IntegerColumn(ColumnType::BIGINT, size: $size, unsigned: $unsigned); } public static function binary(?int $size = null): BinaryColumn {
PHP 8.4-ubuntu-latest: src/Column/ColumnBuilder.php#L49
Escaped Mutant for Mutator "DecrementInteger": @@ @@ } public static function bigint(?int $size = null, bool $unsigned = false): BigIntColumn|IntegerColumn { - return PHP_INT_SIZE === 4 || $unsigned ? new BigIntColumn(ColumnType::BIGINT, size: $size, unsigned: $unsigned) : new IntegerColumn(ColumnType::BIGINT, size: $size, unsigned: $unsigned); + return PHP_INT_SIZE === 3 || $unsigned ? new BigIntColumn(ColumnType::BIGINT, size: $size, unsigned: $unsigned) : new IntegerColumn(ColumnType::BIGINT, size: $size, unsigned: $unsigned); } public static function binary(?int $size = null): BinaryColumn {
PHP 8.4-ubuntu-latest: src/Column/AbstractRangeColumn.php#L88
Escaped Mutant for Mutator "MatchArmRemoval": @@ @@ 'NULL' => '', 'double', 'integer' => (string) $value, 'string' => $value, - default => throw new NotSupportedException(sprintf('Range bound supports only string, int, float and null values. Got %s.', get_debug_type($value))), }; } }
PHP 8.4-ubuntu-latest: src/Builder/ArrayValueBuilder.php#L192
Escaped Mutant for Mutator "FalseValue": @@ @@ private function dbTypecast(iterable $value, ColumnInterface $column): iterable { if (!is_array($value)) { - $value = iterator_to_array($value, false); + $value = iterator_to_array($value, true); } return array_map($column->dbTypecast(...), $value); } }
PHP 8.4-ubuntu-latest: src/Builder/ArrayValueBuilder.php#L49
Escaped Mutant for Mutator "IncrementInteger": @@ @@ { $column = $this->getColumn($expression); $dbType = $this->getColumnDbType($column); - return $this->buildNestedSubquery($query, $dbType, $column?->getDimension() ?? 1, $params); + return $this->buildNestedSubquery($query, $dbType, $column?->getDimension() ?? 2, $params); } protected function buildValue(iterable $value, ArrayValue $expression, array &$params): string {
PHP 8.4-ubuntu-latest: src/Builder/ArrayValueBuilder.php#L49
Escaped Mutant for Mutator "DecrementInteger": @@ @@ { $column = $this->getColumn($expression); $dbType = $this->getColumnDbType($column); - return $this->buildNestedSubquery($query, $dbType, $column?->getDimension() ?? 1, $params); + return $this->buildNestedSubquery($query, $dbType, $column?->getDimension() ?? 0, $params); } protected function buildValue(iterable $value, ArrayValue $expression, array &$params): string {
PHP 8.4-ubuntu-latest: src/Builder/ArrayValueBuilder.php#L39
Escaped Mutant for Mutator "IncrementInteger": @@ @@ $param = new Param($value, DataType::STRING); $column = $this->getColumn($expression); $dbType = $this->getColumnDbType($column); - $typeHint = $this->getTypeHint($dbType, $column?->getDimension() ?? 1); + $typeHint = $this->getTypeHint($dbType, $column?->getDimension() ?? 2); return $this->queryBuilder->bindParam($param, $params) . $typeHint; } protected function buildSubquery(QueryInterface $query, ArrayValue $expression, array &$params): string
PHP 8.4-ubuntu-latest: src/Builder/ArrayValueBuilder.php#L39
Escaped Mutant for Mutator "DecrementInteger": @@ @@ $param = new Param($value, DataType::STRING); $column = $this->getColumn($expression); $dbType = $this->getColumnDbType($column); - $typeHint = $this->getTypeHint($dbType, $column?->getDimension() ?? 1); + $typeHint = $this->getTypeHint($dbType, $column?->getDimension() ?? 0); return $this->queryBuilder->bindParam($param, $params) . $typeHint; } protected function buildSubquery(QueryInterface $query, ArrayValue $expression, array &$params): string