Merge pull request #2004 from jaypea/recursive_artifactrepository
ArtifactRepository needs recursive iterationpull/2007/head
commit
d498e73363
|
@ -47,7 +47,11 @@ class ArtifactRepository extends ArrayRepository
|
|||
private function scanDirectory($path)
|
||||
{
|
||||
$io = $this->io;
|
||||
foreach (new \RecursiveDirectoryIterator($path) as $file) {
|
||||
|
||||
$directory = new \RecursiveDirectoryIterator($path);
|
||||
$iterator = new \RecursiveIteratorIterator($directory);
|
||||
$regex = new \RegexIterator($iterator, '/^.+\.(zip|phar)$/i');
|
||||
foreach ($regex as $file) {
|
||||
/* @var $file \SplFileInfo */
|
||||
if (!$file->isFile()) {
|
||||
continue;
|
||||
|
|
|
@ -25,6 +25,7 @@ class ArtifactRepositoryTest extends TestCase
|
|||
'vendor0/package0-0.0.1',
|
||||
'composer/composer-1.0.0-alpha6',
|
||||
'vendor1/package2-4.3.2',
|
||||
'vendor3/package1-5.4.3',
|
||||
);
|
||||
|
||||
$coordinates = array('type' => 'artifact', 'url' => __DIR__ . '/Fixtures/artifacts');
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue