composer-plugin's People
composer-plugin's Issues
No longer works with PHP < 7.2
$ bin/composer.phar phive:run
Phive requires PHP 7.2 or later; Upgrading to the latest version of PHP is highly recommended.
Even though I Composer require-dev "phar-io/composer-plugin": "^0.1.2"
which requires "php" : ">=5.6.0"
, I am getting the latest phive version which requires php 7.2.
I can see that in my vendor/phar-io/composer-plugin/bin/phive.phar/.phar/stub.php
there is new StaticPhiveVersion('0.14.4')
fragment which confirms, that the latest phive phar is being downloaded, not the version specified by the composer-plugin.
More info about the problem: phar-io/executor@ddf26ba#r42344083
Adapt Symfony Console's argument parsing
The Phive command should not try to interpret the arguments provided for Phive, but instead handle them as a single string.
Proof of concept
Hi guys,
here are the first plan to build the plugin. I see the two major parts "Installer" and
"Commands" in there. And i'm also add some off topic points.
The installer
Here is the biggest question. How we want to install phive? There are two options for me
with pro's and con's.
Option one - use source
PRO
- Just a requirement in the composer.json. (Actually no Packagist entry are existed)
- phive itself has few requirements. So the overhead for composer is insignificant.
CON
- Selfupdate is a little bit tricky, but possible with a virtual composer-package for example. And we need selfupdate! The most developers will install this plugin in global scope. And nobody updates plugin's in global scope. ;-)
- No GPG verification for phive itself
Option two - use the PHAR file
PRO
- Selfupdate are simple
- GPG verification are possible
CON
- An advanced installer must be implemented. Composer has all the magic on board to download phive. The steps for GPG verification must be implemented.
The commands
I will implement a CommandProvider which contains the following phive commands:
- version
- list
- install
- purge
- remove
- reset
- (selfupdate)
- skel
- update
- update-repository-list
- check (internal "composer")
These commands are only adapters to the real commands with prepared parameters.
So for example the install command gets the prepared target path to the composer binary directory
I would also implement a show command which will output a table of the current used PHAR files (content of the phive.xml file) in project.
The "check" command are mapped to the internal "composer" command because of naming conflicts.
All commands get the prefix "phive" in the CLI. So they are grouped by default.
That means under available commands in the Composer CLI there are:
...
why
why-not
phive:
install
list
...
So an example command call looks like this: composer phive:install phpunit
.
Off topic
The minimum supported PHP version are "5.6.x".
For testing PHPUnit are used.
Open questions
- Which installation option we would like to use?
- Do we want a check on a specific event, like install or update, to compare phive.xml with the composer vendor binary path? For example to load/add the required PHAR file(s) by project initialization.
- Did i forgot something? Or did you need an advanced plan?
[ERROR] Unknown option: ansi
The problem is that the Composer binary which comes via Homebrew always add "--ansi" or "--no-ansi" to all commands. But in this special case for us, the parameters are in the wrong order. See here.
Detect the bin-dir from Composer as target directory
Update for Composer 2?
Are there plans to update this to work with Composer 2?
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.