Skip to content

Commit da62909

Browse files
committed
bug #668 Debugging CI Failure related to doctrine/persistence (weaverryan)
This PR was merged into the 1.0-dev branch. Discussion ---------- Debugging CI Failure related to doctrine/persistence The tests are now mostly fixed, after a few vendor libraries implemented fixes. However, there is still one test that's failing, and I'm unable to repeat it locally: https://travis-ci.org/github/symfony/maker-bundle/jobs/721078624#L366 This started erroring between builds 2377 and 2380. No relevant changes were made to Maker, but there *were* some significant Doctrine vendor updates: ``` from: doctrine/persistence (1.4.x-dev 7faf8b7): to: doctrine/persistence (2.0.x-dev ebb6c32): from: doctrine/doctrine-bundle (dev-master b74e72c): to: doctrine/doctrine-bundle (dev-master 78b13d5): Summary: basically just the allowing of doctrine/persistence v2 from: doctrine/common (2.13.x-dev f3812c0): to: doctrine/common (dev-master c799163): ``` The tl;dr is that something in doctrine/persistence 2 or doctrine/common 3 is causing a failure that I can't repeat locally. Commits ------- aa32751 Added missing catch for Doctrine persistence class
2 parents 1a32023 + aa32751 commit da62909

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Doctrine/EntityRegenerator.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111

1212
namespace Symfony\Bundle\MakerBundle\Doctrine;
1313

14-
use Doctrine\Common\Persistence\Mapping\MappingException as CommonMappingException;
14+
use Doctrine\Common\Persistence\Mapping\MappingException as LegacyCommonMappingException;
1515
use Doctrine\ORM\Mapping\ClassMetadata;
1616
use Doctrine\ORM\Mapping\MappingException;
17+
use Doctrine\Persistence\Mapping\MappingException as PersistenceMappingException;
1718
use Symfony\Bundle\MakerBundle\Exception\RuntimeCommandException;
1819
use Symfony\Bundle\MakerBundle\FileManager;
1920
use Symfony\Bundle\MakerBundle\Generator;
@@ -43,7 +44,7 @@ public function regenerateEntities(string $classOrNamespace)
4344
{
4445
try {
4546
$metadata = $this->doctrineHelper->getMetadata($classOrNamespace);
46-
} catch (MappingException | CommonMappingException $mappingException) {
47+
} catch (MappingException | LegacyCommonMappingException | PersistenceMappingException $mappingException) {
4748
$metadata = $this->doctrineHelper->getMetadata($classOrNamespace, true);
4849
}
4950

0 commit comments

Comments
 (0)