Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e65178d

Browse filesBrowse files
Fix LockStoreSchemaListener not working properly with iterable objects
1 parent c87e4a1 commit e65178d
Copy full SHA for e65178d

File tree

1 file changed

+1
-5
lines changed
Filter options

1 file changed

+1
-5
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/SchemaListener/LockStoreSchemaListener.php
+1-5Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.