Skip to content

Commit e65178d

Browse files
Fix LockStoreSchemaListener not working properly with iterable objects
1 parent c87e4a1 commit e65178d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ public function postGenerateSchema(GenerateSchemaEventArgs $event): void
3030
{
3131
$connection = $event->getEntityManager()->getConnection();
3232

33-
$storesIterator = new \ArrayIterator($this->stores);
34-
while ($storesIterator->valid()) {
33+
foreach ($this->stores as $store) {
3534
try {
36-
$store = $storesIterator->current();
3735
if (!$store instanceof DoctrineDbalStore) {
3836
continue;
3937
}
@@ -42,8 +40,6 @@ public function postGenerateSchema(GenerateSchemaEventArgs $event): void
4240
} catch (InvalidArgumentException) {
4341
// no-op
4442
}
45-
46-
$storesIterator->next();
4743
}
4844
}
4945
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy