Skip to content

Composer Installs wrong version by default #178

Answered by pryley
mhenkel1 asked this question in Q&A
Discussion options

You must be logged in to vote

I had this issue also, composer require spatie/pdf-to-image was installing v2.x-dev 6718a89.

When I changed the version in composer.json from ^2.1 to 2.1 and hit composer update, I got the following error message:

Problem 1
    - Root composer.json requires spatie/pdf-to-image 2.1 -> satisfiable by spatie/pdf-to-image[2.1.0].
    - spatie/pdf-to-image 2.1.0 requires ext-imagick * -> it is missing from your system. Install or enable PHP's imagick extension.

So because I didn't have the imagick extension enabled in my PHP, composer was installing the latest version of v2 that it could without the "ext-imagick" composer requirement (i.e. v2.x.dev)

I checked PHP by running:

php -m | grep ima…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by riasvdv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #172 on June 24, 2021 13:16.