mattalxndr
mattalxndr

Reputation: 9418

Calls to `composer install` should only ever use satis dist zip files, never source

We're using a satis repo to host zip file dependencies. Our composer.json file's repository array points to the satis repo and disables packagist. But when we run composer update, composer.lock still lists the original source under "source" (The one listed in satis.json under repositories). The satis is listed under "dist". Which is a problem because a call to composer install will download the source.

How can I have calls to composer install only download the satis dist zip file and nothing else?

Upvotes: 1

Views: 931

Answers (2)

nickspiel
nickspiel

Reputation: 5640

We were having the exact same problem you describe. We managed to get our to work by removing "skip-dev": true (we had that in there while troubleshooting) and running composer update with --prefer-dist option.

Not sure exactly how all of this is put together, brand new to satis and still learning composer. Hope this helps someone in the same boat.

Upvotes: 1

Sven
Sven

Reputation: 70863

If you do have an old composer.lock file that was created prior to setting up Satis and disabling access to Packagist, this is normal.

And simply trying to update with an existing installation loaded the wrong way will also persist. If you want to start over completely new, delete both composer.lock and the vendor folder and run composer update. To be extra sure, composer update --prefer-dist.

If this still does not do what you want, you probably have to take a look at the dependencies' versions. Are there any branches required?

And the other thing is how you configured your Satis instance. I am running one for a year or so that uses a two-step process to grab both external repositories, as well as local ones, and it works great. Maybe you can add some more detail on this.

Upvotes: 2

Related Questions