Skip to content

Commit 6bce567

Browse files
committed
Merge branch '4.4' into 5.0
* 4.4: Fix quotes in exception messages Fix quotes in exception messages Fix quotes in exception messages
2 parents fc1b792 + 57a8250 commit 6bce567

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

DependencyInjection/AbstractDoctrineExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ private function validateAutoMapping(array $managerConfigs): ?string
429429
}
430430

431431
if (null !== $autoMappedManager) {
432-
throw new \LogicException(sprintf('You cannot enable "auto_mapping" on more than one manager at the same time (found in "%s" and %s").', $autoMappedManager, $name));
432+
throw new \LogicException(sprintf('You cannot enable "auto_mapping" on more than one manager at the same time (found in "%s" and "%s"").', $autoMappedManager, $name));
433433
}
434434

435435
$autoMappedManager = $name;

DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ private function addTaggedSubscribers(ContainerBuilder $container)
6969
$connections = isset($tag['connection']) ? [$tag['connection']] : array_keys($this->connections);
7070
foreach ($connections as $con) {
7171
if (!isset($this->connections[$con])) {
72-
throw new RuntimeException(sprintf('The Doctrine connection "%s" referenced in service "%s" does not exist. Available connections names: %s.', $con, $id, implode(', ', array_keys($this->connections))));
72+
throw new RuntimeException(sprintf('The Doctrine connection "%s" referenced in service "%s" does not exist. Available connections names: "%s".', $con, $id, implode('", "', array_keys($this->connections))));
7373
}
7474

7575
$this->getEventManagerDef($container, $con)->addMethodCall('addEventSubscriber', [new Reference($id)]);
@@ -92,7 +92,7 @@ private function addTaggedListeners(ContainerBuilder $container)
9292
$connections = isset($tag['connection']) ? [$tag['connection']] : array_keys($this->connections);
9393
foreach ($connections as $con) {
9494
if (!isset($this->connections[$con])) {
95-
throw new RuntimeException(sprintf('The Doctrine connection "%s" referenced in service "%s" does not exist. Available connections names: %s.', $con, $id, implode(', ', array_keys($this->connections))));
95+
throw new RuntimeException(sprintf('The Doctrine connection "%s" referenced in service "%s" does not exist. Available connections names: "%s".', $con, $id, implode('", "', array_keys($this->connections))));
9696
}
9797
$listenerRefs[$con][$id] = new Reference($id);
9898

Form/Type/EntityType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function configureOptions(OptionsResolver $resolver)
5353
public function getLoader(ObjectManager $manager, $queryBuilder, string $class)
5454
{
5555
if (!$queryBuilder instanceof QueryBuilder) {
56-
throw new \TypeError(sprintf('Expected an instance of %s, but got %s.', QueryBuilder::class, \is_object($queryBuilder) ? \get_class($queryBuilder) : \gettype($queryBuilder)));
56+
throw new \TypeError(sprintf('Expected an instance of "%s", but got "%s".', QueryBuilder::class, \is_object($queryBuilder) ? \get_class($queryBuilder) : \gettype($queryBuilder)));
5757
}
5858

5959
return new ORMQueryBuilderLoader($queryBuilder);
@@ -79,7 +79,7 @@ public function getBlockPrefix()
7979
public function getQueryBuilderPartsForCachingHash($queryBuilder): ?array
8080
{
8181
if (!$queryBuilder instanceof QueryBuilder) {
82-
throw new \TypeError(sprintf('Expected an instance of %s, but got %s.', QueryBuilder::class, \is_object($queryBuilder) ? \get_class($queryBuilder) : \gettype($queryBuilder)));
82+
throw new \TypeError(sprintf('Expected an instance of "%s", but got "%s".', QueryBuilder::class, \is_object($queryBuilder) ? \get_class($queryBuilder) : \gettype($queryBuilder)));
8383
}
8484

8585
return [

Tests/PropertyInfo/Fixtures/DoctrineFooType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform)
5050
return null;
5151
}
5252
if (!$value instanceof Foo) {
53-
throw new ConversionException(sprintf('Expected %s, got %s', 'Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\Foo', \gettype($value)));
53+
throw new ConversionException(sprintf('Expected "%s", got "%s"', 'Symfony\Bridge\Doctrine\Tests\PropertyInfo\Fixtures\Foo', \gettype($value)));
5454
}
5555

5656
return $foo->bar;

0 commit comments

Comments
 (0)