Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore installed PHARs in composer #388

Open
heiglandreas opened this issue Jan 22, 2023 · 0 comments
Open

Ignore installed PHARs in composer #388

heiglandreas opened this issue Jan 22, 2023 · 0 comments

Comments

@heiglandreas
Copy link
Contributor

It is possible to create a separate composer.json file that contains a replace section that defines composer packages that this composer.json file replaces.

This file can automatically be injected into an existing composer.json by

a) Adding a new repositories entry of type file that references .phive
b) Requiring the project so that.composer knows of it.

The second step is then to add a package to the replace section when installing it via phive.

That way it is possible to use tools via phive and still install packages for them without installing the tool a second time via composer.

This will require phive to check on every call to install whether the necessary files are in place (if not install them) and then add the package to the composer.json

I'd recommend creating a unique identifier when creating the phive.xml file and adding that to the file. That identifier can then be used to name the .phive/composer.json project. The name would then be something like phive/customproject_<unique-id>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants