Last Updated: February 25, 2016
·
1.876K
· bendihossan

'Sensio' on GitHub is now 'SensioLabs' - packagist doesn't know

Sensio have renamed their GitHub organisation to 'SensioLabs'. This means all the URIs and git locations have changed.

Notice the difference in these two GET responses?

root@me:~# wget https://api.github.com/repos/sensio/SensioDistributionBundle/zipball/v2.1.8
--2013-06-10 11:17:37--  https://api.github.com/repos/sensio/SensioDistributionBundle/zipball/v2.1.8
Resolving api.github.com... 204.232.175.74
Connecting to api.github.com|204.232.175.74|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2013-06-10 11:17:37 ERROR 404: Not Found.

root@me:~# wget https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/v2.1.8
--2013-06-10 11:17:50--  https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/v2.1.8
Resolving api.github.com... 204.232.175.74
Connecting to api.github.com|204.232.175.74|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/sensiolabs/SensioDistributionBundle/legacy.zip/v2.1.8 [following]
--2013-06-10 11:17:50--  https://codeload.github.com/sensiolabs/SensioDistributionBundle/legacy.zip/v2.1.8
Resolving codeload.github.com... 204.232.175.86
Connecting to codeload.github.com|204.232.175.86|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: `v2.1.8'

The fix is to (manually) edit your application's composer.lock file and fix the broken URIs. You can test this by removing the package you are testing from your vendors directory and from your composer cache:

rm -rf vendor/sensiolabs/SensioDistributionBundle/
rm -rf ~/.composer/cache/repo/https---packagist.org/provider-sensio*

Now when you run composer install, composer will fetch the package from GitHub using your composer.lock configuration file and not copy the one you had cached.