10000 [DoctrineBridge] Fix exception message by OskarStark · Pull Request #52319 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[DoctrineBridge] Fix exception message #52319

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
Oct 27, 2023
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct(ObjectManager $manager, string $class, IdReader $idR
$classMetadata = $manager->getClassMetadata($class);

if ($idReader && !$idReader->isSingleId()) {
throw new \InvalidArgumentException(sprintf('The second argument `$idReader` of "%s" must be null when the query cannot be optimized because of composite id fields.', __METHOD__));
throw new \InvalidArgumentException(sprintf('The `$idReader` argument of "%s" must be null when the query cannot be optimized because of composite id fields.', __METHOD__));
}

$this->manager = $manager;
Expand Down
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
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ public function testLoadChoicesForValuesLoadsOnlyChoicesIfValueIsIdReader()
public function testPassingIdReaderWithoutSingleIdEntity()
{
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('The second argument `$idReader` of "Symfony\\Bridge\\Doctrine\\Form\\ChoiceList\\DoctrineChoiceLoader::__construct" must be null when the query cannot be optimized because of composite id fields.');
$this->expectExceptionMessage('The `$idReader` argument of "Symfony\\Bridge\\Doctrine\\Form\\ChoiceList\\DoctrineChoiceLoader::__construct" must be null when the query cannot be optimized because of composite id fields.');

$idReader = $this->createMock(IdReader::class);
$idReader->expects($this->once())
Expand Down
0