Skip to content

Commit

Permalink
Restore conditional check for MyCLabs enum support
Browse files Browse the repository at this point in the history
  • Loading branch information
oojacoboo authored Oct 20, 2023
1 parent c906c66 commit c6ff429
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/SchemaFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,11 @@ public function createSchema(): Schema
$errorRootTypeMapper = new FinalRootTypeMapper($recursiveTypeMapper);
$rootTypeMapper = new BaseTypeMapper($errorRootTypeMapper, $recursiveTypeMapper, $topRootTypeMapper);
$rootTypeMapper = new EnumTypeMapper($rootTypeMapper, $annotationReader, $symfonyCache, $nsList);
// Annotation support - deprecated
$rootTypeMapper = new MyCLabsEnumTypeMapper($rootTypeMapper, $annotationReader, $symfonyCache, $nsList);

if (class_exists(Enum::class)) {
// Annotation support - deprecated
$rootTypeMapper = new MyCLabsEnumTypeMapper($rootTypeMapper, $annotationReader, $symfonyCache, $nsList);
}

if (! empty($this->rootTypeMapperFactories)) {
$rootSchemaFactoryContext = new RootTypeMapperFactoryContext(
Expand Down

0 comments on commit c6ff429

Please sign in to comment.