Skip to content
This repository was archived by the owner on Feb 6, 2020. It is now read-only.

Commit 0b3fe37

Browse files
author
xiemaomao
committed
Repeated AbstractFactory may occur in ServiceManager.
1 parent f39c953 commit 0b3fe37

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ServiceManager.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,8 @@ private function resolveAbstractFactories(array $abstractFactories)
490490
}
491491

492492
if ($abstractFactory instanceof AbstractFactoryInterface) {
493-
$this->abstractFactories[] = $abstractFactory;
493+
$abstractFactoryClassName = get_class($abstractFactory);
494+
$this->abstractFactories[$abstractFactoryClassName] = $abstractFactory;
494495
continue;
495496
}
496497

0 commit comments

Comments
 (0)