Remove last references to functional-php

This commit is contained in:
Alejandro Celaya
2023-11-30 18:09:15 +01:00
parent bff4bd12ae
commit 1854cc2f19
22 changed files with 147 additions and 114 deletions

View File

@@ -11,7 +11,7 @@ use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\Types;
use Doctrine\Migrations\AbstractMigration;
use function Shlinkio\Shlink\Core\some;
use function Shlinkio\Shlink\Core\ArrayUtils\some;
final class Version20200105165647 extends AbstractMigration
{
@@ -23,12 +23,11 @@ final class Version20200105165647 extends AbstractMigration
public function preUp(Schema $schema): void
{
$visitLocations = $schema->getTable('visit_locations');
$this->skipIf(some(
self::COLUMNS,
fn (string $v, string $newColName) => $visitLocations->hasColumn($newColName),
$this->skipIf(some(
self::COLUMNS,
fn (string $v, string|int $newColName) => $visitLocations->hasColumn((string) $newColName),
), 'New columns already exist');
foreach (self::COLUMNS as $columnName) {
$qb = $this->connection->createQueryBuilder();
$qb->update('visit_locations')