phive
phive copied to clipboard
Introduce global configuration
Users should be able to change Phive's default (currently hardcoded) configuration for all new projects. The most relevant setting currently is the default tools directory. It should be possible to run phive config --global set toolsDirectory foo
or something similar.
I am in need of this feature too. It would be convenient to be able to set this via environment variable. This way, it would be perfectly usable in Docker Images.
@port22 I see this issue still open, but global install is already possible:
For example to install PHPLOC in /usr/local/bin/phploc
:
sudo phive install -g phploc --trust-gpg-keys 4AA394086372C20A
If what you want is a custom directory inside your project I suggest you to use <configuration>
tag inside your phive.xml/phars.xml. For example, do the following if you want to install your phar files in bin
directory (as suggested by pds/skeleton):
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<configuration>
<targetDirectory>bin</targetDirectory>
</configuration>
<phar name="phploc" version="^7.0.1" installed="7.0.1" location="./bin/phploc" copy="false"/>
</phive>
Please note that phar's location also changed: location="./bin/phploc"
.
@port22 Important: if you are using Phive to build Docker images use --copy option!
I am guessing this issue is open because
It should be possible to run
phive config --global set toolsDirectory foo
or something similar.
Where 'something similar' probably isn't meant to be 'open file, look for key-attribute, change value, save & close file, run install command'.