8000 CS · symfony/symfony@1ad7865 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1ad7865

Browse files
committed
CS
1 parent 802f709 commit 1ad7865

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Symfony/Bridge/Doctrine/SchemaListener/DoctrineDbalCacheAdapterSchemaSubscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function postGenerateSchema(GenerateSchemaEventArgs $event): void
4040
$dbalConnection = $event->getEntityManager()->getConnection();
4141
foreach ($this->dbalAdapters as $dbalAdapter) {
4242
if (!$dbalAdapter instanceof DoctrineSchemaConfiguratorInterface) {
43-
throw new \InvalidArgumentException(sprintf('"%s" only works with "%s". Got "%s"', __CLASS__, DoctrineDbalAdapter::class, is_object($dbalAdapter) ? get_class($dbalAdapter) : gettype($dbalAdapter)));
43+
throw new \InvalidArgumentException(sprintf('"%s" only works with "%s". Got "%s".', __CLASS__, DoctrineDbalAdapter::class, get_debug_type($dbalAdapter)));
4444
}
4545
$dbalAdapter->configureSchema($event->getSchema(), $dbalConnection);
4646
}

src/Symfony/Bridge/Doctrine/SchemaListener/PdoCacheAdapterDoctrineSchemaSubscriber.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ public function postGenerateSchema(GenerateSchemaEventArgs $event): void
3939
{
4040
$dbalConnection = $event->getEntityManager()->getConnection();
4141
foreach ($this->pdoAdapters as $pdoAdapter) {
42-
if (get_class($pdoAdapter) !== PdoAdapter::class) {
43-
trigger_deprecation('symfony/doctrine-bridge', '5.4', 'The "%s" class is deprecated, use "%s" instead.', PdoCacheAdapterDoctrineSchemaSubscriber::class, DoctrineDbalCacheAdapterSchemaSubscriber::class);
42+
if (PdoAdapter::class !== \get_class($pdoAdapter)) {
43+
trigger_deprecation('symfony/doctrine-bridge', '5.4', 'The "%s" class is deprecated, use "%s" instead.', self::class, DoctrineDbalCacheAdapterSchemaSubscriber::class);
4444
}
4545

4646
$pdoAdapter->configureSchema($event->getSchema(), $dbalConnection);

0 commit comments

Comments
 (0)
0