1
0
Fork 0

Fix usage of create-project with local filesystem repos

pull/9063/head
Jordi Boggiano 2020-07-17 11:30:03 +02:00
parent 201533e16f
commit 433968de17
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
3 changed files with 7 additions and 7 deletions

View File

@ -356,7 +356,7 @@ EOT
$repositorySet->addRepository(new CompositeRepository(RepositoryFactory::defaultRepos($io, $config)));
} else {
foreach ($repositories as $repo) {
$repoConfig = RepositoryFactory::configFromString($io, $config, $repo);
$repoConfig = RepositoryFactory::configFromString($io, $config, $repo, true);
if (
(isset($repoConfig['packagist']) && $repoConfig === array('packagist' => false))
|| (isset($repoConfig['packagist.org']) && $repoConfig === array('packagist.org' => false))

View File

@ -98,7 +98,7 @@ EOT
if ($repositories) {
$config = Factory::createConfig($io);
foreach ($repositories as $repo) {
$options['repositories'][] = RepositoryFactory::configFromString($io, $config, $repo);
$options['repositories'][] = RepositoryFactory::configFromString($io, $config, $repo, true);
}
}
@ -173,7 +173,7 @@ EOT
$repos = array(new PlatformRepository);
$createDefaultPackagistRepo = true;
foreach ($repositories as $repo) {
$repoConfig = RepositoryFactory::configFromString($io, $config, $repo);
$repoConfig = RepositoryFactory::configFromString($io, $config, $repo, true);
if (
(isset($repoConfig['packagist']) && $repoConfig === array('packagist' => false))
|| (isset($repoConfig['packagist.org']) && $repoConfig === array('packagist.org' => false))

View File

@ -100,7 +100,7 @@ class AllFunctionalTest extends TestCase
* @dataProvider getTestFiles
* @depends testBuildPhar
*/
public function testIntegration(\SplFileInfo $testFile)
public function testIntegration($testFile)
{
$testData = $this->parseTestFile($testFile);
@ -133,15 +133,15 @@ class AllFunctionalTest extends TestCase
{
$tests = array();
foreach (Finder::create()->in(__DIR__.'/Fixtures/functional')->name('*.test')->files() as $file) {
$tests[] = array($file);
$tests[] = array($file->getRealPath());
}
return $tests;
}
private function parseTestFile(\SplFileInfo $file)
private function parseTestFile($file)
{
$tokens = preg_split('#(?:^|\n*)--([A-Z-]+)--\n#', file_get_contents($file->getRealPath()), null, PREG_SPLIT_DELIM_CAPTURE);
$tokens = preg_split('#(?:^|\n*)--([A-Z-]+)--\n#', file_get_contents($file), null, PREG_SPLIT_DELIM_CAPTURE);
$data = array();
$section = null;