apy / breadcrumbtrail-bundle
Symfony bundle to generate a dynamic Twig breadcrumbs trail via Annotations, PHP Attributes or PHP methods.
Installs: 818 339
Dependents: 1
Suggesters: 0
Security: 0
Stars: 81
Watchers: 7
Forks: 32
Open Issues: 8
Type:symfony-bundle
Requires
- php: >=7.2
- symfony/deprecation-contracts: ^2.4|^3.0
- symfony/framework-bundle: ^4.0|^5.0|^6.0
- twig/twig: ^1.41|^2.7|^3.0
Requires (Dev)
- doctrine/annotations: ^v1.7
- doctrine/doctrine-bundle: ^v1.0|^v2.0
- matthiasnoback/symfony-dependency-injection-test: ^4.0
- nyholm/symfony-bundle-test: ^v2.0
- symfony/phpunit-bridge: ^5.0|^6.0
- symfony/twig-bundle: ^3.4|^4.0|^5.0|^6.0
- twig/twig: ^1.38|^v2.15|^v3.0
Suggests
- doctrine/doctrine-bundle: To allow adding breadcrumbs on controller actions by the use of annotations.
- twig/twig: To allow adding breadcrumbs via Twig templates.
Conflicts
- symfony/framework-bundle: <3.4.26 || >4 <4.1.12 || >4.2 <4.2.7
README
This bundle provides a breadcrumb trail service also known as breadcrumbs or Fil d'Ariane. Breadcrumbs can be defined with Attributes, annotations, PHP and Twig.
Installation
Please follow the steps given in installation.md to install this bundle.
Bundle documentation
- Annotation configuration
- PHP configuration
- Twig configuration
- Render the breadcrumb trail
- Override the template
Tests
Several make targets can get used to run the PHPUnit test suite on different PHP environments:
$ make test
$ make test-php73
$ make test-php74-lowest
In case all test suites pass but running tests still returns an error code, that
might be related to the number of allowed deprecations. Make sure that the
SYMFONY_DEPRECATIONS_HELPER
value of max[self]
as found in phpunit.xml.dist
matches the "Remaining self deprecation notices" count from the test runner output.
Code style
PHP-CS-Fixer is used to keep the code style in shape. There is a make target that uses Docker to fix the code style without having to install any other dependencies:
$ make cs
Static code analysis
PHPStan is used to keep the code quality up to par. There is a make target that uses Docker to test the code quality without having to install any other dependencies:
$ make static