Skip to content

Instantly share code, notes, and snippets.

@Zayon
Created June 27, 2019 15:35
Show Gist options
  • Save Zayon/8ec7608d2fe0cd4de669d075160ff1fa to your computer and use it in GitHub Desktop.
Save Zayon/8ec7608d2fe0cd4de669d075160ff1fa to your computer and use it in GitHub Desktop.
fixtures-blogpost protect databases
<?php
/** @var Connection[] $connections */
$connections = $doctrine->getConnections();
foreach ($connections as $connection) {
if ('pdo_sqlite' !== $connection->getDriver()->getName()) {
throw new \RuntimeException('Meaningful message here');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment