- Issue created by @nickdickinsonwilde
- Assigned to ytsurk
- Status changed to Needs work
about 2 years ago 9:47pm 23 February 2023 - 🇨🇭Switzerland ytsurk Switzerland
Not 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 ;)
- Issue was unassigned.
- Status changed to Needs review
about 2 years ago 9:56pm 23 February 2023 - 🇨🇭Switzerland ytsurk Switzerland
I'm willing to release these asap if you give me your okey.
- 🇨🇭Switzerland ytsurk Switzerland
Ah - I think I got it. Drupal's composer facade inspects the info.yml's ...
- 🇨🇦Canada nickdickinsonwilde Victoria, BC (T'So-uke lands)
Yeah 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
- Status changed to RTBC
about 2 years ago 10:30pm 23 February 2023 - Status changed to Fixed
about 2 years ago 9:40pm 24 February 2023 - 🇨🇭Switzerland ytsurk Switzerland
I just released 2.0.3
Thank you!
I created this followup to remove the dependencies from composer.json 📌 Remove dependencies from composer.json Needs work . - 🇨🇭Switzerland mullzk
Hi 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.2
then I get$ composer show drupal/media_directories name : drupal/media_directories ... versions : * 2.0.2 ... requires drupal/core >=8.8.3 drupal/embed >=1.3 drupal/entity_browser >=2 drupal/entity_embed >=1 requires (dev) drupal/embed ^1.3 drupal/entity_browser * drupal/entity_embed * drupal/media_directories_ui *
If I
composer require drupal/media_directories=2.0.3
then composer doesLock file operations: 0 installs, 1 update, 3 removals - Removing drupal/embed (1.6.0) - Removing drupal/entity_browser (2.9.0) - Removing drupal/entity_embed (1.3.0) - Upgrading drupal/media_directories (2.0.2 => 2.0.3)
and I get
$ composer show drupal/media_directories name : drupal/media_directories .. versions : * 2.0.3 ... requires drupal/core ^8.8.3 || ^9 requires (dev) drupal/embed ^1.3 drupal/entity_browser * drupal/entity_embed * drupal/media_directories_ui *
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".
Yes, the same for me, embed, entity_browser and entity_embed are removed after update.
- 🇪🇪Estonia rang501 Viljandi
There 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.
- 🇨🇭Switzerland mullzk
I 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 - 🇨🇭Switzerland ytsurk Switzerland
Sorry about that - I should have tested this better.
Automatically closed - issue fixed for 2 weeks with no activity.