llaville / php-compatinfo

Library that find out the minimum version and the extensions required for a piece of code to run
https://llaville.github.io/php-compatinfo/7.1/
Other
371 stars 21 forks source link

Composer Automation to build PHAR distribution #270

Closed szepeviktor closed 3 years ago

szepeviktor commented 4 years ago

It is not so easy to get a tool packaged in a PHAR file as you have to know the URL.

phive install php-compat-info makes more sense.

https://github.com/phar-io/phive

All you need

llaville commented 4 years ago

Good idea. Added to the roadmap. But I give a lowest priority to this task and all other additional tasks. First I want to finish to prepare the first release candidate of next version 5.4 that will enhance PHP 7 features detection

llaville commented 3 years ago

I want to release the final stable version 5.4 in 2 days now. This task will then be added in v6.0

llaville commented 3 years ago

We can also automated creation of phar version at composer project installation or update. What do you think about this solution (easy to implement) ?

szepeviktor commented 3 years ago

We were experimenting with this https://github.com/villfa/test-phar-gpg/blob/main/.github/workflows/release.yml but should be done in the correct order https://github.com/villfa/test-phar-gpg/commit/5b843d015159a7ff64a6e5418b22b7bf8a92f039#commitcomment-44183629

llaville commented 3 years ago

I'm able to produce a solution (composer based) in next 1 or 2 days. Just time to let me finish tests on https://github.com/llaville/php-compatinfo-db project for upcoming version 3.0

llaville commented 3 years ago

I've just finished to test POC in php-compatinfo-db project (see https://github.com/llaville/php-compatinfo-db/issues/59)

I'll apply the same fix tomorrow in branch master of php-compatinfo. I'll keep you aware when it will be available !

llaville commented 3 years ago

No need to wait major version 6.0; It will come with bugfix release 5.4.2

llaville commented 3 years ago

--manifest will be removed in v5.4.2 until I find a nice solution to automate process to build metadata in phar (I've already idea, but i need to work on POC)

szepeviktor commented 3 years ago

Thank you. I've just ran it on itself: Requires PHP 7.1.0 (min)

llaville commented 3 years ago

While working of CI implementation (#271), I found that humbug/box package cannot be installed on PHP 8 platform.

My fisrt approch was to ignore PHP version requirement on Composer install, but it introduced other issues.

I've then decided to remove Composer Automation to build PHAR version of CompatInfo, and reintroduced PHP 8 support in CI !