From d997b5efd265dca46812f495a6db2747b9ef24f4 Mon Sep 17 00:00:00 2001 From: Oliwier Ptak Date: Tue, 1 Aug 2023 15:45:56 +0200 Subject: [PATCH] fixed an issue with where same plugin could be added to the container multiple times --- src/Popo/Plugin/ExternalPluginContainer.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Popo/Plugin/ExternalPluginContainer.php b/src/Popo/Plugin/ExternalPluginContainer.php index 941c3f5..35a5906 100644 --- a/src/Popo/Plugin/ExternalPluginContainer.php +++ b/src/Popo/Plugin/ExternalPluginContainer.php @@ -35,35 +35,35 @@ class ExternalPluginContainer public function addClassPluginClassName(string $classPluginClassName): self { - static::$classPluginClassNames[] = $classPluginClassName; + static::$classPluginClassNames[$classPluginClassName] = $classPluginClassName; return $this; } public function addMappingPolicyPluginClassName(string $mappingPolicyPluginClassName): self { - static::$mappingPolicyPluginClassNames[] = $mappingPolicyPluginClassName; + static::$mappingPolicyPluginClassNames[$mappingPolicyPluginClassName] = $mappingPolicyPluginClassName; return $this; } public function addNamespacePluginClassName(string $namespacePluginClassName): self { - static::$namespacePluginClassNames[] = $namespacePluginClassName; + static::$namespacePluginClassNames[$namespacePluginClassName] = $namespacePluginClassName; return $this; } public function addPhpFlePluginClassName(string $phpFilePluginClassName): self { - static::$phpFilePluginClassNames[] = $phpFilePluginClassName; + static::$phpFilePluginClassNames[$phpFilePluginClassName] = $phpFilePluginClassName; return $this; } public function addPropertyPluginClassName(string $propertyPluginClassName): self { - static::$propertyPluginClassNames[] = $propertyPluginClassName; + static::$propertyPluginClassNames[$propertyPluginClassName] = $propertyPluginClassName; return $this; }