Skip to content

Commit

Permalink
Fixed compiler extension for lowest composer dependencies (nette/appl…
Browse files Browse the repository at this point in the history
…ication:^3.0.8)
  • Loading branch information
tg666 committed Nov 23, 2023
1 parent 050a9f9 commit c4c7003
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Bridge/Nette/DI/AmpClientExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Closure;
use Nette\Bridges\ApplicationDI\LatteExtension;
use Nette\Bridges\ApplicationLatte\ILatteFactory;
use Nette\Bridges\ApplicationLatte\LatteFactory;
use Nette\DI\CompilerExtension;
use Nette\DI\Definitions\Reference;
Expand Down Expand Up @@ -43,6 +44,7 @@
use function array_filter;
use function array_values;
use function assert;
use function class_exists;
use function count;
use function is_string;
use function sprintf;
Expand Down Expand Up @@ -257,7 +259,10 @@ private function resolveRendererBridgeCreator(RendererConfig $config): Statement
$rendererBridge = new Statement(LatteRendererBridge::class, [
'latteFactory' => new Statement(ClosureLatteFactory::class, [
'factory' => new Statement([Closure::class, 'fromCallable'], [
[new Reference(LatteFactory::class), 'create'],
[
new Reference(class_exists(LatteFactory::class) ? LatteFactory::class : ILatteFactory::class),
'create',
],
]),
]),
]);
Expand Down

0 comments on commit c4c7003

Please sign in to comment.