Problem/Motivation

Lets remove usage of "blacklist" and "whitelist" in the path alias module.

They are:

  • An historic bad labelling of people
  • Provide no context: "what is listed in them"?

Proposed resolution

  • 'path_alias.whitelist' -> path_alias.prefix_list
  • AliasWhitelistInterface -> AliasPrefixListInterface
  • AliasWhitelist -> AliasPrefix
  • AliasManager::$whitelist protected member -> AliasManager::$pathPrefixes
  • Update tests

Remaining tasks

Deprecate pathAliasWhitelistRebuild -> pathAliasPrefixListRebuild
Add tests for deprecations
Reviews, refinements
Commit

User interface changes

None

API changes

@todo

Data model changes

@todo

Release notes snippet

@todo

Issue fork drupal-3151086

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

alexpott created an issue. See original summary.

alexpott’s picture

Issue summary: View changes
dww’s picture

Issue summary: View changes

Fleshed out remaining tasks + proposed resolution.

neclimdul’s picture

Issue summary: View changes
StatusFileSize
new29.68 KB

I'll start the BC discussion and give a quick patch with some of the changes to help with the discussion.

This might be the most tricky of these issues I've seen in terms of BC. Clearly the whitelist service is setup to be overridden with an interface. This means changing AliasManager service definition and the path prefix service name to not include whitelist would break modules or sites overriding that service. Basically the same problem shows up in the constructor since older services will be implementing the older interface and changing it would trigger a fatal. This seems pretty unlikely in contrib but it _could_ be something sites are doing for a very specific optimization since this is in a critical path. Prepopulating the cache or something.

For the AliasManager property, we shouldn't have to worry about BC. This is not marked as an @api or clearly designated as a base class.
"Protected properties on a class are always considered @internal unless they're on a base class marked with @api"

The cid _could_ be an issue but that doesn't seem like it would be covered by BC. At least not between minor releases. Up for discussion I guess.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

webchick’s picture

Status: Active » Needs work

Indicating that there's a patch here. (Though it no longer applies to 9.2.x.)

webchick’s picture

Status: Needs work » Needs review
StatusFileSize
new26.15 KB

Attempted reroll.

quietone’s picture

StatusFileSize
new6.98 KB
new29.6 KB

A reroll. Not testing because of issue discusses in #4.

mradcliffe’s picture

Issue tags: +d10readiness, +NorthAmerica2021, +Novice, +Needs issue summary update

@volkswagenchick and I performed Novice Triage on this issue.

We added the Novice tag to help update the issue summary, which is a little out-of-date.

Additionally, we should discuss and do research on the additional backwards-compatibility needs. Starting a thread in #d10readiness might be a good start.

gábor hojtsy’s picture

Issue tags: -d10readiness +Drupal 10

Fixing tag. Drupal 10 is our core tag.

kapilv’s picture

StatusFileSize
new25.96 KB

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new144 bytes

The Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

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

kunalgautam’s picture

StatusFileSize
new25.66 KB

Patch for Drupal version 10.1.x

kunalgautam’s picture

StatusFileSize
new30.13 KB
kunalgautam’s picture

StatusFileSize
new30.14 KB

Fix PHPSTAN issues

kunalgautam’s picture

StatusFileSize
new30.21 KB

cspell fixes

kunalgautam’s picture

Status: Needs work » Needs review
tanuj.’s picture

Verified patch #20 and tested it with Drupal version 10.1.x, Patch applied successfully.

nod_’s picture

Status: Needs review » Needs work

Legitimate tests failures left

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

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Title: Replace use of whitelist/blacklist in the path alias module » Replace use of whitelist/blacklist in the path_alias module
Issue summary: View changes
Issue tags: -Novice, -Needs issue summary update
quietone’s picture

Status: Needs work » Needs review

Time to get some feedback on these changes.

smustgrave’s picture

Status: Needs review » Needs work

Left small comments on MR.

quietone’s picture

Status: Needs work » Needs review

And updated the change record

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Feedback appears to be addressed.

  • catch committed 27948b06 on 11.x
    Issue #3151086 by quietone, neclimdul, webchick, KapilV, alexpott,...

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x, thanks!

Status: Fixed » Closed (fixed)

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