core
core copied to clipboard
[RFC] Clean up kernel by introducing ParamConverters
Right now, we use magic in Kernel.php
to define the contenttype routes like /pages
, /pages/4
, etc. It is a hefty operation that also parses yaml files, it happens here:
https://github.com/bolt/core/blob/master/src/Kernel.php#L124-L142
But this logic can also be implemented with ParamConverters, which will be "the Symfony way" of achieving dynamic parameters in routes: https://symfony.com/bundles/SensioFrameworkExtraBundle/current/annotations/converters.html