Closed (fixed)
Project:
Media Directories
Version:
2.0.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Feb 2023 at 17:42 UTC
Updated:
17 Mar 2023 at 16:34 UTC
Jump to comment: Most recent
Comments
Comment #2
ytsurkNot good - Thank you for reporting this catch!
I cannot imagine how drupal's composer facade could make a correct decision in a dependency line ?!
Thus - we'll go with the upper boundry ;)
Comment #4
ytsurkI'm willing to release these asap if you give me your okey.
Comment #5
ytsurkAh - I think I got it. Drupal's composer facade inspects the info.yml's ... way simpler and clearer to go that way ...
But I'll leave this as is.
Comment #6
ytsurkComment #7
nickdickinsonwildeYeah exactly just converts the info.yml into composer version syntax. But can't do that for other dependencies since we don't specify their versions.
Confirmed that the change works - composer installs correctly on Drupal 9.x sites, raises version error on a Drupal 10.x site (via running `composer require "drupal/media_directories:2.0.x-dev@dev"`
So looks good to me
Comment #8
nickdickinsonwildeComment #9
ytsurkI just released 2.0.3
Thank you!
I created this followup to remove the dependencies from composer.json #3344367: Remove dependencies from composer.json.
Comment #10
mullzk commentedHi there
Under what version of composer did you build/test this?
On my installation, the update from 2.0.2 to 2.0.3 breaks my Drupal-Installation, as it removes drupal/embed, drupal/entity_browser and drupal/entity_embed from composer.
I use composer 2.3.2. If I
composer require drupal/media_directories=2.0.2then I get
If I
composer require drupal/media_directories=2.0.3then composer does
and I get
I suspect, that the ">=8.8.3 - 9"-syntax breaks my composer-version. As far as I understand Composer Doc, it should be "8.8.3 - 9", ">=8.8.3 <=10.0.0". Or of course with semver "^8.8.3 || ^9".
Comment #11
afi13 commentedYes, the same for me, embed, entity_browser and entity_embed are removed after update.
Comment #13
rang501 commentedThere was an invalid version constraint. It should be fixed now.
I can't comment on dependency removal, I was not able to reproduce it (I have composer v2.5.2), but maybe this fix helps with that?
Made a new release and "composer info drupal/media_directories 2.0.4 -a" doesn't complain about version constraints.
Comment #14
mullzk commentedI can confirm that the fix in #12 | #13 fixes my problem in #10. I could update to media_directories 2.0.4 and the entity- and embed-modules remained installed.
Thank you very much
Comment #15
ytsurkSorry about that - I should have tested this better.