diff --git a/src/Resources/skeleton/doctrine/Repository.tpl.php b/src/Resources/skeleton/doctrine/Repository.tpl.php index f06885cf6..3601ceab6 100644 --- a/src/Resources/skeleton/doctrine/Repository.tpl.php +++ b/src/Resources/skeleton/doctrine/Repository.tpl.php @@ -29,7 +29,7 @@ public function __construct(ManagerRegistry $registry) * @throws ORMException * @throws OptimisticLockException */ - public function add( $entity, bool $flush = true): void + public function add( $entity, bool $flush = false): void { $this->_em->persist($entity); if ($flush) { @@ -41,7 +41,7 @@ public function add( $entity, bool $flush = true): void * @throws ORMException * @throws OptimisticLockException */ - public function remove( $entity, bool $flush = true): void + public function remove( $entity, bool $flush = false): void { $this->_em->remove($entity); if ($flush) { diff --git a/tests/Doctrine/fixtures/expected_xml/src/Repository/UserRepository.php b/tests/Doctrine/fixtures/expected_xml/src/Repository/UserRepository.php index 66414ec39..871e1ab05 100644 --- a/tests/Doctrine/fixtures/expected_xml/src/Repository/UserRepository.php +++ b/tests/Doctrine/fixtures/expected_xml/src/Repository/UserRepository.php @@ -25,7 +25,7 @@ public function __construct(ManagerRegistry $registry) * @throws ORMException * @throws OptimisticLockException */ - public function add(UserXml $entity, bool $flush = true): void + public function add(UserXml $entity, bool $flush = false): void { $this->_em->persist($entity); if ($flush) { @@ -37,7 +37,7 @@ public function add(UserXml $entity, bool $flush = true): void * @throws ORMException * @throws OptimisticLockException */ - public function remove(UserXml $entity, bool $flush = true): void + public function remove(UserXml $entity, bool $flush = false): void { $this->_em->remove($entity); if ($flush) { diff --git a/tests/Doctrine/fixtures/expected_xml/src/Repository/XOtherRepository.php b/tests/Doctrine/fixtures/expected_xml/src/Repository/XOtherRepository.php index 2b7115ee3..a772b174e 100644 --- a/tests/Doctrine/fixtures/expected_xml/src/Repository/XOtherRepository.php +++ b/tests/Doctrine/fixtures/expected_xml/src/Repository/XOtherRepository.php @@ -25,7 +25,7 @@ public function __construct(ManagerRegistry $registry) * @throws ORMException * @throws OptimisticLockException */ - public function add(XOther $entity, bool $flush = true): void + public function add(XOther $entity, bool $flush = false): void { $this->_em->persist($entity); if ($flush) { @@ -37,7 +37,7 @@ public function add(XOther $entity, bool $flush = true): void * @throws ORMException * @throws OptimisticLockException */ - public function remove(XOther $entity, bool $flush = true): void + public function remove(XOther $entity, bool $flush = false): void { $this->_em->remove($entity); if ($flush) {