Problem/Motivation

We added a new coding standards rule, Classes and interfaces without a backslash \ inside their fully-qualified name must be fully qualified, this should be changed.

Steps to reproduce

Add the SlevomatCodingStandard.Namespaces.FullyQualifiedExceptions rule and run phpcs
This does not seem to do what we need to do.

Proposed resolution

SlevomatCodingStandard.Namespaces.FullyQualifiedExceptions added to phpcs, run phpcbf to fix all instances where it needs to be updated.
This does not seem to do what we need to do.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3586405

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

borisson_ created an issue. See original summary.

quietone’s picture

Issue tags: +Coding standards

bramdriesen made their first commit to this issue’s fork.

bramdriesen’s picture

bramdriesen’s picture

Status: Active » Needs review

We have a conflicting rule Drupal.Classes.FullyQualifiedNamespace.UseStatementMissing. I removed that, but I'm not sure if that's the correct way to do it.

This will need a rebase, a lot so I'm not going to do that now as it will be a challenge to keep up with Core.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new98 bytes

The Needs Review Queue Bot tested this issue. The merge request has merge conflicts and cannot be merged. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

borisson_’s picture

Issue summary: View changes

It seems like this rule doesn't fully do what we wanted it to do, since this is supposed to be only for classes that don't have a \ in their FQN. Should we find (or write) another rule?

quietone’s picture

This is unfortunate. I just spent some time searching for another solution and didn't find one. So, I reckon an issue in Coder is needed.