Problem/Motivation

This summary was updated based on #3552894-10: Fix typos in comments to core.services.yml and serialization.yaml to also include other typos.
The initial summary and fix only covered the DrupalKernel comment

Nitpick of the day:

There is a some comments in Drupal core that reference non-existing files or services

  • reference to a non-existing file in the class comment of \Drupal\Core\DrupalKernel
  • reference to a non-existing service in 2 Twig related classes

Steps to reproduce

  • the file extension is wrong in
    • web/core/lib/Drupal/Core/DrupalKernel.php

    * CoreServiceProvider, which, in addition to registering any core services that
    * cannot be registered in the core.services.yaml file, adds any compiler passes

  • the service name is wrong in
    • core/modules/help/src/HelpTopicTwigLoader.php
    • core/lib/Drupal/Core/Template/TwigEnvironment.php (2 times)

    // Note: always use \Drupal\Core\Serialization\Yaml here instead of the
    // "serializer.yaml" service. This allows the core serializer to utilize

Proposed resolution

  • * CoreServiceProvider, which, in addition to registering any core services that
    * cannot be registered in the core.services.yml file, adds any compiler passes

  • // Note: always use \Drupal\Core\Serialization\Yaml here instead of the
    // "serialization.yaml" service. This allows the core serializer to utilize

Remaining tasks

none

User interface changes

none

Introduced terminology

none

API changes

none

Data model changes

none

Release notes snippet

none

Issue fork drupal-3552894

Command icon 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:

Comments

mollux created an issue. See original summary.

mollux’s picture

Version: 11.2.x-dev » 11.x-dev
mollux’s picture

Version: 11.x-dev » 11.2.x-dev

mollux changed the visibility of the branch 11.x to hidden.

mollux changed the visibility of the branch 3552894-fix-typo-in to hidden.

mollux’s picture

Issue summary: View changes
mollux’s picture

Status: Active » Needs review
smustgrave’s picture

Version: 11.2.x-dev » 11.x-dev
Priority: Normal » Minor
Status: Needs review » Needs work

Thanks for finding. MR needs to be pointed to 11.x

Also would be good to search if there are other instances of this typo

mollux’s picture

Somehow I can't create an MR for 11.x, the button doesn't appear. Do I lack permissions to create the MR?

I checked the source code, and there are some occurrences:
* The first one is addressed in this PR
* the next ones are actually another typo: the services name is serialization.yaml, but is mentioned in the comments as serializer.yaml.
Do I change those in the PR (and change title and description)?

/var/www/html$ grep -rn '\.yaml' web/core/*
web/core/lib/Drupal/Core/DrupalKernel.php:47: * cannot be registered in the core.services.yaml file, adds any compiler passes
web/core/core.services.yml:577:  serialization.yaml:
web/core/lib/Drupal/Core/Template/TwigEnvironment.php:109:    // "serializer.yaml" service. This allows the core serializer to utilize
web/core/lib/Drupal/Core/Template/TwigEnvironment.php:172:    // "serializer.yaml" service. This allows the core serializer to utilize
web/core/modules/help/src/HelpTopicTwigLoader.php:76:      // "serializer.yaml" service. This allows the core serializer to utilize

mollux changed the visibility of the branch 11.x to active.

smustgrave’s picture

The current MR you have you should be able to change the target branch.

You will have to rebase though as 11.2.x and 11.x are very different

smustgrave’s picture

Should have mentioned 11.x is the development branch for core. So things need to land there first. And depending on what they are it’ll backported

mollux changed the visibility of the branch 3552894-fix-typo to hidden.

mollux’s picture

I changed the MR to target 11.x

mollux’s picture

Issue summary: View changes
mollux’s picture

Title: Fix typo in DrupalKernel class comment » Fix file and service reference typos in various comments
Assigned: mollux » Unassigned
Status: Needs work » Needs review
smustgrave’s picture

Can you fix the phpcs error?

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

These look correct to me. Thanks!

quietone’s picture

Title: Fix file and service reference typos in various comments » Fix typos in comments to core.services.yml and serialization.yaml

Fix typos in comments to core.services.yml and serialization.yaml

quietone’s picture

I applied the diff and searched for remaining instances and found none.

$ git grep core.services.yaml
$ git grep serialization.yml

  • quietone committed 8d090526 on 11.x
    Issue #3552894 by mollux, smustgrave: Fix typos in comments to core....
quietone’s picture

Status: Reviewed & tested by the community » Fixed

Committed 8d09052 and pushed to 11.x. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.