G
G
grabbee2020-07-07 04:20:32
Composer
grabbee, 2020-07-07 04:20:32

How to correctly specify a repository in composer?

I am writing both the project and the shared libraries for it at the same time. Libraries in private repo on GitHub.

At first, I simply indicated the path to the library folder in the project - everything was fine until the "publication" of the project and libraries.

Composer - it is recommended not to specify the version of the library. The version is determined by the composer itself during installation by tag. But, if I specify the PATH to the lib folder in the project, it does not see the version, respectively, and swears that it cannot determine it. The only way out is to specify the version in the description of the library.

Then, when I publish the project (deploy), it does not see the local folders anymore, it needs the GitHub repositories. And it is installed, as I understand it, on the basis of composer.lock - and the paths of local folders are registered there. So it can't install even if I change the folder pathson the repository . It will be necessary to "update" the project locally so that addresses to the repositories already get into composer.lock.

And it turns out that if the project and libs are just being written, I cannot deploy the project to the test server. Or do I need to release a version after changing the library, push it to the rap and then update the library in the project from the rap. This is some kind of hemorrhagic ...

Plus, the copozer freezes at the "Loading composer repositories with package information" stage for 1-2 minutes. Memory in bulk, that he calculates there, I xs ...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question