We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I forked the project to try fix an issue I have with update doctrine/dbal 3.x and it seem some tests doesn't work at all with doctrine/dbal 3.x
The text was updated successfully, but these errors were encountered:
Quick fix for it - create your DBALConnection class, like mine:
DBALConnection
use ComPHPPuebla\Fixtures\Database\DBALConnection as BaseDBALConnection; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Schema\Column; final class DBALConnection extends BaseDBALConnection { private Connection $connection; public function __construct(Connection $connection) { parent::__construct($connection); $this->connection = $connection; } public function primaryKeyOf(string $table): string { $schema = $this->connection->createSchemaManager(); $primaryKeys = $schema->listTableDetails($table)->getPrimaryKeyColumns(); /** @var Column|null $firstPrimaryKey */ $firstPrimaryKey = reset($primaryKeys); return $firstPrimaryKey->getName(); } }
Symfony config:
when@test: services: App\Core\Infrastructure\Fixtures\DBALConnection: arguments: $connection: '@doctrine.dbal.default_connection' ComPHPPuebla\Fixtures\Fixture: arguments: $connection: '@App\Core\Infrastructure\Fixtures\DBALConnection'
Sorry, something went wrong.
No branches or pull requests
I forked the project to try fix an issue I have with update doctrine/dbal 3.x and it seem some tests doesn't work at all with doctrine/dbal 3.x
The text was updated successfully, but these errors were encountered: