Skip to content
Permalink
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 35bb65e commit a75737bde54c04d06ec4e723a48aa7816363c86f
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/DI/Compiler.php
@@ -219,7 +219,7 @@ public function processExtensions(): void
$extension->loadConfiguration();
}
$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 a75737b

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