Problem/Motivation

As title, and a code sniffer PR was created to the coder project.

Only found one case in Drupal core with that sniff, so enlarge the scope is unnecessary.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jungle created an issue. See original summary.

jungle’s picture

jungle’s picture

jungle’s picture

Status: Active » Needs review
quietone’s picture

The use statement in DestinationCategoryTest needs to be changed from BlockedIP to BlockedIp. And then I did a grep for 'BlockedIP' and changed other references. It made sense to me to do it all at once but others may consider it out of scope. Therefore, this patch is only for 9.1.x.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

While "Ip" might look wrong this is the correct way to camel case acronyms and initialisms. I think #5 is OK to fix all instances in one go.

alexpott’s picture

Version: 9.1.x-dev » 9.0.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed aafcd8d and pushed to 9.1.x. Thanks!

Going too ask release managers about backporting this.

+++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/DestinationCategoryTest.php
@@ -2,7 +2,7 @@
-use Drupal\ban\Plugin\migrate\destination\BlockedIP;
+use Drupal\ban\Plugin\migrate\destination\BlockedIp;

Need to fix \Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\DestinationCategoryTest::getContentClasses() to use the correct case. Fixed on commit.

We have to fix all these things together as this fixes odd bugs on case sensitive file systems...

Psy Shell v0.10.3 (PHP 7.3.13 — cli) by Justin Hileman
>>> class_exists('Drupal\ban\Plugin\migrate\destination\BlockedIP')
=> false
>>> class_exists('Drupal\ban\Plugin\migrate\destination\BlockedIp')
=> true
>>> class_exists('Drupal\ban\Plugin\migrate\destination\BlockedIP')
=> true

Note this doesn't really break much because of the way we discover plugins.

  • alexpott committed aafcd8d on 9.1.x
    Issue #3126784 by quietone, jungle: \Drupal\ban\Plugin\migrate\...
jungle’s picture

Patches cherry-picked from aafcd8d in case they are needed. (probably, this is unnecessary)

  • alexpott committed 0675283 on 8.9.x
    Issue #3126784 by quietone, jungle: \Drupal\ban\Plugin\migrate\...

  • alexpott committed 9559bde on 9.0.x
    Issue #3126784 by quietone, jungle: \Drupal\ban\Plugin\migrate\...
alexpott’s picture

Version: 9.0.x-dev » 8.9.x-dev
Status: Patch (to be ported) » Fixed

@jungle yes that's unnecessary if the patch applies to all the branches you can leave it up to the committer. That said it can be helpful to queue test runs against the other branches.

Discussed with @catch and we agreed to backport to 9.0.x and 8.9.x.

Status: Fixed » Closed (fixed)

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

xjm’s picture

In #3134472: [8.8 only] Fix failure of enabled phpcs rule: Drupal.Files.EndFileNewline in 8.8.x @jungle discussed backporting this fix to 8.8.x. If it had just been a test class, a backport would have been alright, but since this is an actual public API, case-insensitive filesystems would have had to change their use statements for this (and case-sensitive ones would presumably have already worked around the problem, and even if they didn't it's only a difference of a less than month between the release of 8.8.6 and that of 8.9.0 for the bugfix to be available for them).

So, leaving this against 8.9.x is correct.