Question

I'm implementing a Satis private repository in my company, and got a question: the docs suggests us to include a "repositories" entry in the composer.json file so we can use that repositories' projects.

However, is it possible to configure the composer executable to always use that repository as well?

Thus we would need to configure the developers' machines instead of each project separately - and would enable us to use create-project for example, since that command creates the folder and only after that you care about your new project's composer.json.

Was it helpful?

Solution

A project should explicitly declare where the source code of libraries is coming from. Imaging the confusion if some development machines somehow fail to configure your Satis instance, or if there will be a second instance of Satis some day. So the project should know it's Satis instance to be used, not the developers machine.

Mentioning create-project: How many new projects do you start per day from a template repository so that it visibly affects your ability to create more per day if the central Satis repository is not configured on the developer machine? I'd say that the number of new projects per day is less than 0,01 for the average developer - so this probably does not really affect you.

My suggestion: Make your local Satis instance have all the dependencies available locally (including the dump into a ZIP file) and disable Packagist. Add this info to the template that generates the Satis index.html page to allow for copy&paste. Updates will be so much faster that way!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top