The Phar Installation and Verification Environment (PHIVE)

Overview

The Phar Installation and Verification Environment (PHIVE)

Installation and verification of phar distributed PHP applications has never been this easy!

Code quality checks Smoke test

Adding all the required tools like PHPUnit, PHPMD and phpDox in their matching versions to a project used to be a lot of repetitive work: Started by finding the download URL, figuring out what the actually correct and matching version is followed by verifying the sha1 and gpg signatures and making the archive executable. And of course you'd have to repeat this very thing for every tool needed.

Alternatively, you could have used composer. And cluttered your project's dependencies with the ones of your tools. And fight their potential dependency conflicts.

No more! Now you can rely on PHIVE to install and manage your project's tooling needs without all the hassle and without cluttered dependencies!

Getting PHIVE

Installation of PHIVE is easy and about the last time you have to do anything phar related manually. Grab your copy of PHIVE from the releases section at our GitHub page or follow these simple steps:

wget -O phive.phar "https://phar.io/releases/phive.phar"
wget -O phive.phar.asc "https://phar.io/releases/phive.phar.asc"
gpg --keyserver hkps://keys.openpgp.org --recv-keys 0x6AF725270AB81E04D79442549D8A98B29B2D5D79
gpg --verify phive.phar.asc phive.phar
rm phive.phar.asc
chmod +x phive.phar
mv phive.phar /usr/local/bin/phive

Sample Usages

Once installed, PHIVE is ready for action. Some example invocations are shown below:

phive install phpunit
phive install --copy phpdox
phive install phpdox bin/phpdox
phive install https://phar.phpunit.de/phpunit-4.8.6.phar
phive install --temporary phpunit@~5.0

phive update
phive update --prefer-offline
phive update phpunit

How it works

PHIVE makes installation easy by downloading the phar archive from the given location, including the verification of the certificate supplied by the server. Once downloaded, the archive's SHA1/SHA256/SHA512 hash is verified and so its OpenPGP/GnuPG or OpenSSL signature.

Instead of redownloading the same phar multiple times, the archive is kept at a shared location (by default in ~/.phive) and only a symbolic link is created for the project. You can of course also explicitly request a copy of the phar to be made in favor of symbolic links (use --copy).

Contributing

PHIVE and phar.io are open source projects released under the BSD license. You are welcome to join the development team!

