Skip to content

Commit

Permalink
fix PHP 8.1 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
JanTvrdik committed Dec 6, 2021
1 parent 165997f commit d3921f6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Drivers/PgSqlDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function lock()
$this->dbal->exec('SELECT pg_advisory_lock(-2099128779216184107)');

} catch (\Exception $e) {
throw new LockException('Unable to acquire a lock.', NULL, $e);
throw new LockException('Unable to acquire a lock.', 0, $e);
}
}

Expand All @@ -91,7 +91,7 @@ public function unlock()
$this->dbal->exec('SELECT pg_advisory_unlock(-2099128779216184107)');

} catch (\Exception $e) {
throw new LockException('Unable to release a lock.', NULL, $e);
throw new LockException('Unable to release a lock.', 0, $e);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Engine/Runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ protected function execute(File $file)
$queriesCount = $this->getExtension($file->extension)->execute($file);
} catch (\Exception $e) {
$this->driver->rollbackTransaction();
throw new ExecutionException(sprintf('Executing migration "%s" has failed.', $file->path), NULL, $e);
throw new ExecutionException(sprintf('Executing migration "%s" has failed.', $file->path), 0, $e);
}

$this->driver->markMigrationAsReady($migration);
Expand Down
3 changes: 1 addition & 2 deletions tests/run-integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,19 @@ composer_prepare_dependencies()
COMPOSER_PREFER_LOWEST="$2"

cp "$PROJECT_DIR/composer.bridgeless.json" "$PROJECT_DIR/composer.json"
echo "Composer: installing $COMPOSER_REQUIRE"

if [[ ! -z "$COMPOSER_REQUIRE" ]]; then
composer require \
--no-interaction \
--no-update \
--quiet \
--dev \
$COMPOSER_REQUIRE
fi

composer update \
--no-interaction \
--no-progress \
--quiet \
$COMPOSER_PREFER_LOWEST
}

Expand Down

0 comments on commit d3921f6

Please sign in to comment.