Problem/Motivation

Apparently when #2899544: [META] Move Library to Paragraphs happened we missed to remove one dependency to entity_usage from the module's composer.json:

{
  "name": "drupal/paragraphs_collection",
  "description": "This project is a collection of EXPERIMENTS to provide plugins for a rich variety of paragraph types.",
  "type": "drupal-module",
  "license": "GPL-2.0+",
  "minimum-stability": "dev",
  "require": {
    "drupal/core": "~8",
    "drupal/paragraphs": "1.x-dev",
    "drupal/entity_usage": "1.x-dev"
  },
  "require-dev": {
    "drupal/search_api": "1.x-dev",
    "drupal/slick": "1.*",
    "drupal/block_field": "1.x-dev",
    "drupal/ctools": "3.x-dev",
    "drupal/entity_browser": "1.x-dev"
  }
}

Proposed resolution

Remove the unneeded dependency :)

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#5 2971233-5.patch598 bytesmarcoscano
#2 2971233-2.patch376 bytesmarcoscano

Comments

marcoscano created an issue. See original summary.

marcoscano’s picture

Assigned: marcoscano » Unassigned
Status: Active » Needs review
StatusFileSize
new376 bytes

Status: Needs review » Needs work

The last submitted patch, 2: 2971233-2.patch, failed testing. View results

berdir’s picture

As you can see, we do need entity_usage for the tests, which means you shouldn't remove it but move it to require-dev instead (require-dev dependencies of other modules are ignored by composer, so all modules need to duplicate it).

That said, committing that move now means we'll need a second patch to update to 2.x once the paragraphs issue is committed. But comitting this shoud allow us to unblock testing the patches in our project.

marcoscano’s picture

Status: Needs work » Needs review
StatusFileSize
new598 bytes

Ah yes the require-dev duplication is indeed necessary, thanks!

I wonder though if it wouldn't still be a problem to require 1.x there, so I'm trying with any version, hoping that the constraint in paragraphs itself will always win.

berdir’s picture

> so I'm trying with any version, hoping that the constraint in paragraphs itself will always win.

It can't win. If you do composer require --dev drupal/paragraphs_collection the require-dev dependencies of paragraphs are completely irrelevant. No idea what it is going to pick exactly with * as both are alpha, but I think we should specify the version explicitly. Will require another trivial follow-up patch but that's OK.

berdir’s picture

When testing locally, I also noticed that the entity_browser dependency on 8.x-1.x is a problem if something else requires 8.x-2.x. I guess that we could actually set to * because we really don't care about which version we get (for now), but also there, maybe we should just update to 8.x-2.x too. Either here or together with entity_usage.

  • Berdir committed 947b035 on 8.x-1.x authored by marcoscano
    Issue #2971233 by marcoscano, Berdir: Remove leftover dependency on...
berdir’s picture

Status: Needs review » Fixed

Added the version constraint back and committed.

Status: Fixed » Closed (fixed)

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