conventional-commits icon indicating copy to clipboard operation
conventional-commits copied to clipboard

Build and release PHAR

Open hussainweb opened this issue 4 years ago • 4 comments
trafficstars

Provide PHAR releases for conventional-commits

Right now, the documented way to install this would be to use composer require --dev. I would also like the option of downloading a PHAR file for this.

Background/problem

The dependencies of this package are quite strict which would not let me add this package where I would want to use this. For example, different versions of Drupal depend on different releases of Symfony packages and the version requirements here are quite strict. I can avoid this to an extent with cgr or composer global require --dev but there is a chance of conflicts anyway.

Next, there is a hard dependency on CaptainHook but I would want to use this with GrumPHP. It doesn't make sense to include both in a project. Another way could be to move captainhook to suggests instead of require but that's a big change and might need rewriting and testing.

A third way could be to break the package into supporting libraries and I could use that library in GrumPHP. Again, it's a lot of work.

Considering all this, I think creating a PHAR file is the easiest way out of all of these problems.

Proposal/solution

I suggest building and making PHAR files available and I can help with a PR if you're open to this. Of course, I can only contribute with the way to create PHAR files and I believe the maintainers will need to add it to releases or make it available to Phive, for example. My thought is to use https://github.com/box-project/box but I am open to other methods as well.

Alternatives

Already described in the background above.

Additional context

Already described in the background above.

hussainweb avatar Sep 09 '21 15:09 hussainweb

Hey, @hussainweb! I'm open to this idea, and I could use your help on it, if you're able. Thanks!

ramsey avatar Nov 09 '21 19:11 ramsey

Thanks, @ramsey. I'll start a PR on creating the PHAR file sometime this week.

hussainweb avatar Nov 09 '21 20:11 hussainweb

@ramsey, here is the first PR in preparation of the changes: #29.

hussainweb avatar Nov 12 '21 03:11 hussainweb

I ran unto the same issue as @hussainweb If we get to the point to have a PHAR it would be very convenient to make this phar available via composer too (I don't know much about composer package mechanisms but this seems possible, e.g. https://github.com/phar-io/composer-distributor).

juckerf avatar Nov 18 '21 14:11 juckerf