Skip to content

Commit

Permalink
Ignore phar files in artifact repo, fixes #10406
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Jan 21, 2022
1 parent 0228e5b commit af60130
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Composer/Repository/ArtifactRepository.php
Expand Up @@ -79,7 +79,7 @@ private function scanDirectory($path)

$directory = new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::FOLLOW_SYMLINKS);
$iterator = new \RecursiveIteratorIterator($directory);
$regex = new \RegexIterator($iterator, '/^.+\.(zip|phar|tar|gz|tgz)$/i');
$regex = new \RegexIterator($iterator, '/^.+\.(zip|tar|gz|tgz)$/i');
foreach ($regex as $file) {
/* @var $file \SplFileInfo */
if (!$file->isFile()) {
Expand Down

8 comments on commit af60130

@Bibaschko
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

thanks for your efforts.
I removed phar from the ArtifactRepository.php, but still not able to install the extension - same error message like before.
Anything else I need to do, or is it not that simple?
thanks

@Seldaek
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know where you removed it from, but a Composer release will be out soon with the fix, then maybe you can try again with that?

@Bibaschko
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your reply ...
I'm not that familiar with composer, but need to get our magento store up and running.
I removed it here --> .../var/vendor/composer/composer/src/Composer/Repository/ArtifactRepository.php
Any idea when the new version will be available?
thanks a lot four your help!

@stof
Copy link
Contributor

@stof stof commented on af60130 Jan 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Bibaschko you can use the snapshot channel to test this before there is a release

@Bibaschko
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the snapshot channel at least solved the initially reported issue - however, i now get:
[Exception]
Unrecognized Composer Version

Expected?
thanks

@Seldaek
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's a bug in Magento see magento/composer-dependency-version-audit-plugin#3

@Seldaek
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2.2.5 is out now @Bibaschko - try composer self-update --stable again. https://github.com/composer/composer/releases/tag/2.2.5

@Bibaschko
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installed 2.2.5 and can confirm that the issue is solved.
Thank you very much - not only for solving this, but also for the good communication.

Please sign in to comment.