Releases: thormeier/breadcrumb-bundle
Several fixes and additions
Several fixes and additions
Add support for `%%` as label parameters
When using a translated text with parameters in the labels like %name%
directly in the routing, i.e.
#routing.yml
# ...
breadcrumb:
label: 'My Product %name%'
# ...
the container tries to replace %name%
with an actual container parameter, which is not desired.
This release adds support for label parameters with escaped %
, like %%name%%
(instead of %name%
, by replacing %%
in the template with %
before translating.
Thanks to @Tobion for pointing to this possible solution.
This release also contains documentation updates and cleanups.
Use configured model class instead of standard hardcoded one
Provider used standard model class instead of configured one, this release fixes this and uses the configured breadcrumb model instead, as hinted in the docs.
Remove deprecated Twig_Function_Method, add more tests and circular breadcrumb detection
Add more tests, more documentation and detection of circular breadcrumb definitions.
Thanks to @peschee for removing deprecated Twig calls.
Make this bundle ready for Symfony3 and PHP7
Update dependencies and CI config to allow PHP7 and Symfony3.
Also remove older and non-LTS versions of Symfony2 from CI build.
Use route cache to store breadcrumb lists to speed things up
This version uses the route cache to not load all routes on every request:
-
On
cache:warmup
all breadcrumb lists for all routes are stored in the route cache. -
This speeds up the whole process of breadcrumb building since the getting of the whole
RouteCollection
triggers the router to reload all routes from filesystem every time. -
Breadcrumb config is ultimately stored in
_breadcrumbs
in a routesdefault
s. This, because options do not get cached. -
It uses a custom routing loader and replaces the existing
routing.loader
service by aliasingthormeier_breadcrumb.routing.attach_breadcrumb_loader
via compiler pass.If you are already replacing/extending the
routing.loader
service, use a compiler pass as well to make this work smooth!
2.0.0: Merge pull request #7 from dbu/fix-jms-handling
fix handling of jms i18n router