8000 [DoctrineBridge] Replace string with FQCN resolution in EntityType by ker0x · Pull Request #42958 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[DoctrineBridge] Replace string with FQCN resolution in EntityType #42958

New issue

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

Merged
merged 1 commit into from
Sep 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[DoctrineBridge] Replace string with FQCN resolution in EntityType
  • Loading branch information
Romain Monteil committed Sep 9, 2021
commit 27b333ac521a2ca1c813c8f30bbb5579aa21bc3e
4 changes: 2 additions & 2 deletions src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ public function configureOptions(OptionsResolver $resolver)
$queryBuilder = $queryBuilder($options['em']->getRepository($options['class']));

if (null !== $queryBuilder && !$queryBuilder instanceof QueryBuilder) {
throw new UnexpectedTypeException($queryBuilder, 'Doctrine\ORM\QueryBuilder');
throw new UnexpectedTypeException($queryBuilder, QueryBuilder::class);
}
}

return $queryBuilder;
};

$resolver->setNormalizer('query_builder', $queryBuilderNormalizer);
$resolver->setAllowedTypes('query_builder', ['null', 'callable', 'Doctrine\ORM\QueryBuilder']);
$resolver->setAllowedTypes('query_builder', ['null', 'callable', QueryBuilder::class]);
}

/**
Expand Down
0