Problem/Motivation
Path aliases are currently represented as arrays, and they are using a custom storage class, which means they can't be integrated in modern workflows built around Drupal's Entity API, such as Content Moderation or Workspaces.
Proposed resolution
Convert path aliases to a new path_alias
content entity type. The new entity type will be revisionable and non-translatable, and will also be made publishable in a followup issue: #3007669: Add publishing status to path aliases
In order to keep this non-trivial patch to a reasonable size, no methods from the current path.alias_storage
service will be deprecated in this issue. That work will happen in a followup: #2233595: [PP-4] Deprecate the custom path alias storage
For the same reason, other conversion to use the Entity API will also be done in followup issues:
#3009014: [PP-1] Convert path alias migrations to create entities
#3007832: [PP-1] Convert custom path alias forms to entity forms
#3011807: [PP-2] Convert the path alias admin overview to a list builder
Note about performance
Operating with an entity is heavier than just sending arrays around. This patch doesn't change any of the queries that happen in bootstrap phase (which is most sensitive to performance regressions). All the queries (even functions) stay the same. Same is true for URL generation.
Remaining tasks
Review the patch.
User interface changes
Nope.
API changes
API addition: a new path_alias
revisionable content entity type.
Release notes snippet
Custom URL aliases are now provided by a new path_alias
revisionable content entity type. The path.alias_storage
service has been kept in place for backwards compatibility, and its hooks have been deprecated.