Problem/Motivation
Core still contains many references to "Drupal 8" where it is no longer necessary to specify the version number.
E.g in core/lib/Drupal/Core/Render/theme.api.php
* Drupal 8 uses the templating engine Twig. Twig offers developers a fast,
* secure, and flexible method for building templates for Drupal 8 sites. Twig
* also offers substantial usability improvements over PHPTemplate, and does
* not require front-end developers to know PHP to build and manipulate Drupal
* 8 themes.
*
* For further information on theming in Drupal 8 see
* https://www.drupal.org/docs/develop/theming-drupal
Steps to reproduce
1. Search the codebase for "Drupal 8".
2. There are many references to Drupal 8 where there is no need to specify the core version.
Proposed resolution
Identify which textual references to Drupal 8 are no longer needed in the documentation. There are 7 references that have been identified as needing to be updated.
Keep in mind that certain documentation relating to things like migration api and in tests might actually require core version specificity.
Leave those references as is.
Remaining tasks
Review the MR by checking to make sure the removal of the core version number is appropriate in these cases.
Search core for more references to Drupal 8 (there are over a hundred). Confirm that all the remaining ones are instances in which it is appropriate to specify Drupal 8 specifically. Comment #12
Release notes snippet
Issue fork drupal-3553402
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3553402-remove-textual-references
changes, plain diff MR !13590
Comments
Comment #3
mdranove commentedComment #4
mradcliffeThe Drupal Contribution Mentoring team is triaging issues for DrupalCon Nara 2025, and we are reserving this issue for Mentored Contribution during the event.
After November 19, this issue returns to being open to all. Thanks!
I performed Novice Triage on this issue. I am leaving the Novice tag on this issue because it would be a good opportunity for a couple of people to review @mdranove's merge request. We can use a text search tool locally without the merge request applied to find mentions of "Drupal 8" and compare against the merge request.
Comment #5
xjmI would actually suggest two tasks:
Thanks!
Comment #6
chikaramike commentedHi, I'm Mike working today on this issue at DrupalCon Asia 2025.
Comment #7
roxflame commentedmerge request !13590 reviewed today by me and @ceri_d at Drupalcon Nara contribition day. All suggested changes in the merge request look good to us
Comment #8
chikaramike commentedHave separated all tests from other files. Need to determine references to Drupal 8 in other files that can be updated.
What are the current best practices for migration? How should upgrading to modern Drupal be referenced?
Needs Updating
/core/includes/update.inc
39,181: 'description' => 'Your system schema version is ' . $system_schema . '. Updating directly from a schema version prior to 8000 is not supported. You must upgrade your site to Drupal 8 first, see https://www.drupal.org/docs/8/upgrade.',
Suggested text:
Updating directly from a schema version prior to 8000 is not supported. You must upgrade your site to Drupal 8 (or later), see https://www.drupal.org/docs/upgrading-drupal.'
May need a new issue created
/core/lib/Drupal/Core/Render/Renderer.php
740,69: // change the way \Drupal\Core\Messenger\Messenger works in the Drupal 8
Todo References for Drupal 8
/core/lib/Drupal/Core/Form/FormBuilder.php
461,18: // @todo For Drupal 8, find a way to avoid this code duplication.
/core/lib/Drupal/Core/Render/Element/Select.php
56,41: * @todo Address the above issue in Drupal 8.
/core/modules/media/src/MediaStorage.php
22,18: // @todo For Drupal 8.7, consider throwing a deprecation notice if the
/core/modules/migrate/help_topics/migrate.overview.html.twig
------
Keep As is..
Migrate to Drupal 8 Related
/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php
/core/modules/field/src/Plugin/migrate/source/d6/Field.php
/core/modules/field/src/Plugin/migrate/source/d6/Field.php
/core/modules/filter/migrations/d7_filter_format.yml
/core/modules/filter/src/Plugin/migrate/process/FilterID.php
/core/modules/filter/src/Plugin/migrate/process/FilterSettings.php
/core/modules/language/migrations/d6_language_content_settings.yml
/core/modules/language/migrations/d7_language_content_settings.yml
/core/modules/link/src/Plugin/migrate/process/FieldLink.php
/core/modules/migrate_drupal/src/Annotation/MigrateField.php
/core/modules/migrate_drupal/src/Attribute/MigrateField.php
/core/modules/migrate_drupal/src/Plugin/migrate/source/d8/Config.php
/core/modules/migrate_drupal/src/MigrationPluginManager.php
/core/modules/migrate_drupal/src/MigrationState.php
/core/modules/migrate_drupal_ui/help_topics/migrate_drupal_ui.upgrading.html.twig
/core/modules/responsive_image/src/Plugin/migrate/source/d7/ResponsiveImageStyles.php
/core/modules/system/migrations/d7_global_theme_settings.yml
/core/modules/system/migrations/d7_theme_settings.yml
/core/modules/block/migrations/d7_block.yml
/core/modules/content_translation/migrations/d6_language_content_comment_settings.yml
/core/modules/content_translation/src/Plugin/migrate/source/d7/EntityTranslationSettings.php
/core/modules/field/migrations/d7_field.yml
/core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceSettings.php
/core/modules/field/src/Plugin/migrate/process/d7/FieldInstanceDefaults.php
/core/modules/content_translation/migrations/d6_language_content_comment_settings.yml
/core/modules/content_translation/src/Plugin/migrate/source/d7/EntityTranslationSettings.php
/core/modules/field/migrations/d7_field.yml
/core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceSettings.php
/core/modules/field/src/Plugin/migrate/process/d7/FieldInstanceDefaults.php
/core/modules/image/src/Plugin/migrate/process/d6/ImageCacheActions.php
/core/modules/migrate/migrate.api.php
-----
Keep Drupal 8 Reference
/core/UPDATE.txt
/core/lib/Drupal/Core/Database/Database.php
/core/lib/Drupal/Core/Entity/EntityFieldManager.php
/core/profiles/demo_umami/themes/umami/umami.theme
/core/themes/claro/claro.theme
Used in examples in comments (ok to keep)
/core/modules/update/src/ProjectSecurityData.php
/core/lib/Drupal/Core/Extension/InfoParserInterface.php
/core/lib/Drupal/Core/Extension/module.api.php
Test related
/core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateBlockContentTest.php
/core/modules/block_content/tests/src/Kernel/Migrate/d6/MigrateCustomBlockContentTranslationTest.php
/core/modules/block_content/tests/src/Kernel/Migrate/d7/MigrateCustomBlockContentTranslationTest.php
/core/modules/block_content/tests/src/Kernel/Migrate/d7/MigrateCustomBlockTest.php
/core/modules/ckeditor5/tests/src/FunctionalJavascript/StyleTest.php
/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTestBase.php
/core/modules/contact/tests/src/Kernel/Migrate/MigrateContactCategoryTest.php
/core/modules/content_translation/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTranslationTest.php
/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldOptionTranslationTest.php
/core/modules/field/tests/src/Kernel/Migrate/d6/MigrateFieldTest.php
/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldOptionTranslationTest.php
/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateFileTest.php
/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityDisplayTest.php
/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadEntityFormDisplayTest.php
/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadFieldTest.php
/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadInstanceTest.php
/core/modules/file/tests/src/Kernel/Migrate/d6/MigrateUploadTest.php
/core/modules/file/tests/src/Kernel/Plugin/Validation/Constraint/FileEncodingConstraintValidatorTest.php
/core/modules/filter/tests/src/Kernel/Migrate/d6/MigrateFilterFormatTest.php
/core/modules/filter/tests/src/Kernel/Migrate/d7/MigrateFilterFormatTest.php
/core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageCacheTest.php
/core/modules/locale/tests/src/Functional/LocaleExportTest.php
/core/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php
/core/modules/locale/tests/src/Functional/LocalePluralFormatTest.php
/core/modules/locale/tests/src/Functional/LocaleUpdateBase.php
/core/modules/locale/tests/test.af.po
/core/modules/media/tests/fixtures/oembed/video_dailymotion.html
/core/modules/media/tests/fixtures/oembed/video_dailymotion.xml
/core/modules/media/tests/src/Functional/ResourceFetcherTest.php
/core/modules/migrate_drupal/tests/fixtures/drupal6.php
/core/modules/migrate_drupal_ui/tests/src/Functional/MultilingualReviewPageTestBase.php
/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeBundleSettingsTest.php
/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeConfigsTest.php
/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTest.php
/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeTypeTest.php
/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateViewModesTest.php
/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTypeTest.php
/core/modules/responsive_image/tests/src/Kernel/Migrate/d7/MigrateResponsiveImageStylesTest.php
/core/modules/search/tests/src/Kernel/Migrate/d6/MigrateSearchPageTest.php
/core/modules/system/tests/modules/plugin_test/src/Plugin/MockBlockManager.php
/core/modules/system/tests/src/Functional/Theme/TwigTransTest.php
/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php
/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateDateFormatTest.php
/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateMenuTest.php
/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php
/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateMenuTest.php
/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTest.php
/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTest.php
/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTranslationTest.php
/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermLocalizedTranslationTest.php
/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeCompleteTest.php
/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeRevisionTest.php
/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeTest.php
/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeTranslationTest.php
/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyEntityDisplayTest.php
/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyEntityFormDisplayTest.php
/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldInstanceTest.php
/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldTest.php
/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php
/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTranslationTest.php
/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php
/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTranslationTest.php
/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTermLocalizedTranslationTest.php
/core/modules/update/tests/fixtures/release-history/drupal.1.0-supported.xml
/core/modules/update/tests/fixtures/release-history/drupal.1.1-unsupported.xml
/core/modules/update/tests/fixtures/release-history/drupal.8.0.0-9.0.0.xml
/core/modules/update/tests/fixtures/release-history/drupal.8.0.0-alpha1.xml
/core/modules/update/tests/fixtures/release-history/drupal.8.0.0-beta1.xml
/core/modules/update/tests/fixtures/release-history/drupal.8.0.0.xml
/core/modules/update/tests/fixtures/release-history/drupal.8.0.1-alpha1.xml
/core/modules/update/tests/fixtures/release-history/drupal.8.0.1-beta1.xml
/core/modules/update/tests/fixtures/release-history/drupal.8.0.1.xml
/core/modules/update/tests/fixtures/release-history/drupal.8.1.0-alpha1.xml
/core/modules/update/tests/fixtures/release-history/drupal.8.1.0-beta1.xml
/core/modules/update/tests/fixtures/release-history/drupal.8.1.0-unsupported.xml
/core/modules/update/tests/fixtures/release-history/drupal.8.1.0.xml
/core/modules/update/tests/fixtures/release-history/drupal.8.1.1-alpha1-core_compatibility.xml
/core/modules/update/tests/fixtures/release-history/drupal.8.1.1-alpha1.xml
/core/modules/update/tests/fixtures/release-history/drupal.8.1.1-beta1.xml
/core/modules/update/tests/fixtures/release-history/drupal.8.1.1-core_compatibility.xml
/core/modules/update/tests/fixtures/release-history/drupal.8.1.1.xml
/core/modules/update/tests/fixtures/release-history/drupal.dev-no-date.xml
/core/modules/update/tests/fixtures/release-history/drupal.dev.xml
/core/modules/update/tests/fixtures/release-history/drupal.project_status.insecure.0.2.xml
/core/modules/update/tests/fixtures/release-history/drupal.project_status.revoked.0.2.xml
/core/modules/update/tests/fixtures/release-history/drupal.project_status.unsupported.0.2.xml
/core/modules/update/tests/fixtures/release-history/drupal.sec.8.0.1_8.0.2.xml
/core/modules/update/tests/fixtures/release-history/drupal.sec.8.0.2.xml
/core/modules/update/tests/fixtures/release-history/drupal.sec.8.1.0-dev.xml
/core/modules/update/tests/fixtures/release-history/drupal.sec.8.1.2_insecure-unsupported.xml
/core/modules/update/tests/fixtures/release-history/drupal.sec.8.1.2_insecure.xml
/core/modules/update/tests/fixtures/release-history/drupal.sec.8.1.2.xml
/core/modules/update/tests/fixtures/release-history/drupal.sec.8.2.0_8.3.0-rc1.xml
/core/modules/update/tests/fixtures/release-history/drupal.sec.8.2.0_9.0.0.xml
/core/modules/update/tests/fixtures/release-history/drupal.sec.8.2.0-rc2-b.xml
/core/modules/update/tests/fixtures/release-history/drupal.sec.8.2.0-rc2.xml
/core/modules/update/tests/fixtures/release-history/drupal.sec.8.2.0.xml
/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserPictureD6FileTest.php
/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserProfileValuesTest.php
/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserTest.php
/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserPictureEntityDisplayTest.php
/core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserTest.php
/core/tests/Drupal/FunctionalTests/ExistingDrupal8StyleDatabaseConnectionInSettingsPhpTest.php
/core/tests/Drupal/Tests/Component/Utility/XssTest.php
/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php
/core/tests/Drupal/Tests/ComposerIntegrationTest.php
Comment #9
ceri_d commentedCurrently reviewing merge request !13590 with @roxflame during Drupalcon Nara Contributor Day 2025 under the guidance of mentors.
Comment #10
binssss commentedHi, I'm mentoring @chikaramike, @roxflame, and @ceri_d on their first contributions.
Comment #11
chikaramike commentedI have copied all references to Drupal 8 in core files.
I have separated all the tests from other files.
Need to further sort the remaining files into ones that need updating and references that can remain the same
Leaving as is any comments used "for example"
Comment #12
roxflame commentedCurrently categorizing all references to Drupal 8 in a google doc : https://docs.google.com/document/d/1aCSC301Ov-U6e0S0KSM1-NluelSD9T-Q0XLB...
Discussed with @xjm
Comment #13
roxflame commentedOur assessment is that only 1 additional reference needed updating (as it also included an outdated link)
/core/includes/update.inc
39,181: 'description' => 'Your system schema version is ' . $system_schema . '. Updating directly from a schema version prior to 8000 is not supported. You must upgrade your site to Drupal 8 first, see https://www.drupal.org/docs/8/upgrade.',
Suggested text:
Updating directly from a schema version prior to 8000 is not supported. You must upgrade your site to Drupal 8 (or later), see https://www.drupal.org/docs/upgrading-drupal.'
We also found this which may need a new issue created (suggested by @xjm)
/core/lib/Drupal/Core/Render/Renderer.php
740,69: // However, we cannot change the way \Drupal\Core\Messenger\Messenger works in the Drupal 8
// cycle. So we have to accommodate its special needs.
All other references in the codebase seemed ok to keep as they were simply used in example text or were related to Drupal 8 migration, or Drupal 8 specific issues.
Comment #14
chikaramike commentedUpdated #8 with headings for proposed changes and recommended to keep as is. What should we do with ToDos?
Comment #15
xjmFantastic work on this!
I'd also create separate, individual followup issues for each
@todo, like the renderer reference.Comment #16
mradcliffeYes, thank you for categorizing the list.
I think this can be set to Needs work because there is one pending item in Needs updating. I updated the issue summary to mention creating follow-up tasks.
Comment #17
mdranove commentedWent ahead and made the change, keeping it in Needs Review.
Comment #18
mradcliffeThank you for continuing to work on the issue, @mdranove.
While I was reviewing I found another one in the core/lib/Drupal/Core/Render/theme.api.php. I left a review comment on the merge request as well as further check to try to find any "Drupal 8" references that are separated by line breaks in inline or block comments.
I only found that one using
grep -REn -B 1 "^\s+\*\s8" core/(block comment with line comment starting with 8) and(inline comment starting with 8).
The change should be to remove the "8" from "8 theming" where I made the review comment.
Comment #19
mdranove commentedThank you, yes I see. Updated based on the comment.
Comment #22
smustgrave commentedDoing a search for Drupal 8 found more instances
Examples
EarlyRenderingControllerWrapperSubscriber.php
Renderer.php
Checkboxes.php
Select.php
Agree migrations can be ignored till after the cleanup of migrations out of main.
Comment #24
kanchanandhini6 commentedComment #25
smustgrave commented@kanchanandhini6 thanks for picking up but from what I can tell you didn't do any search just addressed 1 of the examples I mentioned so putting back to NW
Comment #26
quietone commented@kanchanandhini6, Welcome to Drupal! In Drupal core, we encourage contributors to comment on what they have done, or not done, when working on an issue. There is more information in the Contributor Guide about how we work together. If you haven't already seen that I suggest you browse through the contents.
Comment #27
jbodony commentedI am contributing this issue at DrupalCampEngland mentored contribution. @lostcarpark is helping.
Comment #28
bwkerenza commentedI am also looking at this with @lostcarpark and @jbodony
Comment #29
bwkerenza commentedEarlyRenderingControllerWrapperSubscriber.php is already mentioned in https://www.drupal.org/project/drupal/issues/3553402#comment-16351318 as one to keep as it relates to a migration.
Comment #30
bwkerenza commentedSelect.php also comes up in the previously mentioned comment but applies to Checkboxes.php as well related to whether the todo comments need updating to Drupal 10/11.
Comment #31
lostcarpark commentedThanks @jbodony and @bwkerenza for looking at this issue during #DrupalCampEngland.
We have reviewed the instances of "Drupal 8" that haven't been removed, and we believe there is good justification for keeping them referring to Drupal 8 for now.
There are some instances where
@todoentries referring to functionality to be removed in Drupal 9 possibly need updating, but it feels sensible to keep this issue focused on Drupal 8 references, and to add a follow-up issue for those.I'm moving to Needs review for now. Feel free to move back if this is not correct.
Comment #32
dcam commentedThank you to all of the new contributors who have worked on this issue! Unfortunately, the merge request must be rebased. The migrate_drupal_ui module was recently removed from Drupal Core. A change that was being made to a file in that module is no longer relevant because the file no longer exists. I'm setting the status back to Needs Work for that to be done.
Comment #34
sujal kshatri commentedHey everyone,
I rebased theMR and resolved the merge conflict that occurred because the
migrate_drupal_uimodule was removed from core.Please let me know if anything else needs to be adjusted. Thanks!
Comment #35
sujal kshatri commentedComment #36
dcam commentedI left several comments on the merge request. The first thing to note is that all of the
@todocomments mentioned as needing follow-up issues already have follow-up issues (except for one, which I'll get to). Therefore, I am declaring that the comments in theSelectandCheckboxesclasses are in the scope of this issue, not only to remove the reference to "Drupal 8", but to also add the URLs of the follow-up issues per our documentation standards. The@todoin theMediaStorageclass does not need to be edited because it already has the issue URL. The "Drupal 8" reference can stay there until the issue is fixed.The exception that I mentioned above is the comment in the
Rendererclass. I don't know if there's an existing issue for that or not. I didn't find one. But I think we should deal with that comment here, not by removing the reference to Drupal 8, but by changing the text to make it past-tense. If a committer wants a follow-up issue for that, then it may need to be created by someone who understands the subsystem and is familiar with the issue. Because writing a follow-up for that is not a Novice task.A couple of other
@todocomments that were noted in the issue summary as needing follow-ups are irrelevant now. They appear to have been eliminated by recent commits.I also think one of the test comments needs to be updated.
Comment #37
dcam commentedComment #38
sujal kshatri commentedMade the changes that were asked for
-Applied the suggestion.
-In Checkboxes.php added the follow up issue URL to the existing @todo comment
-In Select.php radded issue URL.
-In MockBlockManager.php removed the outdated comment
Comment #39
dcam commentedMy feedback was addressed. This looks good to me.
Comment #42
longwaveWelcome to all the new contributors who worked on this issue - hopefully we will see you in another issue soon.
Committed and pushed a0ca9c2bf35 to main and 503240bb1c7 to 11.x. Thanks!
Contains a translatable string change so not eligible for further backport.