clue / phar-composer

Simple phar creation for every PHP project managed via Composer
https://clue.engineering/2019/introducing-phar-composer
MIT License
855 stars 78 forks source link

Composer v2 compatibility #107

Closed thojou closed 3 years ago

thojou commented 3 years ago

Hi,

Today I encountered an issue with composer v2, which has been already reported in #106. Here is the PR that should fix this issue.

I'm not sure, how to handle the new introduced installed-path inside a package definition. May that be a replacement for target-dir. If you think so, I can update this part as well.

What is your thought on the new PHPUnit-Test? Currently, it is duplicated code from testBundlePackageWithNoVendorReturnsEmptyBundle. Should we use a dataProvider instead?

soyuka commented 3 years ago

change works :+1:

$installed = $installed['packages'] ?? $installed;
nargotik commented 3 years ago

change works +1

$installed = $installed['packages'] ?? $installed;

Yes but this would make incompatible with php5.3 i think

wimleers commented 3 years ago

Yes but this would make incompatible with php5.3 i think

Which is probably why most builds are failing.

Could the PR be updated to use syntax that is more backwards compatible? 🙏 😊

nargotik commented 3 years ago

@wimleers the PR is already backwards even using this aproach or aproach on #108 that I have already closed due duplication of issues solved.

clue commented 3 years ago

@thojou Thanks for looking into this and providing this high-quality PR with some additional tests!

I've just applied your changes with #114 after introducing some additional test changes now that #112 is in.

Now let's get this shipped! :shipit:

Keep it up!