Linio's Symfony Common library contains small components that either extend Symfony's functionality or provide a coherent base for Linio's symfony projects:
- Service traits
- Controller helper methods
The recommended way to install Linio Common Symfony is through composer.
$ composer require linio/common-symfony
To run the test suite, you need install the dependencies via composer, then run PHPUnit.
$ composer install
$ vendor/bin/phpunit
The common library includes service traits, so you can easily inject dependencies and make use of services in your controllers. There are various controller-specific traits available:
AuthorizationAware
: allows you to use thesymfony/security
component and provides helpersFlashMessageAware
: allows you to use thesymfony/http-foundation-session
component and provides flash message helpersFormAware
: allows you to use thesymfony/form
component and provides helpersRouterAware
: allows you to use thesymfony/routing
component and provides helpersSessionAware
: allows you to use thesymfony/http-foundation/session
component and provides helpersTemplatingAware
: allows you to use thesymfony/templating
component and provides helpersTwigAware
: allows you to use theTwig\Environment
component and provides helpers