The media entity module has ambiguous dependencies specified in its info.yml file, as such, both project_dependency and the composer facade are unable to determine if a requirement of 'entity' means the short lived drupal core module, or the entity module that lives in the entity project.

Comments

Mixologic created an issue. See original summary.

Mixologic’s picture

Attached is a patch that follows the project:modulename convention for dependency declarations.

Mixologic’s picture

Status: Active » Needs review
Mixologic’s picture

Also note that changes to dependencies in patches are *not* currently handled by the testbots, as they calculate their dependencies from the previous release, so this patch will most likely pass, but not tell us anything.

Mixologic’s picture

Also note that changes to dependencies in patches are *not* currently handled by the testbots, as they calculate their dependencies from the previous release, so this patch will most likely pass, but not tell us anything.

  • slashrsm committed fed0ac6 on 8.x-1.x authored by Mixologic
    Issue #2744455 by Mixologic: media entity need to namespace its...
slashrsm’s picture

Status: Needs review » Fixed
Issue tags: +D8Media

Committed. Thanks!

dunebl’s picture

I am not sure if it is linked to this bug, but from a fresh 8.2 install using https://packages.drupal.org/8 as a repository, if I try composer require drupal/media_entity I will get the following errors:

  Problem 1
    - Installation request for drupal/media_entity ^1.1 -> satisfiable by drupal/media_entity[1.1.0].
    - drupal/media_entity 1.1.0 requires drupal/core ^1.0.0-alpha3 -> no matching package found.

running composer show -a drupal/media_entity will show me

requires
drupal/core ^1.0.0-alpha3

Is this means that we can't use media_entity on 8.2?

slashrsm’s picture

This patch is still in -dev (not part of 8.x-1.1). I suspect this should start working when we roll a new release with this patch included.

dunebl’s picture

You are right! Many thanks.
using composer require drupal/media_entity 1.0.x-dev allow me to add this module on 8.2 with composer.

Status: Fixed » Closed (fixed)

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

marcoscano’s picture

I may be doing something wrong, but with this composer workflow, I am unable to install media_entity, after downloading the packages with:

composer require drupal/entity:8.x-1.x-dev
composer require drupal/media_entity:8.x-1.x-dev

There is always an unmet dependency with entity. Even if I download something different from dev (for example drupal/entity:8.x-1.0-alpha3). Not sure if the problem is with "media_entity" or with the "entity" package, though...