Comments
  • [ERROR]   No RateLimit present in response

    [ERROR] No RateLimit present in response

    I get the following error when trying to build my docker file which worked fine a couple hours ago.

    Step 51/64 : RUN phive --no-progress install --global --trust-gpg-keys 31C7E470E2138192 squizlabs/php_codesniffer
     ---> Running in d4b64f83fa46
    Phive 0.13.2 - Copyright (C) 2015-2020 by Arne Blankerts, Sebastian Heuer and Contributors
    
    [ERROR]   No RateLimit present in response
    

    In a previous run it failed one package earlier:

    Step 50/64 : RUN phive --no-progress install --global --trust-gpg-keys E82B2FB314E9906E FriendsOfPHP/PHP-CS-Fixer
     ---> Running in daaa9daa3027
    Phive 0.13.2 - Copyright (C) 2015-2020 by Arne Blankerts, Sebastian Heuer and Contributors
    [ERROR]   No RateLimit present in response
    

    The 6 packages I downloaded before this worked fine. What could be going on? Am I downloading too fast?

    opened by thoys 48
  • Parsing key data failed with error code 2: unlink

    Parsing key data failed with error code 2: unlink

    I ran into a problem installing with phive and key verification:

    ...
    Successfully downloaded key.
    [WARNING]  Parsing key data failed with error code 2: unlink(/home/travis/.phive/_tmp_wrk/pubring.kbx): No such file or directory 
    

    The issue is that after successfully downloading the key from the key server, it's not found any longer.

    Then phive tries the next key server (despite network was OK previously), with success again, but then can't find the key on the system any longer.

    Then a thrid trip to another key server, again success network operation with the keyserver and again failure on the local system.

    Here the program output:

    $ ./bin/phive install --trust-gpg-keys D2CCAC42F6295E7D,8E730BA25823D8B5
    Phive 0.13.0 - Copyright (C) 2015-2019 by Arne Blankerts, Sebastian Heuer and Contributors
    Downloading https://api.github.com/repos/maglnet/ComposerRequireChecker/releases
    Downloading https://github.com/maglnet/ComposerRequireChecker/releases/download/2.0.0/composer-require-checker.phar
    Downloading https://github.com/maglnet/ComposerRequireChecker/releases/download/2.0.0/composer-require-checker.phar.asc
    Downloading key D2CCAC42F6295E7D
    Trying to connect to keys.openpgp.org (37.218.245.50)
    Downloading https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0xD2CCAC42F6295E7D
    Successfully downloaded key.
    [WARNING]  Parsing key data failed with error code 2: unlink(/home/travis/.phive/_tmp_wrk/pubring.kbx): No such file or directory 
    Trying to connect to keys.fedoraproject.org (140.211.169.207)
    Downloading https://keys.fedoraproject.org/pks/lookup?op=get&options=mr&search=0xD2CCAC42F6295E7D
    Successfully downloaded key.
    [WARNING]  Parsing key data failed with error code 2: unlink(/home/travis/.phive/_tmp_wrk/pubring.kbx): No such file or directory 
    Trying to connect to keyserver.ubuntu.com (162.213.33.9)
    Successfully downloaded key.
    [WARNING]  Parsing key data failed with error code 2: unlink(/home/travis/.phive/_tmp_wrk/pubring.kbx): No such file or directory 
    Trying to connect to hkps.pool.sks-keyservers.net (37.191.231.105)
    Downloading https://hkps.pool.sks-keyservers.net/pks/lookup?op=get&options=mr&search=0xD2CCAC42F6295E7D
    Successfully downloaded key.
    [WARNING]  Parsing key data failed with error code 2: unlink(/home/travis/.phive/_tmp_wrk/pubring.kbx): No such file or directory 
    [ERROR]    PublicKey D2CCAC42F6295E7D not found on key servers 
    

    The phive.xml is:

    <?xml version="1.0" encoding="UTF-8"?>
    <phive xmlns="https://phar.io/phive">
      <phar name="composer-require-checker" version="^2.0" installed="2.0.0" location="./tools/composer-require-checker" copy="false"/>
      <phar name="phpstan" version="^0.11.15" installed="0.11.15" location="./tools/phpstan" copy="false"/>
    </phive>
    

    This is a run from Travis, find the job here: https://travis-ci.org/FriendsOfPHP/PHP-CS-Fixer/jobs/595828727 (scroll to end).

    bug 
    opened by ktomk 36
  • Problem:

    Problem: "Rename internal storage file from `phars.xml` to `registry.xml`." after install

    I found one or two issues with my use case. I wanted to create the docker image, but I have 2 problems.

    Problem 1 is that tar want to tar a socket but that is problematic. A fix might be to not tar files of type sockets.

    ERRO[0004] Can't add file /var/lib/containers/storage/overlay/8b4ec764304801bc3a3d69dabc237f3fe7db7f658d88d7d56d7d111a3513a369/diff/opt/app-root/src/.gnupg/S.gpg-agent.extra to tar: archive/tar: sockets not supported

    Problem 2 is that i get the Error Rename internal storage file from phars.xml to registry.xml. When not ussing my wokraound, but this might be the because of problem 1. Though I have seen Problem 2 also under a non docker env wiht centos 8.

    Here is my test case and below the output.

    # Test image for php devops
    FROM ubi8/php-74
    
    LABEL maintainer="[email protected]" \
          org.label-schema.schema-version="1.0" \
          org.label-schema.name="Builder and management image for cloud native systems with S2I, Docker in Docker, Operators, HELM, Kubernetes Deployments ..." \
          org.label-schema.vendor="xrow GmbH" \
          org.label-schema.license="GPLv2"
    
    ENV LANG="en_US.UTF-8"
    ENV TRUSTEES="9D8A98B29B2D5D79,4AA394086372C20A,CF1A108D0E7AE720,E82B2FB314E9906E"
    
    USER root
    
    RUN yum install -y gpg \
     && yum clean all \
     && rm -Rf /var/cache/yum
    
    RUN wget -O phive.phar https://phar.io/releases/phive.phar \
        && wget -O phive.phar.asc https://phar.io/releases/phive.phar.asc \
        && gpg --keyserver pool.sks-keyservers.net --recv-keys 0x9D8A98B29B2D5D79 \
        && gpg --verify phive.phar.asc phive.phar \
        && chmod +x phive.phar \
        && mv phive.phar /usr/bin/phive
    
    #WORKAROUND 
    RUN rm -Rf /opt/app-root/src/.phive
    
    RUN phive install --trust-gpg-keys $TRUSTEES --copy phpcpd -t /usr/bin
    
    #WORKAROUND 
    RUN rm -Rf /opt/app-root/src/.phive
    
    RUN phive install --trust-gpg-keys $TRUSTEES --copy phpstan -t /usr/bin
    
    #WORKAROUND 
    RUN rm -Rf /opt/app-root/src/.phive
    
    RUN phive install --trust-gpg-keys $TRUSTEES --copy php-cs-fixer -t /usr/bin
    
    #WORKAROUND 
    RUN rm -Rf /opt/app-root/src/.phive
    
    [root@localhost symfony]# podman build -f Dockerfile .
    STEP 1: FROM ubi8/php-74
    STEP 2: LABEL maintainer="[email protected]"       org.label-schema.schema-version="1.0"       org.label-schema.name="Builder and management image for cloud native systems with S2I, Docker in Docker, Operators, HELM, Kubernetes Deployments ..."       org.label-schema.vendor="xrow GmbH"       org.label-schema.license="GPLv2"
    --> Using cache 75d9a0ff2663c097b2ce751ff72b7da16e6f5cdb5c2944c1e0c01489670074b5
    --> 75d9a0ff266
    STEP 3: ENV LANG="en_US.UTF-8"
    --> Using cache 3295ee8af19367627f8a2ecba06b8efe400cfbd67c3bfc09b40f6ba986f119b1
    --> 3295ee8af19
    STEP 4: ENV TRUSTEES="9D8A98B29B2D5D79,4AA394086372C20A,CF1A108D0E7AE720,E82B2FB314E9906E"
    --> 97c6b43e970
    STEP 5: USER root
    --> 850b51e1a08
    STEP 6: RUN yum install -y gpg  && yum clean all  && rm -Rf /var/cache/yum
    Updating Subscription Management repositories.
    Unable to read consumer identity
    Subscription Manager is operating in container mode.
    
    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
    
    Red Hat Universal Base Image 8 (RPMs) - BaseOS                1.7 MB/s | 770 kB     00:00    
    Red Hat Universal Base Image 8 (RPMs) - AppStream              12 MB/s | 4.7 MB     00:00    
    Red Hat Universal Base Image 8 (RPMs) - CodeReady Builder      49 kB/s |  13 kB     00:00    
    Package gnupg2-2.2.20-2.el8.x86_64 is already installed.
    Dependencies resolved.
    Nothing to do.
    Complete!
    Updating Subscription Management repositories.
    Unable to read consumer identity
    Subscription Manager is operating in container mode.
    
    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
    
    25 files removed
    --> 673c873a690
    STEP 7: RUN wget -O phive.phar https://phar.io/releases/phive.phar     && wget -O phive.phar.asc https://phar.io/releases/phive.phar.asc     && gpg --keyserver pool.sks-keyservers.net --recv-keys 0x9D8A98B29B2D5D79     && gpg --verify phive.phar.asc phive.phar     && chmod +x phive.phar     && mv phive.phar /usr/bin/phive
    --2020-11-06 18:13:58--  https://phar.io/releases/phive.phar
    Resolving phar.io (phar.io)... 188.94.27.6
    Connecting to phar.io (phar.io)|188.94.27.6|:443... connected.
    HTTP request sent, awaiting response... 302 Found
    Location: https://github.com/phar-io/phive/releases/download/0.14.4/phive-0.14.4.phar [following]
    --2020-11-06 18:13:58--  https://github.com/phar-io/phive/releases/download/0.14.4/phive-0.14.4.phar
    Resolving github.com (github.com)... 140.82.121.3
    Connecting to github.com (github.com)|140.82.121.3|:443... connected.
    HTTP request sent, awaiting response... 302 Found
    Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/31674534/b29f1d00-ac98-11ea-99e6-fac11875271f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201106%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201106T181359Z&X-Amz-Expires=300&X-Amz-Signature=19df5047421b33acab8ef10eacba6e3e7a7275db02300787b3fc6f37133e8415&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=31674534&response-content-disposition=attachment%3B%20filename%3Dphive-0.14.4.phar&response-content-type=application%2Foctet-stream [following]
    --2020-11-06 18:13:59--  https://github-production-release-asset-2e65be.s3.amazonaws.com/31674534/b29f1d00-ac98-11ea-99e6-fac11875271f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201106%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201106T181359Z&X-Amz-Expires=300&X-Amz-Signature=19df5047421b33acab8ef10eacba6e3e7a7275db02300787b3fc6f37133e8415&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=31674534&response-content-disposition=attachment%3B%20filename%3Dphive-0.14.4.phar&response-content-type=application%2Foctet-stream
    Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.178.139
    Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.178.139|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 192325 (188K) [application/octet-stream]
    Saving to: ‘phive.phar’
    
    phive.phar              100%[=============================>] 187.82K   609KB/s    in 0.3s    
    
    2020-11-06 18:14:00 (609 KB/s) - ‘phive.phar’ saved [192325/192325]
    
    --2020-11-06 18:14:00--  https://phar.io/releases/phive.phar.asc
    Resolving phar.io (phar.io)... 188.94.27.6
    Connecting to phar.io (phar.io)|188.94.27.6|:443... connected.
    HTTP request sent, awaiting response... 302 Found
    Location: https://github.com/phar-io/phive/releases/download/0.14.4/phive-0.14.4.phar.asc [following]
    --2020-11-06 18:14:01--  https://github.com/phar-io/phive/releases/download/0.14.4/phive-0.14.4.phar.asc
    Resolving github.com (github.com)... 140.82.121.3
    Connecting to github.com (github.com)|140.82.121.3|:443... connected.
    HTTP request sent, awaiting response... 302 Found
    Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/31674534/b3d04a00-ac98-11ea-93b5-2e900b9e8e4c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201106%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201106T181401Z&X-Amz-Expires=300&X-Amz-Signature=62c93ebb52bacc42950e57fa138a675d472d72000d408a75e20aae1947283794&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=31674534&response-content-disposition=attachment%3B%20filename%3Dphive-0.14.4.phar.asc&response-content-type=application%2Foctet-stream [following]
    --2020-11-06 18:14:01--  https://github-production-release-asset-2e65be.s3.amazonaws.com/31674534/b3d04a00-ac98-11ea-93b5-2e900b9e8e4c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201106%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201106T181401Z&X-Amz-Expires=300&X-Amz-Signature=62c93ebb52bacc42950e57fa138a675d472d72000d408a75e20aae1947283794&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=31674534&response-content-disposition=attachment%3B%20filename%3Dphive-0.14.4.phar.asc&response-content-type=application%2Foctet-stream
    Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.178.139
    Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.178.139|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 854 [application/octet-stream]
    Saving to: ‘phive.phar.asc’
    
    phive.phar.asc          100%[=============================>]     854  --.-KB/s    in 0s      
    
    2020-11-06 18:14:01 (3.49 MB/s) - ‘phive.phar.asc’ saved [854/854]
    
    gpg: directory '/opt/app-root/src/.gnupg' created
    gpg: keybox '/opt/app-root/src/.gnupg/pubring.kbx' created
    gpg: keyserver receive failed: Network is unreachable
    Error: error building at STEP "RUN wget -O phive.phar https://phar.io/releases/phive.phar     && wget -O phive.phar.asc https://phar.io/releases/phive.phar.asc     && gpg --keyserver pool.sks-keyservers.net --recv-keys 0x9D8A98B29B2D5D79     && gpg --verify phive.phar.asc phive.phar     && chmod +x phive.phar     && mv phive.phar /usr/bin/phive": error while running runtime: exit status 2
    [root@localhost symfony]# podman build -f Dockerfile2 .
    STEP 1: FROM ubi8/php-74
    STEP 2: LABEL maintainer="[email protected]"       org.label-schema.schema-version="1.0"       org.label-schema.name="Builder and management image for cloud native systems with S2I, Docker in Docker, Operators, HELM, Kubernetes Deployments ..."       org.label-schema.vendor="xrow GmbH"       org.label-schema.license="GPLv2"
    --> Using cache 75d9a0ff2663c097b2ce751ff72b7da16e6f5cdb5c2944c1e0c01489670074b5
    --> 75d9a0ff266
    STEP 3: ENV LANG="en_US.UTF-8"
    --> Using cache 3295ee8af19367627f8a2ecba06b8efe400cfbd67c3bfc09b40f6ba986f119b1
    --> 3295ee8af19
    STEP 4: ENV TRUSTEES="9D8A98B29B2D5D79,4AA394086372C20A,CF1A108D0E7AE720,E82B2FB314E9906E"
    --> Using cache 97c6b43e97044a23c23b65fe5ebdab70a403eb5ce59a68c398b2e9bf688718f4
    --> 97c6b43e970
    STEP 5: USER root
    --> Using cache 850b51e1a08766ed60ee574c69d96d6b979bdf14f8e0572f0a251bd60b0173f8
    --> 850b51e1a08
    STEP 6: RUN yum install -y gpg  && yum clean all  && rm -Rf /var/cache/yum
    --> Using cache 673c873a6903c7a238b96d98ffb88d502133f66cdfb991770e8dcec9533b0c7d
    --> 673c873a690
    STEP 7: RUN wget -O phive.phar https://phar.io/releases/phive.phar     && wget -O phive.phar.asc https://phar.io/releases/phive.phar.asc     && gpg --keyserver pool.sks-keyservers.net --recv-keys 0x9D8A98B29B2D5D79     && gpg --verify phive.phar.asc phive.phar     && chmod +x phive.phar     && mv phive.phar /usr/bin/phive
    --2020-11-06 18:14:25--  https://phar.io/releases/phive.phar
    Resolving phar.io (phar.io)... 188.94.27.6
    Connecting to phar.io (phar.io)|188.94.27.6|:443... connected.
    HTTP request sent, awaiting response... 302 Found
    Location: https://github.com/phar-io/phive/releases/download/0.14.4/phive-0.14.4.phar [following]
    --2020-11-06 18:14:25--  https://github.com/phar-io/phive/releases/download/0.14.4/phive-0.14.4.phar
    Resolving github.com (github.com)... 140.82.121.3
    Connecting to github.com (github.com)|140.82.121.3|:443... connected.
    HTTP request sent, awaiting response... 302 Found
    Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/31674534/b29f1d00-ac98-11ea-99e6-fac11875271f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201106%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201106T181359Z&X-Amz-Expires=300&X-Amz-Signature=19df5047421b33acab8ef10eacba6e3e7a7275db02300787b3fc6f37133e8415&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=31674534&response-content-disposition=attachment%3B%20filename%3Dphive-0.14.4.phar&response-content-type=application%2Foctet-stream [following]
    --2020-11-06 18:14:25--  https://github-production-release-asset-2e65be.s3.amazonaws.com/31674534/b29f1d00-ac98-11ea-99e6-fac11875271f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201106%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201106T181359Z&X-Amz-Expires=300&X-Amz-Signature=19df5047421b33acab8ef10eacba6e3e7a7275db02300787b3fc6f37133e8415&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=31674534&response-content-disposition=attachment%3B%20filename%3Dphive-0.14.4.phar&response-content-type=application%2Foctet-stream
    Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.217.97.4
    Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.217.97.4|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 192325 (188K) [application/octet-stream]
    Saving to: ‘phive.phar’
    
    phive.phar              100%[=============================>] 187.82K   628KB/s    in 0.3s    
    
    2020-11-06 18:14:26 (628 KB/s) - ‘phive.phar’ saved [192325/192325]
    
    --2020-11-06 18:14:26--  https://phar.io/releases/phive.phar.asc
    Resolving phar.io (phar.io)... 188.94.27.6
    Connecting to phar.io (phar.io)|188.94.27.6|:443... connected.
    HTTP request sent, awaiting response... 302 Found
    Location: https://github.com/phar-io/phive/releases/download/0.14.4/phive-0.14.4.phar.asc [following]
    --2020-11-06 18:14:27--  https://github.com/phar-io/phive/releases/download/0.14.4/phive-0.14.4.phar.asc
    Resolving github.com (github.com)... 140.82.121.3
    Connecting to github.com (github.com)|140.82.121.3|:443... connected.
    HTTP request sent, awaiting response... 302 Found
    Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/31674534/b3d04a00-ac98-11ea-93b5-2e900b9e8e4c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201106%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201106T181401Z&X-Amz-Expires=300&X-Amz-Signature=62c93ebb52bacc42950e57fa138a675d472d72000d408a75e20aae1947283794&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=31674534&response-content-disposition=attachment%3B%20filename%3Dphive-0.14.4.phar.asc&response-content-type=application%2Foctet-stream [following]
    --2020-11-06 18:14:27--  https://github-production-release-asset-2e65be.s3.amazonaws.com/31674534/b3d04a00-ac98-11ea-93b5-2e900b9e8e4c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201106%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201106T181401Z&X-Amz-Expires=300&X-Amz-Signature=62c93ebb52bacc42950e57fa138a675d472d72000d408a75e20aae1947283794&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=31674534&response-content-disposition=attachment%3B%20filename%3Dphive-0.14.4.phar.asc&response-content-type=application%2Foctet-stream
    Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.217.97.4
    Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.217.97.4|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 854 [application/octet-stream]
    Saving to: ‘phive.phar.asc’
    
    phive.phar.asc          100%[=============================>]     854  --.-KB/s    in 0s      
    
    2020-11-06 18:14:28 (20.2 MB/s) - ‘phive.phar.asc’ saved [854/854]
    
    gpg: directory '/opt/app-root/src/.gnupg' created
    gpg: keybox '/opt/app-root/src/.gnupg/pubring.kbx' created
    gpg: /opt/app-root/src/.gnupg/trustdb.gpg: trustdb created
    gpg: key 9D8A98B29B2D5D79: public key "phar.io <[email protected]>" imported
    gpg: Total number processed: 1
    gpg:               imported: 1
    gpg: Signature made Fri 12 Jun 2020 08:36:35 AM UTC
    gpg:                using RSA key 6AF725270AB81E04D79442549D8A98B29B2D5D79
    gpg:                issuer "[email protected]"
    gpg: Good signature from "phar.io <[email protected]>" [unknown]
    gpg:                 aka "[jpeg image of size 4811]" [unknown]
    gpg: WARNING: This key is not certified with a trusted signature!
    gpg:          There is no indication that the signature belongs to the owner.
    Primary key fingerprint: 6AF7 2527 0AB8 1E04 D794  4254 9D8A 98B2 9B2D 5D79
    ERRO[0004] Can't add file /var/lib/containers/storage/overlay/8b4ec764304801bc3a3d69dabc237f3fe7db7f658d88d7d56d7d111a3513a369/diff/opt/app-root/src/.gnupg/S.dirmngr to tar: archive/tar: sockets not supported 
    ERRO[0004] Can't add file /var/lib/containers/storage/overlay/8b4ec764304801bc3a3d69dabc237f3fe7db7f658d88d7d56d7d111a3513a369/diff/opt/app-root/src/.gnupg/S.gpg-agent to tar: archive/tar: sockets not supported 
    ERRO[0004] Can't add file /var/lib/containers/storage/overlay/8b4ec764304801bc3a3d69dabc237f3fe7db7f658d88d7d56d7d111a3513a369/diff/opt/app-root/src/.gnupg/S.gpg-agent.browser to tar: archive/tar: sockets not supported 
    ERRO[0004] Can't add file /var/lib/containers/storage/overlay/8b4ec764304801bc3a3d69dabc237f3fe7db7f658d88d7d56d7d111a3513a369/diff/opt/app-root/src/.gnupg/S.gpg-agent.extra to tar: archive/tar: sockets not supported 
    ERRO[0004] Can't add file /var/lib/containers/storage/overlay/8b4ec764304801bc3a3d69dabc237f3fe7db7f658d88d7d56d7d111a3513a369/diff/opt/app-root/src/.gnupg/S.gpg-agent.ssh to tar: archive/tar: sockets not supported 
    --> 6d3e4bf03a1
    STEP 8: RUN rm -Rf /opt/app-root/src/.phive
    --> 1f68249601b
    STEP 9: RUN phive install --trust-gpg-keys $TRUSTEES --copy phpcpd -t /usr/bin
    Phive 0.14.4 - Copyright (C) 2015-2020 by Arne Blankerts, Sebastian Heuer and Contributors
    Fetching repository list
    Downloading https://phar.io/data/repositories.xml
    Downloading https://phar.phpunit.de/phive.xml
    Downloading https://phar.phpunit.de/phpcpd-6.0.2.phar
    Downloading https://phar.phpunit.de/phpcpd-6.0.2.phar.asc
    Downloading key 4AA394086372C20A
    Trying to connect to keys.openpgp.org (37.218.245.50)
    Downloading https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0x4AA394086372C20A
    Successfully downloaded key.
    
            Fingerprint: D840 6D0D 8294 7747 2937 7831 4AA3 9408 6372 C20A
    
            Sebastian Bergmann <[email protected]>
            Sebastian Bergmann <[email protected]>
            Sebastian Bergmann <[email protected]>
            Sebastian Bergmann <[email protected]>
            Sebastian Bergmann <[email protected]>
    
            Created: 2014-07-19
    
    Copying phpcpd-6.0.2.phar to /usr/bin/phpcpd
    
    ERRO[0007] Can't add file /var/lib/containers/storage/overlay/3bd9b4b361e9a6ce9bce51b2f08ac88c8a53e6d43fd37e39ef6c7c65a22a999d/diff/opt/app-root/src/.phive/_tmp_wrk/S.gpg-agent to tar: archive/tar: sockets not supported 
    ERRO[0007] Can't add file /var/lib/containers/storage/overlay/3bd9b4b361e9a6ce9bce51b2f08ac88c8a53e6d43fd37e39ef6c7c65a22a999d/diff/opt/app-root/src/.phive/_tmp_wrk/S.gpg-agent.browser to tar: archive/tar: sockets not supported 
    ERRO[0007] Can't add file /var/lib/containers/storage/overlay/3bd9b4b361e9a6ce9bce51b2f08ac88c8a53e6d43fd37e39ef6c7c65a22a999d/diff/opt/app-root/src/.phive/_tmp_wrk/S.gpg-agent.extra to tar: archive/tar: sockets not supported 
    ERRO[0007] Can't add file /var/lib/containers/storage/overlay/3bd9b4b361e9a6ce9bce51b2f08ac88c8a53e6d43fd37e39ef6c7c65a22a999d/diff/opt/app-root/src/.phive/_tmp_wrk/S.gpg-agent.ssh to tar: archive/tar: sockets not supported 
    ERRO[0007] Can't add file /var/lib/containers/storage/overlay/3bd9b4b361e9a6ce9bce51b2f08ac88c8a53e6d43fd37e39ef6c7c65a22a999d/diff/opt/app-root/src/.phive/gpg/S.gpg-agent to tar: archive/tar: sockets not supported 
    ERRO[0007] Can't add file /var/lib/containers/storage/overlay/3bd9b4b361e9a6ce9bce51b2f08ac88c8a53e6d43fd37e39ef6c7c65a22a999d/diff/opt/app-root/src/.phive/gpg/S.gpg-agent.browser to tar: archive/tar: sockets not supported 
    ERRO[0007] Can't add file /var/lib/containers/storage/overlay/3bd9b4b361e9a6ce9bce51b2f08ac88c8a53e6d43fd37e39ef6c7c65a22a999d/diff/opt/app-root/src/.phive/gpg/S.gpg-agent.extra to tar: archive/tar: sockets not supported 
    ERRO[0007] Can't add file /var/lib/containers/storage/overlay/3bd9b4b361e9a6ce9bce51b2f08ac88c8a53e6d43fd37e39ef6c7c65a22a999d/diff/opt/app-root/src/.phive/gpg/S.gpg-agent.ssh to tar: archive/tar: sockets not supported 
    --> e0bc526f37a
    STEP 10: RUN rm -Rf /opt/app-root/src/.phive
    --> 3d3e77aac78
    STEP 11: RUN phive install --trust-gpg-keys $TRUSTEES --copy phpstan -t /usr/bin
    Phive 0.14.4 - Copyright (C) 2015-2020 by Arne Blankerts, Sebastian Heuer and Contributors
    Fetching repository list
    Downloading https://phar.io/data/repositories.xml
    Downloading https://github.com/phpstan/phpstan/releases/download/0.12.54/phpstan.phar
    Downloading https://github.com/phpstan/phpstan/releases/download/0.12.54/phpstan.phar.asc
    Downloading key CF1A108D0E7AE720
    Trying to connect to keys.openpgp.org (37.218.245.50)
    Downloading https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0xCF1A108D0E7AE720
    Successfully downloaded key.
    
            Fingerprint: D326 80D5 957D C711 6BE2 9C14 CF1A 108D 0E7A E720
    
            Ondrej Mirtes <[email protected]>
    
            Created: 2019-12-09
    
    Copying phpstan-0.12.54.phar to /usr/bin/phpstan
    
    ERRO[0014] Can't add file /var/lib/containers/storage/overlay/afab5114cf8ceeefc1c99488b94e3c050b42a2b06986d76637ad7117e6dafd30/diff/opt/app-root/src/.phive/_tmp_wrk/S.gpg-agent to tar: archive/tar: sockets not supported 
    ERRO[0014] Can't add file /var/lib/containers/storage/overlay/afab5114cf8ceeefc1c99488b94e3c050b42a2b06986d76637ad7117e6dafd30/diff/opt/app-root/src/.phive/_tmp_wrk/S.gpg-agent.browser to tar: archive/tar: sockets not supported 
    ERRO[0014] Can't add file /var/lib/containers/storage/overlay/afab5114cf8ceeefc1c99488b94e3c050b42a2b06986d76637ad7117e6dafd30/diff/opt/app-root/src/.phive/_tmp_wrk/S.gpg-agent.extra to tar: archive/tar: sockets not supported 
    ERRO[0014] Can't add file /var/lib/containers/storage/overlay/afab5114cf8ceeefc1c99488b94e3c050b42a2b06986d76637ad7117e6dafd30/diff/opt/app-root/src/.phive/_tmp_wrk/S.gpg-agent.ssh to tar: archive/tar: sockets not supported 
    ERRO[0014] Can't add file /var/lib/containers/storage/overlay/afab5114cf8ceeefc1c99488b94e3c050b42a2b06986d76637ad7117e6dafd30/diff/opt/app-root/src/.phive/gpg/S.gpg-agent to tar: archive/tar: sockets not supported 
    ERRO[0014] Can't add file /var/lib/containers/storage/overlay/afab5114cf8ceeefc1c99488b94e3c050b42a2b06986d76637ad7117e6dafd30/diff/opt/app-root/src/.phive/gpg/S.gpg-agent.browser to tar: archive/tar: sockets not supported 
    ERRO[0014] Can't add file /var/lib/containers/storage/overlay/afab5114cf8ceeefc1c99488b94e3c050b42a2b06986d76637ad7117e6dafd30/diff/opt/app-root/src/.phive/gpg/S.gpg-agent.extra to tar: archive/tar: sockets not supported 
    ERRO[0014] Can't add file /var/lib/containers/storage/overlay/afab5114cf8ceeefc1c99488b94e3c050b42a2b06986d76637ad7117e6dafd30/diff/opt/app-root/src/.phive/gpg/S.gpg-agent.ssh to tar: archive/tar: sockets not supported 
    --> d082f313b9a
    STEP 12: RUN rm -Rf /opt/app-root/src/.phive
    --> dbc1d5c10ed
    STEP 13: RUN phive install --trust-gpg-keys $TRUSTEES --copy php-cs-fixer -t /usr/bin
    Phive 0.14.4 - Copyright (C) 2015-2020 by Arne Blankerts, Sebastian Heuer and Contributors
    Fetching repository list
    Downloading https://phar.io/data/repositories.xml
    Downloading https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.16.7/php-cs-fixer.phar
    Downloading https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.16.7/php-cs-fixer.phar.asc
    Downloading key E82B2FB314E9906E
    Trying to connect to keys.openpgp.org (37.218.245.50)
    Downloading https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0xE82B2FB314E9906E
    Successfully downloaded key.
    [WARNING]  Parsing key data failed with error code 0: No UIDs in key found 
    Trying to connect to keyserver.ubuntu.com (162.213.33.8)
    Successfully downloaded key.
    
            Fingerprint: BBAB 5DF0 A0D6 6729 89CF 1869 E82B 2FB3 14E9 906E
    
            Dariusz Ruminski <[email protected]>
    
            Created: 2015-01-17
    
    Copying php-cs-fixer-2.16.7.phar to /usr/bin/php-cs-fixer
    
    ERRO[0020] Can't add file /var/lib/containers/storage/overlay/dc8f18a3a4b9e63b1942de29f76857038d192d81902922dc09395ce2b71602a8/diff/opt/app-root/src/.phive/_tmp_wrk/S.gpg-agent to tar: archive/tar: sockets not supported 
    ERRO[0020] Can't add file /var/lib/containers/storage/overlay/dc8f18a3a4b9e63b1942de29f76857038d192d81902922dc09395ce2b71602a8/diff/opt/app-root/src/.phive/_tmp_wrk/S.gpg-agent.browser to tar: archive/tar: sockets not supported 
    ERRO[0020] Can't add file /var/lib/containers/storage/overlay/dc8f18a3a4b9e63b1942de29f76857038d192d81902922dc09395ce2b71602a8/diff/opt/app-root/src/.phive/_tmp_wrk/S.gpg-agent.extra to tar: archive/tar: sockets not supported 
    ERRO[0020] Can't add file /var/lib/containers/storage/overlay/dc8f18a3a4b9e63b1942de29f76857038d192d81902922dc09395ce2b71602a8/diff/opt/app-root/src/.phive/_tmp_wrk/S.gpg-agent.ssh to tar: archive/tar: sockets not supported 
    ERRO[0020] Can't add file /var/lib/containers/storage/overlay/dc8f18a3a4b9e63b1942de29f76857038d192d81902922dc09395ce2b71602a8/diff/opt/app-root/src/.phive/gpg/S.gpg-agent to tar: archive/tar: sockets not supported 
    ERRO[0020] Can't add file /var/lib/containers/storage/overlay/dc8f18a3a4b9e63b1942de29f76857038d192d81902922dc09395ce2b71602a8/diff/opt/app-root/src/.phive/gpg/S.gpg-agent.browser to tar: archive/tar: sockets not supported 
    ERRO[0020] Can't add file /var/lib/containers/storage/overlay/dc8f18a3a4b9e63b1942de29f76857038d192d81902922dc09395ce2b71602a8/diff/opt/app-root/src/.phive/gpg/S.gpg-agent.extra to tar: archive/tar: sockets not supported 
    ERRO[0020] Can't add file /var/lib/containers/storage/overlay/dc8f18a3a4b9e63b1942de29f76857038d192d81902922dc09395ce2b71602a8/diff/opt/app-root/src/.phive/gpg/S.gpg-agent.ssh to tar: archive/tar: sockets not supported 
    --> 39b3d12a44e
    STEP 14: RUN rm -Rf /opt/app-root/src/.phive
    --> 8aeb6aa5264
    
    opened by xrow 25
  • Automatic key import fails

    Automatic key import fails

    When calling

    $ '/php74/tools/src/phive.phar' '--no-progress' 'install' '--copy' '--target' '/php74/tools/src/build/usr/bin' '--trust-gpg-keys' 'F4D32E2C9343B2AE' 'composer-unused'
    

    with phive 0.14.2, it asks for permission (which I can't give, since this is an automated build).

    [WARNING] This is NOT a key that has been used to install previous versions of this PHAR.
               While this can be perfectly valid (maybe the maintainer switched to a new key),
               please make sure this key belongs to the maintainer of the PHAR you are going to install.
    
    	Fingerprint: D969 E610 2643 4DFE 4D64 1764 F4D3 2E2C 9343 B2AE
    
    	Andreas Frömer <[email protected]>
    
    	Created: 2020-02-16
    
    Import this key? [y|N]
    

    At first I thought this worked in phive 0.14, but looking at the WARNING I guess this is because of the key-change in https://github.com/composer-unused/composer-unused/issues/81?

    opened by temp 25
  • Refactor storage layout and files

    Refactor storage layout and files

    Thanks to @MacFJA, phive now has support to generally download things from repositories requiring authentication.

    As of now, auth information is stored in a seperate file (~/.phive/phive-auth.xml or {$basedir}./phive-auth.xml).

    This seems redundant, as we already have a phive.xml which could - should? - contain the required entries for the later.

    And, in case a second file should exist in the ~/.phive directory, the prefix phive- is redundant. Given we also plan to have a general config file, maybe we should move these things into it.

    @MacFJA What do you think?

    opened by theseer 25
  • rtrim() expects parameter 1 to be string, bool given

    rtrim() expects parameter 1 to be string, bool given

    When running phive on Windows 10, using Powershell, I'm getting the error:

    rtrim() expects parameter 1 to be string, bool given

    Here is the full output:

    λ php .\phive.phar install [email protected]
    Phive 0.13.2 - Copyright (C) 2015-2019 by Arne Blankerts, Sebastian Heuer and Contributors
    Fetching repository list
    Downloading https://phar.io/data/repositories.xml
    Downloading https://phar.phpunit.de/phive.xml
    Downloading https://phar.phpunit.de/phpunit-8.0.6.phar
    Downloading https://phar.phpunit.de/phpunit-8.0.6.phar.asc
    Downloading key 4AA394086372C20A
    Trying to connect to keys.openpgp.org (37.218.245.50)
    Downloading https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0x4AA394086372C20A
    Successfully downloaded key.
    
            Fingerprint: D840 6D0D 8294 7747 2937 7831 4AA3 9408 6372 C20A
    
            Sebastian Bergmann <[email protected]>
            Sebastian Bergmann <[email protected]>
            Sebastian Bergmann <[email protected]>
            Sebastian Bergmann <[email protected]>
            Sebastian Bergmann <[email protected]>
    
            Created: 2014-07-19
    
    Import this key? [y|N] [ERROR]    An error occurred while processing your request:
    
              rtrim() expects parameter 1 to be string, bool given
    
              #0 src/shared/cli/input/ConsoleInput.php(23)
              #1 src/shared/cli/input/ConsoleInput.php(23): rtrim()
              #2 src/services/key/KeyService.php(64): PharIo\Phive\Cli\ConsoleInput->confirm()
              #3 src/services/key/KeyService.php(48): PharIo\Phive\KeyService->allowedToImport()
              #4 src/services/signature/gpg/GnupgSignatureVerifier.php(27): PharIo\Phive\KeyService->importKey()
              #5 src/services/phar/PharDownloader.php(84): PharIo\Phive\GnupgSignatureVerifier->verify()
              #6 src/services/phar/PharDownloader.php(44): PharIo\Phive\PharDownloader->verifySignature()
              #7 src/services/phar/PharService.php(22): PharIo\Phive\PharDownloader->download()
              #8 src/services/phar/InstallService.php(45): PharIo\Phive\PharService->getPharFromRelease()
              #9 src/commands/install/InstallCommand.php(45): PharIo\Phive\InstallService->execute()
              #10 src/commands/install/InstallCommand.php(37): PharIo\Phive\InstallCommand->installRequestedPhar()
              #11 src/shared/cli/Runner.php(193): PharIo\Phive\InstallCommand->execute()
              #12 src/shared/cli/Runner.php(60): PharIo\Phive\Cli\Runner->execute()
              #13 (313): PharIo\Phive\Cli\Runner->run()
              #14 {main}
    
              Environment: PHP 7.4.0
              Phive Version: 0.13.2
    
              This should not have happened and is most likely a bug.
              Please report it at https://github.com/phar-io/phive/issues, make sure you include
              the full output of this error message. Thank you!
    
    bug 
    opened by burzum 18
  • Robust code

    Robust code

    PHPStan detects 60 occurrences of processing unexpected false/null values.

    e.g.

     ------ --------------------------------------------------------------------------------------------------------
      Line   services/resolver/PharIoAliasResolver.php
     ------ --------------------------------------------------------------------------------------------------------
      42     Parameter #1 $name of class PharIo\FileSystem\Filename
             constructor expects string, string|false given.
     ------ --------------------------------------------------------------------------------------------------------
    

    What is you opinion about it?

    opened by szepeviktor 18
  • release 0.14 install breaks on windows

    release 0.14 install breaks on windows

    it is a bit unclear to me why this actually happens. But in github actions gpg keys cannot be downloaded via phive. I tried this on a windows vm with windows 10 installed. There phive does just work...

    Run phive --no-progress --home $GITHUB_WORKSPACE/.phive install --copy --trust-gpg-keys 4AA394086372C20A,D2CCAC42F6295E7D,E82B2FB314E9906E,8A03EA3B385DBAA1 --force-accept-unsigned
    Phive 0.14.3 - Copyright (C) 2015-2020 by Arne Blankerts, Sebastian Heuer and Contributors
    Fetching repository list
    Downloading https://phar.io/data/repositories.xml
    Downloading https://phar.phpunit.de/phive.xml
    Downloading https://phar.phpunit.de/phpunit-8.4.3.phar
    Downloading https://phar.phpunit.de/phpunit-8.4.3.phar.asc
    Downloading key 4AA394086372C20A
    Trying to connect to keys.openpgp.org (37.218.245.50)
    Downloading https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0x4AA394086372C20A
    Successfully downloaded key.
    [WARNING] Parsing key data failed with error code 0: No UIDs in key found
    Trying to connect to keyserver.ubuntu.com (162.213.33.8)
    Successfully downloaded key.
    [WARNING] Parsing key data failed with error code 0: No UIDs in key found
    Trying to connect to hkps.pool.sks-keyservers.net (192.146.137.141)
    Downloading https://hkps.pool.sks-keyservers.net/pks/lookup?op=get&options=mr&search=0x4AA394086372C20A
    Successfully downloaded key.
    [WARNING] Parsing key data failed with error code 0: No UIDs in key found
    [ERROR]   PublicKey 4AA394086372C20A not found on key servers
    
    ##[error]Process completed with exit code 1.
    

    when doing the same thing, with same commands and env with phive 0.13.3 it just works.

    opened by jaapio 17
  • Automating signatures: A good idea?

    Automating signatures: A good idea?

    I am looking into using GitHub Actions to automatically build and sign a .phar version of a tool I am providing.

    Do you think that automated signing defeats the purpose of signatures in the first place? (Why) should signing be a manual process?

    Are signatures helpful to prevent forgery on/inside the GitHub platform, or rather outside of it?

    What is the advantage of having signatures over downloading from HTTPS GitHub URLs?

    opened by mpdude 14
  • Install tools with `*` as version by default

    Install tools with `*` as version by default

    I'm suggesting the exact opposite of https://github.com/phar-io/phive/issues/223#issue-551360394 :-)

    Reason: When I use a tool, I always want the latest version. Since there are no dependencies, constraining them to some version doesn't make sense to me. So installing everything with * as version, would save people from having to run phive outdated and then upgrade manually.

    However, I also see the point of @Aerendir in the above comment. Compromise? Maybe a switch during phive installation to enable such an "eager" upgrade feature. Intended side effect: This would Inform people that phive does have an update feature at all ;-)

    wontfix 
    opened by ThomasLandauer 13
  • Allow to set phive home directory via environment variable

    Allow to set phive home directory via environment variable

    I know I can already change the default home directory of phive via command line option:

    https://github.com/phar-io/phive/blob/master/src/shared/config/Config.php#L34-L39

    But this is a bit cumbersome and error prone like I would loose all cached phars if I forget it in one command or just add a typo.

    It would be convenient if I could change this via an environment variable like PHIVE_HOME. The implementation could look like this:

        public function getHomeDirectory(): Directory {
            if ($this->cliOptions->hasOption('home')) {
                $dir = new Directory($this->cliOptions->getOption('home'));
                $dir->ensureExists();
    
                return $dir;
            }
            
            if(false !== getenv('PHIVE_HOME')) {
                $dir = new Directory(getenv('PHIVE_HOME'));
                $dir->ensureExists();
                
                return $dir;
            }
    
            $dir = $this->environment->getHomeDirectory()->child('.phive');
            $dir->ensureExists();
    
            return $dir;
        }
    

    Background is that I am working with a CI environment that does not cache files in ${HOME} but only in ${HOME}/cache so I could speed up the build process when I could set PHIVE_HOME=${HOME}/cache/.phive. I do the same with GNUPGHOME and several other tools. If you agree on that I'd be happy to provide a PR including unit tests of course.

    opened by dnaber-de 12
  • Faciliate installation in the CI

    Faciliate installation in the CI

    I've been giving another try to phive, locally I'm quite happy with it but the CI integration is a bit more annoying.

    The GitHubAction shivammathur/setup-php does quite a good job at facilitating things and in fact allows to install multiple tools, but you have the following problems:

    • if you install those tools with that action:
      • I don't know if there are verified
      • It may be a different version than what you specified with phive
      • You need to be explicit (as opposed to $ phive install)
    • if you use phive in the CI:
      • you might get rate limited by the GitHub API
      • you need to specify the GPG key...

    Do you have any suggestion/recommendation on how to make it easier?

    opened by theofidry 2
  • Usage on bitbucket pipelines not possible due to

    Usage on bitbucket pipelines not possible due to "chmod(): Operation not permitted"

    I have an issue using phive on bitbucket pipelines. On there chmod operation is forbidden. I already have the tools (target name is bin) directory for non-phive tools but the ensure method tries to ensure the access of the directory. It is 0777 and phive tries to force 0755.

    [ERROR]   An error occurred while processing your request:
              Creating directory "./bin" failed.
              
              #0 vendor/phar-io/filesystem/src/Directory.php(79)
              #1 src/shared/config/PhiveXmlConfig.php(231): PharIo\FileSystem\Directory->ensureExists()
              #2 src/shared/config/PhiveXmlConfig.php(129): PharIo\Phive\PhiveXmlConfig->nodeToConfiguredPhar()
              #3 src/commands/install/InstallCommandConfig.php(94): PharIo\Phive\PhiveXmlConfig->getPhars()
              #4 src/commands/install/InstallCommandConfig.php(72): PharIo\Phive\InstallCommandConfig->getPharsFromPhiveXmlConfig()
              #5 src/commands/install/InstallCommand.php(45): PharIo\Phive\InstallCommandConfig->getRequestedPhars()
              #6 src/shared/cli/Runner.php(241): PharIo\Phive\InstallCommand->execute()
              #7 src/shared/cli/Runner.php(95): PharIo\Phive\Cli\Runner->execute()
              #8 (354): PharIo\Phive\Cli\Runner->run()
              #9 {main}
              Environment: PHP 7.4.32 (on Linux 5.15.0-1019-aws)
              Phive Version: 0.15.1
    

    https://github.com/phar-io/filesystem/blob/master/src/Directory.php#L75-L77

    To change phive I would need to either separate chmod from mkdir and this is not in phive itself, or I need to add a check before chmod whether operation will fail (and I am not sure yet how to check lsattr does not show immutable flag) to skip it if it will fail for permission reasons.

    Any ideas how to approach this? I am keen to make pull requests for this but I am not sure what is a good way

    opened by JoshuaBehrens 3
  • "No RateLimit present in response" on Windows?

    I was trying to fix the build in phpDocumentor when I discovered that the problem was that we were repeatedly getting the "No Ratelimit present in response" error when using Phive in our Windows machines (see https://github.com/phpDocumentor/phpDocumentor/runs/7249978421 for an example).

    At first I was like, it must be a ratelimit issue; but I cache the phive folders now and on Windows it gives this error. (Sidenote: for some reason the hash of the phive.xml is different on windows vs mac and linux; hence it doesn't use the cache created on linux and windows).

    What could this issue be? We are using Phive 0.15.1

    opened by mvriel 6
  • [Feature request] Log paths and token usage in output

    [Feature request] Log paths and token usage in output

    Hi. I had an issue with GitHub's API rate limit (I was getting 403) on CI/CD so I used .phive/auth.xml and added an application token last week and it seemed to help. For whatever reason it stopped working today on CI/CD (I'm getting 403 again, even though I'm not exceeding the limit for authenticated connections, i.e. 5k requests per hour) but it keeps working on my local machine and I use the same token here. It would be a tremendous help while debugging if phive would just tell me in the output that it picked up .phive/auth.xml correctly and sent the OAuth2 token when connecting to GitHub.

    enhancement good first issue 
    opened by cprn 0
Releases(0.15.2)
A library for simplifying the PHAR build process.

Box is a library built on the Phar class. It is designed to make it easier to create new phars and modifying existing ones. Features include compacting source files, better custom stub generation, and better OpenSSL signing handling.

Box Project 193 May 16, 2022
Fact Extraction and VERification Over Unstructured and Structured information

Repository for Fact Extraction and VERification Over Unstructured and Structured information (FEVEROUS), used for the FEVER Workshop Shared Task at EMNLP2021.

Rami 49 Dec 9, 2022
AppGallery IAP is a PHP library to handle AppGallery purchase verification and Server Notifications

AppGallery IAP About AppGallery IAP is a PHP library to handle AppGallery purchase verification and Server Notifications. This package simplifies deve

Dmitry 6 Aug 10, 2022
Composer Repository Manager for selling Magento 2 extension and offering composer installation for ordered packages.

Magento 2 Composer Repository Credits We got inspired by https://github.com/Genmato. Composer Repository for Magento 2 This extension works as a Magen

EAdesign 18 Dec 16, 2021
Checks prefer-lowest installation for actually defined min versions in composer.json

Composer Prefer Lowest Validator This validator will strictly compare the specified minimum versions of your composer.json with the ones actually used

Mark Scherer 17 Aug 7, 2022
A composer plugin, to install differenty types of composer packages in custom directories outside the default composer default installation path which is in the vendor folder.

composer-custom-directory-installer A composer plugin, to install differenty types of composer packages in custom directories outside the default comp

Mina Nabil Sami 136 Dec 30, 2022
This composer installer plugin allows for easy installation of PHP_CodeSniffer coding standards

PHP_CodeSniffer Standards Composer Installer Plugin This composer installer plugin allows for easy installation of PHP_CodeSniffer coding standards (r

PHPCSStandards 393 Feb 25, 2022
Secure package for WP CLI, built to provide an easier way of securing your WordPress installation

wp-cli/secure-command Official website: Hackthewp.com Manages common security aspects of WordPress. Supports nginx and Apache. Basic Usage This packag

Igor Hrcek 68 Dec 27, 2022
Mage2click toolset to create and manage the Magento Docker development environment with mutagen.io file-sync for macOS and native filesystem mounts on Linux.

Mage2click - Magento Docker Toolset Mage2click toolset is a system-wide command-line tool for creating and managing simultaneously running Magento Doc

Mage2click 69 Nov 28, 2022
MajorDoMo is an open-source DIY smarthome automation platform aimed to be used in multi-protocol and multi-services environment.

MajorDoMo (Major Domestic Module) is an open-source DIY smarthome automation platform aimed to be used in multi-protocol and multi-services environment. It is based on web-technologies stack and ready to be delivered to any modern device. It is very flexible in configuration with OOP paradigm used to set up automation rules and scripts. This platform can be installed on almost any personal computer running Windows or Linux OS.

Sergei Jeihala 369 Dec 30, 2022
Workshop environment for Decoupled Drupal

Decoupled Drupal Workshop ?? Welcome to the Bluehorn Digital Decoupled Drupal workshop repository! This repository contains a decoupled ready Drupal b

Bluehorn Digital 6 Feb 2, 2022
🐘 A probe program for PHP environment (一款精美的 PHP 探針, 又名X探針、劉海探針)

Simplified Chinese | 简体中文 Traditional Chinese(Taiwan) | 正體中文(臺灣) Traditional Chinese(Hong Kong) | 正體中文(香港) Japanese | 日本語 ?? X Prober This is a probe

Km.Van 1.2k Dec 28, 2022
Full PHP development environment for Docker.

Full PHP development environment based on Docker. Use Docker First - Learn About It Later! Join Us Awesome People Laradock is an MIT-licensed open sou

laradock 11.7k Jan 7, 2023
A simple library to increase the power of your environment variables.

Environment A simple library (with all methods covered by php unit tests) to increase the power of your environment variables, contribute with this pr

João Paulo Cercal 56 Feb 8, 2022
A Magento Development Environment Made of Docker Containers

Docker for Magento 1 Extension Development Tl;dr How do I use this? Clone it. Type docker-compose up -d. Install a Magento Mount your file share. Deve

Michael A. Smith 99 May 10, 2021
A simple shell script which loads a magento environment

A simple shell script to load up a Magento environment and execute PHP code Very experimental and should only be ran on dev servers REQUIRES php pcntl

beeplogic 28 Feb 4, 2022
A dockerized magento 2 community environment ready for development or production.

Painless Magento 2 & 1 A dockerized magento 2 community environment ready for development or production. It supports magento 1.9.x for development Ins

Cocoa Web Studio 10 Apr 23, 2022
This a php environment for developers. based on Vagrant & CentOS & laravel/homestead

Centstead 这是一个 PHP 调试环境 , 基于 centos,laravel/homestead. 介绍   基于开发的实际需求,PHP开发者通常需要一个贴近生产环境,又易于维护的测试与开发环境.以往的选择: xampp, wamp, phpstudy… 集成环境,启动方便,占用小,但是需

JasonChang 52 Sep 30, 2022
laminas-memory manages data in an environment with limited memory

Memory objects (memory containers) are generated by the memory manager, and transparently swapped/loaded when required.

Laminas Project 5 Jul 26, 2022