image icon indicating copy to clipboard operation
image copied to clipboard

Could not load package intervention/image

Open nWidart opened this issue 10 years ago • 14 comments

Hello,

Since a random commit, I'm getting this error while trying to get intervention/image via composer:

[RuntimeException]                                                           
  Could not load package intervention/image in http://packagist.org: [Unexpec  
  tedValueException] Could not parse version constraint 4.x.x: Invalid versio  
  n string "4.x.x" 

It started in the following build: https://travis-ci.org/AsgardCms/Media/builds/94138842 A commit that has nothing to do with intervention, in my composer.json file I still have:

"intervention/image": "^2.3",

And the odd part is that it does not show up in php7.

Does anyone have any idea what the cause could be ?

Thank you,

nWidart avatar Dec 06 '15 19:12 nWidart

Several people (https://github.com/Intervention/image/issues/467, https://github.com/Intervention/image/issues/464) mentioned this problem, but I still don't know what's the cause or if this is a Composer issue.

olivervogel avatar Dec 06 '15 19:12 olivervogel

Oh ok, thanks for answering so fast, multiple people have reported this on the asgardcms slack channel, and had no idea why it was trying 4.x.x. Especially when I couldn't re-produce the issue locally.

"Good" to know it's not an isolated issue.

I have added a composer self-update as before_install script, and the build is back to green.

Thanks again

nWidart avatar Dec 06 '15 19:12 nWidart

Hi,

I think the problem comes from the past. Every release before the comit 6783515d00135a567db3bcfdeb784e3f2da00733 includes a bad version format for illuminate/support (that's where the "4.x.x" comes from).

Even if those old release ain't used anymore, they are still in packagist. This is a problem for the people that are using packagist proxy for instance, because according to the configuration, all the releases (including the old one) could be downloaded.

I think getting rid of the old releases might be the only way to solve this issue.

rfussien avatar Dec 09 '15 15:12 rfussien

@rfussien You might be right. The question is, what may cause more problems? Removing old packagist versions before 1.4.1 or letting people update composer.

olivervogel avatar Dec 09 '15 15:12 olivervogel

I removed some tags for another project and packagist re-index just fine and on the composer side as well. But you're right, more feedback about it would be great.

rfussien avatar Dec 09 '15 15:12 rfussien

Even I had the same problem. but when I update the composer using composer self-update. after I tried the composer update command it did n't throw any error.

rtamizh avatar Dec 10 '15 13:12 rtamizh

Right, when it's about composer itself, a self-update does the job and it's easy (btw, I used to add this as a dailycron for non-production env).

But when it comes to satis/toran, the problem is there as well. First I tried to purge the "proxyfied" package and it produced a modification of the shasum (cf https://github.com/composer/composer/issues/2540), which produced a composer.lock corruption in all my projects. So I had to update all of them. Anyway, big waste of time for a small problem.

That's why I suggested a deletion for the releases older than 1.4.

rfussien avatar Dec 10 '15 14:12 rfussien

Had the same problem, ran composer self-update and the problem went away. Strange.

briedis avatar Dec 11 '15 17:12 briedis

composer self-update solved it for me too! :+1:

dsbilling avatar Dec 12 '15 22:12 dsbilling

I'm getting this issue with travis ci. is anyone else getting it there. On my local machine its not the issue https://travis-ci.org/Core-Tech-Labs/LAZ/jobs/96394293

RudyJessop avatar Dec 12 '15 22:12 RudyJessop

@RudyJessop Did you run composer self-update?

dsbilling avatar Dec 12 '15 22:12 dsbilling

@DanielRTRD no shit it worked

RudyJessop avatar Dec 18 '15 02:12 RudyJessop

The same here , the problem solved by running composer self-update

tahertechs avatar Dec 23 '15 20:12 tahertechs

Thank you. self-update worked for me too.

og6k avatar Jan 05 '16 23:01 og6k