Skip to content
Browse files

Compiler: added Decorator extension to $last (#197)

Decorator extension needs to be resolved last (eg. after Search extension) in order to find all possible matching services.

Solves my issue where decorator doesn't decorate services found using Search extension.
  • Loading branch information...
peldax authored and dg committed Jul 8, 2019
1 parent 4aff517 commit 570020312863db90d2f63d48093ce85ce8a316f0
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/DI/Compiler.php
@@ -219,7 +219,7 @@ public function processExtensions(): void
$last = $this->getExtensions(Extensions\InjectExtension::class);
$last = $this->getExtensions(Extensions\DecoratorExtension::class) + $this->getExtensions(Extensions\InjectExtension::class);
$this->extensions = array_merge(array_diff_key($this->extensions, $last), $last);
$extensions = array_diff_key($this->extensions, $first, [self::SERVICES => 1]);

0 comments on commit 5700203

Please sign in to comment.
You can’t perform that action at this time.