Created
June 11, 2021 19:58
-
-
Save nemishkor/91da307ee0a47cd5ca98a50f88b174b6 to your computer and use it in GitHub Desktop.
Disable id autogeneration in symfony doctrine data fixtures to use static id in tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Doctrine\Persistence\ObjectManager; | |
$manager->getClassMetaData(Booking::class)->setIdGeneratorType( | |
\Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_NONE | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment