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

Installing different version of phpstan or php-cs-fixer does not work. #202

Closed
lippok opened this issue Jul 23, 2019 · 4 comments
Closed
Assignees

Comments

@lippok
Copy link

lippok commented Jul 23, 2019

I can't link different versions of php-cs-fixer in different projects. I suppose this is a bug.

Steps to reproduce

rm -rd ~/.phive
mkdir tmp1 && cd tmp1
phive install php-cs-fixer:2.15
mkdir tmp2 && cd tmp2
phive install php-cs-fixer:2.14

Observed errors
Within the ~/.phive/phars folder only one file php-cs-fixer.phar is created and both installations are linking to it. Further more, the database ~/.phive/phars.xml seems to be corrupted.

<?xml version="1.0" encoding="UTF-8"?>
<phars xmlns="https://phar.io/phive/installdb">
  <phar name="php-cs-fixer" version="2.15.1" location="/myhome/.phive/phars/php-cs-fixer.phar">
    <hash type="sha1">2956f1714d13b689e584c523a8b22b7c61b8a0ae</hash>
    <signature fingerprint="BBAB5DF0A0D6672989CF1869E82B2FB314E9906E"/>
    <usage destination="/myhome/tmp1/tools/php-cs-fixer"/>
  </phar>
  <phar name="php-cs-fixer" version="2.14.4" location="/myhome/.phive/phars/php-cs-fixer.phar">
    <hash type="sha1">4d75e3cd8ed56cf334f1ef8ca577c041278b5925</hash>
    <signature fingerprint="BBAB5DF0A0D6672989CF1869E82B2FB314E9906E"/>
    <usage destination="/myhome/tmp2/tools/php-cs-fixer"/>
  </phar>
  <phar name="phpunit" version="7.5.14" location="/myhome/.phive/phars/phpunit-7.5.14.phar">
    <hash type="sha1">806e37c192d9290a0aef16b9cb8aba17ac96d6c4</hash>
    <signature fingerprint="D8406D0D82947747293778314AA394086372C20A"/>
    <usage destination="/myhome/tmp1/tools/phpunit"/>
  </phar>
</phars>

The same happens with phpstan but it seems to work with phpunit.

@theseer
Copy link
Member

theseer commented Jul 23, 2019

Phive assumes the filename of the phar to contain the version number when storing it.
That's obviously stupid and it's scarily amazing it took so long to pop up.

I'll look into to asap.

@lippok
Copy link
Author

lippok commented Jul 23, 2019

Thank you!

@theseer
Copy link
Member

theseer commented Jul 23, 2019

Works for me now.

@sebastianheuer Can you roll a release? :)

@theseer
Copy link
Member

theseer commented Jul 23, 2019

@sebastianheuer Never mind, just did.

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