diff --git a/Container.php b/Container.php index 66061c9..d584467 100644 --- a/Container.php +++ b/Container.php @@ -168,6 +168,11 @@ class Container implements ContainerInterface $object = self::configure($reflect->newInstanceArgs($construct), $config); + $targetAttributes = $reflect->getAttributes(); + foreach ($targetAttributes as $attribute) { + $attribute->newInstance()->dispatch($object); + } + $this->resolveProperties($reflect, $object); if (method_exists($object, 'init') && $className !== 'Symfony\Component\Console\Application') { call_user_func([$object, 'init']);