update 'dynamic' routing based on names of content types and taxonomies#3095
update 'dynamic' routing based on names of content types and taxonomies#3095simongroenewolt wants to merge 3 commits intobolt:6.0from
Conversation
…ns to a RouteLoader
|
Hmm, the phpunit errors do not look like they are related to my changes, or are they? Update: there were related to my changes, pushed a fix. |
|
I've been thinking a bit more about the general Bolt configuration setup, and while I do think this PR could make sense, I'm wondering if it is the right approach after all. This is because of on the way Config.php is used, being injected as a service, vs. the 'general' way configuration is handled by symfony and related packages/extensions. |
It is the way it is now, because I didn't know how else I could (programmatically) add the requirements to the routing. Personally, I think this is an improvement, because it removes black magic from Kernel. It might look like it's more code than before, but if you take into account a large part of the new code is comments, it seems to be about the same. I'm 👍 on this |
|
In an effort to keep our pull request list manageable, we are marking this PR as stale because it has been 60 days without activity. If this PR is still relevant, please let us know by posting a quick comment or update so that it can be assigned and hopefully merged. |
This change moves content-type and taxonomy routing config from Kernel + annotations to a RouteLoader service class. By doing so it removes (some of) the dependencies of Kernel.php on config parsers, the use of these parsers by Kernel.php can be problematic/confusing for developers working on or using Bolt because it removes the possibility to override (parts of) the Config.php class, for example during testing.
As the Config.php class is itself a service, it can not be used by the kernel (you cannot use services while configuring the service container)