Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Adding drupal/image_widget_crop
in our composer.json while using the Unofficial Drupal Packagist (https://packagist.drupal-composer.org/) repository cannot download version 1.4; it only downloads 1.3.
It seems to be because of the crop
dependency added in 1.4 ("drupal/crop": "1.0.0"). That versioning is for the official Drupal repository and does not work for the Unofficial one.
Anyone knows how I can solve this? I'd like to use 1.4 and not 1.3, without having to modify all my dependency versioning if possible.
Comments
Comment #2
yusufhmI was able to fix it by following this StackOverflow answer: How to override others dependencies in composer.json.
We can specify an alias version of a composer package, which I did for "drupal/crop" like so:
"drupal/crop": "8.1.0 as 1.0.0"
.Comment #3
yusufhmComment #4
recrit CreditAttribution: recrit commentedre-opened until the maintainer fixes the composer.json in this module.
Comment #5
yusufhm@recrit I'm not sure if there's anything to fix here; I believe the maintainer used the correct Composer repository in this case, because the unofficial one will soon be deprecated anyway.
So we should either use the official repo, or specify the crop version alias in our project composer.json.
However, if there exists a way they could make the
drupal/crop
dependency work irrespective of the repository, then that'd be awesome.Comment #6
woprrr CreditAttribution: woprrr commented