diff --git a/composer.json b/composer.json index 48ebeb3..f7502f9 100644 --- a/composer.json +++ b/composer.json @@ -10,8 +10,9 @@ } ], "require": { + "php": "^5.5 || ^7.0", "roave/security-advisories": "dev-master", - "zendframework/zend-expressive": "1.0.0rc2", + "zendframework/zend-expressive": "~1.0.0-dev@dev", "zendframework/zend-stdlib": "~2.7" }, "require-dev": { diff --git a/src/Composer/Resources/config/templates-zend-view.php b/src/Composer/Resources/config/templates-zend-view.php index 5752b23..272cac3 100644 --- a/src/Composer/Resources/config/templates-zend-view.php +++ b/src/Composer/Resources/config/templates-zend-view.php @@ -2,10 +2,28 @@ return [ 'dependencies' => [ + /* + * Note: delegator_factories only work with zend-servicemanager. + * + * To get equivalent functionality with Pimple, add the following to your + * config/container.php file: + * + * $container->extend(Zend\Expressive\Application::class, function ($app, $container) { + * $app->attachRouteResultObserver($container->get(Zend\Expressive\ZendView\UrlHelper::class)); + * return $app; + * }); + */ + 'delegator_factories' => [ + Zend\Expressive\Application::class => [ + Zend\Expressive\ZendView\ApplicationUrlDelegatorFactory::class, + ], + ], 'factories' => [ 'Zend\Expressive\FinalHandler' => Zend\Expressive\Container\TemplatedErrorHandlerFactory::class, + Zend\Expressive\ZendView\UrlHelper::class => Zend\Expressive\ZendView\UrlHelperFactory::class, + Zend\Expressive\Template\TemplateRendererInterface::class => Zend\Expressive\ZendView\ZendViewRendererFactory::class, ], diff --git a/src/Composer/config.php b/src/Composer/config.php index b514cba..0c830a8 100644 --- a/src/Composer/config.php +++ b/src/Composer/config.php @@ -6,12 +6,12 @@ 'filp/whoops' => '^1.1', 'mouf/pimple-interop' => '^1.0', 'ocramius/proxy-manager' => '^1.0', - 'zendframework/zend-expressive-aurarouter' => '^0.2', - 'zendframework/zend-expressive-fastroute' => '^0.2', - 'zendframework/zend-expressive-platesrenderer' => '^0.2', - 'zendframework/zend-expressive-twigrenderer' => '^0.2', - 'zendframework/zend-expressive-zendrouter' => '^0.2', - 'zendframework/zend-expressive-zendviewrenderer' => '^0.2', + 'zendframework/zend-expressive-aurarouter' => '^0.3', + 'zendframework/zend-expressive-fastroute' => '^0.3', + 'zendframework/zend-expressive-platesrenderer' => '^0.3', + 'zendframework/zend-expressive-twigrenderer' => '^0.3.1', + 'zendframework/zend-expressive-zendrouter' => '^0.3', + 'zendframework/zend-expressive-zendviewrenderer' => '^0.3.1', 'zendframework/zend-servicemanager' => '^2.5', ],