core icon indicating copy to clipboard operation
core copied to clipboard

[RFC] Clean up kernel by introducing ParamConverters

Open I-Valchev opened this issue 2 years ago • 0 comments

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

I-Valchev avatar Dec 23 '21 09:12 I-Valchev