Problem/Motivation

The module is currently only compatible with the domain version 1.0-beta or 2.x according to the composer.json file, it would be good to update it so that it's also compatible with version 3.x of the domain module.

Steps to reproduce

Have both this module and domain installed (2.x) and then try to update the domain module with: composer require 'drupal/domain:3.x-dev@dev' and then observe error:

Problem 1
    - drupal/domain_path is locked to version 1.5.0 and an update of this package was not requested.
    - drupal/domain_path 1.5.0 requires drupal/domain ^1.0-beta || ^2 -> found drupal/domain[dev-1.x, dev-2.0.x, 1.0.0-beta1, ..., 1.x-dev (alias of dev-1.x), 2.0.0-beta1, ..., 2.0.x-dev (alias of dev-2.0.x)] but it conflicts with your root composer.json require (3.x-dev@dev).

Proposed resolution

Update the module to be compatible with 3.x of domain

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

lincoln-batsirayi created an issue. See original summary.

lincoln-batsirayi’s picture

Issue summary: View changes

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

mably’s picture

Status: Active » Needs review

Tested successfully on a multilingual Drupal 11.2.10 instance with Domain 3.x.

Switched the DomainPathAliasManager to be a decorator, but still not sure it's the best architecture if we want to implement a much-needed efficient caching mechanism.

Will think a bit more about it.

mably’s picture

I have backported the cache mechanism from the core AliasManager service into the DomainPathAliasManager decorator.

Performance should be optimal.

lincoln-batsirayi’s picture

Status: Needs review » Reviewed & tested by the community

I was able to test this on drupal 10.3.x and it worked well for me, i did not spot any issues. I did the test by aliasing the domain module to 2.x like so composer require "drupal/domain:3.x-dev as 2.0.0-beta8"

mably’s picture

Version: 8.x-1.5 » 2.x-dev
mably’s picture

Title: Update the module to be compatible with domain 3.x » Refactor DomainPathAliasManager into a decorator with caching
mably’s picture

We are also dropping support for EOL Drupal versions.

  • mably committed 2eed2660 on 2.x
    feat: #3563256 Refactor DomainPathAliasManager into a decorator with...
mably’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

mably’s picture

Included in release 2.0.0-alpha1.

Status: Fixed » Closed (fixed)

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