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.
Posted by xjm
Problem/Motivation
The test filter plugin in core/modules/filter/tests/filter_test/lib/Drupal/filter_test/Plugin/Filter/FilterTestReplace.php
uses the wrong case for getPluginId()
:
$text[] = 'Filter: ' . $this->getLabel() . ' (' . $this->getPluginID() . ')';
While function names are (apparently) not case sensitive in PHP (@alexpott looked this up) and "Id" is a different word from "ID", we should nonetheless use the same case as the method defined on PluginBase
.
Proposed resolution
Rename FilterTestReplace::getPluginID()
to getPluginId()
.
Comment | File | Size | Author |
---|---|---|---|
#2 | filters-method-name-getPluginId-7461444-2.patch | 894 bytes | brentaar |
Comments
Comment #1
brentaar CreditAttribution: brentaar commentedComment #2
brentaar CreditAttribution: brentaar commentedComment #3
brentaar CreditAttribution: brentaar commentedComment #4
munizjor CreditAttribution: munizjor commentedEverything looks good.
Comment #5
xjmThanks @brentaar!
Comment #6
alexpottCommitted 4074668 and pushed to 8.x. Thanks!
Comment #7.0
(not verified) CreditAttribution: commentedRemoving myself from the author field to unfollow the issue. --xjm