Fix usage of create-project with local filesystem repos
parent
201533e16f
commit
433968de17
|
@ -356,7 +356,7 @@ EOT
|
||||||
$repositorySet->addRepository(new CompositeRepository(RepositoryFactory::defaultRepos($io, $config)));
|
$repositorySet->addRepository(new CompositeRepository(RepositoryFactory::defaultRepos($io, $config)));
|
||||||
} else {
|
} else {
|
||||||
foreach ($repositories as $repo) {
|
foreach ($repositories as $repo) {
|
||||||
$repoConfig = RepositoryFactory::configFromString($io, $config, $repo);
|
$repoConfig = RepositoryFactory::configFromString($io, $config, $repo, true);
|
||||||
if (
|
if (
|
||||||
(isset($repoConfig['packagist']) && $repoConfig === array('packagist' => false))
|
(isset($repoConfig['packagist']) && $repoConfig === array('packagist' => false))
|
||||||
|| (isset($repoConfig['packagist.org']) && $repoConfig === array('packagist.org' => false))
|
|| (isset($repoConfig['packagist.org']) && $repoConfig === array('packagist.org' => false))
|
||||||
|
|
|
@ -98,7 +98,7 @@ EOT
|
||||||
if ($repositories) {
|
if ($repositories) {
|
||||||
$config = Factory::createConfig($io);
|
$config = Factory::createConfig($io);
|
||||||
foreach ($repositories as $repo) {
|
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);
|
$repos = array(new PlatformRepository);
|
||||||
$createDefaultPackagistRepo = true;
|
$createDefaultPackagistRepo = true;
|
||||||
foreach ($repositories as $repo) {
|
foreach ($repositories as $repo) {
|
||||||
$repoConfig = RepositoryFactory::configFromString($io, $config, $repo);
|
$repoConfig = RepositoryFactory::configFromString($io, $config, $repo, true);
|
||||||
if (
|
if (
|
||||||
(isset($repoConfig['packagist']) && $repoConfig === array('packagist' => false))
|
(isset($repoConfig['packagist']) && $repoConfig === array('packagist' => false))
|
||||||
|| (isset($repoConfig['packagist.org']) && $repoConfig === array('packagist.org' => false))
|
|| (isset($repoConfig['packagist.org']) && $repoConfig === array('packagist.org' => false))
|
||||||
|
|
|
@ -100,7 +100,7 @@ class AllFunctionalTest extends TestCase
|
||||||
* @dataProvider getTestFiles
|
* @dataProvider getTestFiles
|
||||||
* @depends testBuildPhar
|
* @depends testBuildPhar
|
||||||
*/
|
*/
|
||||||
public function testIntegration(\SplFileInfo $testFile)
|
public function testIntegration($testFile)
|
||||||
{
|
{
|
||||||
$testData = $this->parseTestFile($testFile);
|
$testData = $this->parseTestFile($testFile);
|
||||||
|
|
||||||
|
@ -133,15 +133,15 @@ class AllFunctionalTest extends TestCase
|
||||||
{
|
{
|
||||||
$tests = array();
|
$tests = array();
|
||||||
foreach (Finder::create()->in(__DIR__.'/Fixtures/functional')->name('*.test')->files() as $file) {
|
foreach (Finder::create()->in(__DIR__.'/Fixtures/functional')->name('*.test')->files() as $file) {
|
||||||
$tests[] = array($file);
|
$tests[] = array($file->getRealPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
return $tests;
|
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();
|
$data = array();
|
||||||
$section = null;
|
$section = null;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue