From d7153b70c26261e999d88768e660619574c925e8 Mon Sep 17 00:00:00 2001 From: Miroslav Koula Date: Thu, 26 Sep 2019 23:36:19 +0200 Subject: [PATCH] Upgrade to Nette3 --- composer.json | 4 ++-- src/Bridge/Nette/SlugifyExtension.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 0c702632..cb35cf17 100644 --- a/composer.json +++ b/composer.json @@ -21,11 +21,11 @@ }, "require-dev": { "laravel/framework": "~5.1", - "latte/latte": "~2.2", + "latte/latte": "~2.5", "league/container": "^2.2.0", "mikey179/vfsStream": "~1.6", "mockery/mockery": "~0.9", - "nette/di": "~2.2", + "nette/di": "~3.0", "phpunit/phpunit": "~4.8.36|~5.2", "pimple/pimple": "~1.1", "plumphp/plum": "~0.1", diff --git a/src/Bridge/Nette/SlugifyExtension.php b/src/Bridge/Nette/SlugifyExtension.php index f1500349..7509a74e 100644 --- a/src/Bridge/Nette/SlugifyExtension.php +++ b/src/Bridge/Nette/SlugifyExtension.php @@ -33,8 +33,8 @@ public function beforeCompile() $builder = $this->getContainerBuilder(); $self = $this; - $registerToLatte = function(ServiceDefinition $def) use ($self) { - $def->addSetup('addFilter', ['slugify', [$self->prefix('@helper'), 'slugify']]); + $registerToLatte = function($def) use ($self) { + $def->getResultDefinition()->addSetup('addFilter', ['slugify', [$self->prefix('@helper'), 'slugify']]); }; $latteFactory = $builder->getByType('Nette\Bridges\ApplicationLatte\ILatteFactory') ?: 'nette.latteFactory';