wshafer / expressive-symfony-router
This package is abandoned and no longer maintained.
The author suggests using the wshafer/mezzio-symfony-router package instead.
dev-master
2020-03-23 12:25 UTC
Requires
- psr/container: ^1.0
- psr/http-message: ^1.0.1
- symfony/psr-http-message-bridge: ^1.0
- symfony/routing: ^3.4 || ^4.0
- zendframework/zend-expressive-router: ^3.0
Requires (Dev)
- phpmd/phpmd: @stable
- phpunit/phpunit: ^6.0.8
- satooshi/php-coveralls: ^1.0
- squizlabs/php_codesniffer: ^2.8.1
This package is auto-updated.
Last update: 2020-03-23 12:25:15 UTC
README
Provides Symfony Route integration for Expressive.
Installation
Install this library using composer:
$ composer require symfony/routing:dev-master $ composer require wshafer/expressive-symfony-router:dev-master
Documentation
Configuration
To enable this router using the Expressive Skeleton, make sure to add
WShafer\Expressive\Symfony\Router\ConfigProvider::class
to your ConfigAggregator
located in config/config.php
. In addition you'll want to remove
your current router's config provider that was installed during setup.
Routing
$app->route('/book/{id}', YourRequestHandler::class)
Caching
To enable caching you need to add the following config:
return [ 'router' => [ 'symfony' => [ 'cache_enabled' => true, 'cache_file' => /my/cache/dir/cache_file.txt ], ], ];