Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Following #3214234: Add core/class_aliases.php and further discussion with @alexpott in Slack, I propose merging class_aliases.php into bootstrap.inc for two reasons:
- Less IO - we already load bootstrap.inc so why add another file
- At the start of the 10.x cycle we hopefully will no longer need class aliases so we will have to remove this file again then anyway
Steps to reproduce
Proposed resolution
Merge class_aliases.php into bootstrap.inc.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#7 | 3214308-7.patch | 2.53 KB | longwave |
#5 | 3214308-4.patch | 2.17 KB | longwave |
Comments
Comment #2
longwaveComment #3
alexpottLet's separate the comment from the @todo - in case we add more class_aliases here.
Comment #4
alexpottWe have existing test coverage of the class_alias being set by the autoloader in core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelLegacyTest.php
Comment #5
longwaveAlso change Defines -> Declare
Comment #6
alexpottLooks good to go. We have test coverage and this results in less to tidy up and the improve autoloading situation from #3214234: Add core/class_aliases.php
Moving to 9.2.x since the other issue landed there too.
Comment #7
longwaveReroll following #3210632: Update dependencies for Drupal 9.2
Comment #8
catchThis makes sense. I didn't really think about putting it in bootstrap.inc in the original issue, but it's better there than DrupalKernel, and saves the extra file (which could end up empty when 10.0.x is opened).