Comments (7)
@belanur Good to hear that it's not intentional ;-)
from phive.
Turns out that it does not matter how I invoke phive:
$ phive install phpunit
Downloading https://phar.phpunit.de/phive.xml
Downloading https://phar.phpunit.de/phpunit-5.3.1.phar
Downloading https://phar.phpunit.de/phpunit-5.3.1.phar.asc
Downloading key 4AA394086372C20A
Trying https://hkps.pool.sks-keyservers.net
[WARNING] Failed with status code 0:
[ERROR] PublicKey 4AA394086372C20A not found on key servers
$ phive install phpunit
Warning: require(phar://phive.phar//src/Factory.php): failed to open stream: phar error: internal corruption of phar "/usr/local/bin/phive" (actual filesize mismatch on file "src/Factory.php") in /usr/local/bin/phive on line 132
Call Stack:
0.0001 398120 1. {main}() /usr/local/bin/phive:0
0.0003 463520 2. spl_autoload_call() /usr/local/bin/phive:139
0.0003 463616 3. PharIo\Phive\{closure}() /usr/local/bin/phive:139
Fatal error: require(): Failed opening required 'phar://phive.phar//src/Factory.php' (include_path='.:/usr/share/pear:/usr/share/php') in /usr/local/bin/phive on line 132
Call Stack:
0.0001 398120 1. {main}() /usr/local/bin/phive:0
0.0003 463520 2. spl_autoload_call() /usr/local/bin/phive:139
0.0003 463616 3. PharIo\Phive\{closure}() /usr/local/bin/phive:139```
from phive.
This could be related to #42. It seems like PHIVE changes the contents of it's own PHAR, causing the issue described here.
from phive.
Using phive from a Git checkout works in general:
$ /usr/local/src/phive/phive install phpunit
Phive 0.2.0-88-gf26cacf-dirty - Copyright (C) 2015-2016 by Arne Blankerts, Sebastian Heuer and Contributors
Downloading https://phar.phpunit.de/phive.xml [ 57.52 KB / 57.52 KB - 100% ]
Downloading https://phar.phpunit.de/phpunit-5.3.1.phar [ 2.70 MB / 2.70 MB - 100% ]
Downloading https://phar.phpunit.de/phpunit-5.3.1.phar.asc [ 819 B / 819 B - 100% ]
Downloading key 4AA394086372C20A
Trying https://hkps.pool.sks-keyservers.net
Sucessfully downloaded key
Fingerprint: D840 6D0D 8294 7747 2937 7831 4AA3 9408 6372 C20A
Sebastian Bergmann <[email protected]> (2014-07-19)
Sebastian Bergmann <[email protected]> (2014-07-19)
Sebastian Bergmann <[email protected]> (2014-07-19)
Sebastian Bergmann <[email protected]> (2014-07-19)
Sebastian Bergmann <[email protected]> (2014-07-19)
Created: 2014-07-19
Import this key? [Y|n] Y
Symlinking phpunit-5.3.1.phar to /home/sb/tools/tools/phpunit
However, the way I understand the phive install phpdox bin/phpdox
example on the phar.io website still does not work:
$ /usr/local/src/phive/phive install phpunit /usr/local/bin/phpunit
Phive 0.2.0-88-gf26cacf-dirty - Copyright (C) 2015-2016 by Arne Blankerts, Sebastian Heuer and Contributors
Downloading repository list from https://phar.io/data/repositories.xml
Downloading https://phar.io/data/repositories.xml [ 873 B / 873 B - 100% ]
Downloading https://phar.phpunit.de/phive.xml [ 57.52 KB / 57.52 KB - 100% ]
Downloading https://phar.phpunit.de/phpunit-5.3.1.phar [ 2.70 MB / 2.70 MB - 100% ]
Downloading https://phar.phpunit.de/phpunit-5.3.1.phar.asc [ 819 B / 819 B - 100% ]
Downloading key 4AA394086372C20A
Trying https://hkps.pool.sks-keyservers.net
Sucessfully downloaded key
Fingerprint: D840 6D0D 8294 7747 2937 7831 4AA3 9408 6372 C20A
Sebastian Bergmann <[email protected]> (2014-07-19)
Sebastian Bergmann <[email protected]> (2014-07-19)
Sebastian Bergmann <[email protected]> (2014-07-19)
Sebastian Bergmann <[email protected]> (2014-07-19)
Sebastian Bergmann <[email protected]> (2014-07-19)
Created: 2014-07-19
Import this key? [Y|n] Y
Symlinking phpunit-5.3.1.phar to /home/sb/tools/tools/phpunit
[ERROR] Could not resolve alias /usr/local/bin/phpunit
from phive.
@belanur I do not understand #43 (comment). Why does phive modify its own PHAR?
from phive.
Unfortunately the example on the website is wrong; you cannot specify the destination (yet). so the second argument will be treated as another alias of a PHAR you want to install.
from phive.
@sebastianbergmann I am assuming that something goes wrong when determining the working directory so PHIVE tries to write a phive.xml
into it's own root directory instead of the actual working directory. I ran into the same issue this morning and am currently looking into it :)
from phive.
Related Issues (20)
- xmlns not available - https://phar.io/phive gives 404 HOT 1
- Creating directory failed HOT 4
- [feature request] add a flag to specify tool location HOT 14
- Phive reports broken pipe when writing to closed standard output (STDOUT)
- https://phar.io/phive 404 HOT 3
- Sort available aliases alphabetically HOT 1
- Wrong versions installed if done via Github Actions HOT 2
- Add `bump` command
- Use Phive to download Composer? HOT 5
- PHP Fatal error: During inheritance of IteratorAggregate: Uncaught ArgumentCountError HOT 3
- Add a blocklist / alternative feature
- Allow phpstan/extension-installer HOT 4
- Allow setting a cafile like composer allows to override corporate certificate replacers
- Support CalVer
- "Creating directory failed" in GitLab CI HOT 5
- "phive install" fails with exit code "1" and no error message (in GitLab CI) HOT 4
- Can phive install the best version for the current PHP version? HOT 7
- Installation fails with new key HOT 7
- phive install fails with "cannot fork where.exe" HOT 4
- Feature Suggestion: provide support for verifying PHAR files via GitHub Attestations HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phive.