[DX] `hook_layout_info()` should be renamed `hook_layout_template_info()`
Description of the issue
This hook is actually allows you to define a layout template in code, instead of using a "layout" package with { *.info, *.tpl.php , etc } as found in /layouts or core/layouts.
But it sounds like a function that defines Layout info, as in the Layout objects, built from the layout.layout.json files..
I think that function was missed in the great layout/template renaming event.
Agreed -- I have been slowly trying to wrap my mind around the intricacies of the layout system for that Paragraphs project you glanced over and I think this distinction between layouts and templates (and the associated references) derailed me for a little while.
I like this cleanup 👍🏼 ...I've left comments in the PR.
I agree that this should be done in a minor release, but perhaps hold off merging anything till right after the next minor release. That should allow us to have a full 4-month cycle to test more things and catch any possible problems/regressions.
Should we add this to the 1.29.0 milestone then?
I think that function was missed in the great layout/template renaming event.
@docwilmot How do you feel about potentially renaming flexible template config files? Is that too much? (e.g. something like layout.template.flexible.name.json instead of layout.flexible.name.json)
Overall this looks great. A well-done renaming that provides backwards-compatibility. I left a few comments in the PR. I think the current approach doesn't actually populate the backwards-compatible $layout->layout_info and $renderer->layout_info properties.
I'm not sure this would be wise to merge for 1.29.0. Based on @klonos's suggestion I think we would merge this after the 1.29.0 release and include it in 1.30.0.
PR is ready for another round of reviews. PHPCS as usual seems to find a new batch of nits to pick with every push, but I think its good now.
This looks great @docwilmot. I created a change record at https://docs.backdropcms.org/change-records/hook_layout_info-renamed-to-hook_layout_template_info and updated the PR to reference it. I updated all the @since lines to 1.30.0. I think this is ready to go!
Merged into 1.x for 1.30.0. Thank you @docwilmot for disambiguating the overloaded term "layout"! Thank you @klonos and @laryn both for your code reviews!