Problem/Motivation

When a module or package relies on a component or module with Composer (see #2337283: Add a composer.json file to every component), the dependency is not resolved by drupal/core even though it ought to be.

Proposed resolution

Implement a replace section to the current core/composer.json. This will be similar to Symfony's and Laravel's.

Remaining tasks

  1. Write Patch
  2. Update if #2337283: Add a composer.json file to every component or #2401519: [policy] Decide on Composer Package Names make any changes to the package names

User interface changes

None

API changes

None

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

davidwbarratt’s picture

Issue summary: View changes
davidwbarratt’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
443 bytes
Crell’s picture

I think we're leaning toward using drupal-core as the vendor for core components, no?

I am +1 on this patch, but we should probably wait until more of the components have composer.json files and we have a pattern nicely established.

davidwbarratt’s picture

FileSize
3.61 KB

Since we have a standard now in #2401519: [policy] Decide on Composer Package Names, I updated the existing components and added anything you could possibly depend on. Now if your module depends on drupal/views it will be resolved by drupal/core.

webflo’s picture

Status: Needs review » Reviewed & tested by the community

The composer package naming policy was recently approved. I reviewed the patch in details every component, module, theme and install profile is listed, nothing is missing. This patch makes see core subtree split 1000% more usable, because we can resolve core modules and components directly without any hacks.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 4: composer_replace-2456009-4.patch, failed testing.

hussainweb’s picture

It appears to be a random fail. Retesting.

Status: Needs work » Needs review
webflo’s picture

Status: Needs review » Reviewed & tested by the community

Back to RTBC

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

It's going to be a pain to keep this up-to-date but this makes sense and other projects are doing it so +1. This patch is not subject to beta evaluation as it is not changing PHP code just composer configuration and we're still in the process of getting this right.

Committed aff100b and pushed to 8.0.x. Thanks!

  • alexpott committed aff100b on 8.0.x
    Issue #2456009 by davidwbarratt: Add a "replace" section to core/...

Status: Fixed » Closed (fixed)

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