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/securitycomponent and provides helpersFlashMessageAware: allows you to use thesymfony/http-foundation-sessioncomponent and provides flash message helpersFormAware: allows you to use thesymfony/formcomponent and provides helpersRouterAware: allows you to use thesymfony/routingcomponent and provides helpersSessionAware: allows you to use thesymfony/http-foundation/sessioncomponent and provides helpersTemplatingAware: allows you to use thesymfony/templatingcomponent and provides helpersTwigAware: allows you to use theTwig\Environmentcomponent and provides helpers