Merge pull request #1383 from simensen/get-composer-file-static
Made getComposerFile static.pull/1380/merge
commit
ace3eefe1a
|
@ -51,8 +51,7 @@ EOT
|
||||||
|
|
||||||
protected function execute(InputInterface $input, OutputInterface $output)
|
protected function execute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
$factory = new Factory;
|
$file = Factory::getComposerFile();
|
||||||
$file = $factory->getComposerFile();
|
|
||||||
|
|
||||||
if (!file_exists($file)) {
|
if (!file_exists($file)) {
|
||||||
$output->writeln('<error>'.$file.' not found.</error>');
|
$output->writeln('<error>'.$file.' not found.</error>');
|
||||||
|
|
|
@ -113,7 +113,7 @@ class Factory
|
||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getComposerFile()
|
public static function getComposerFile()
|
||||||
{
|
{
|
||||||
return getenv('COMPOSER') ?: 'composer.json';
|
return getenv('COMPOSER') ?: 'composer.json';
|
||||||
}
|
}
|
||||||
|
@ -171,7 +171,7 @@ class Factory
|
||||||
{
|
{
|
||||||
// load Composer configuration
|
// load Composer configuration
|
||||||
if (null === $localConfig) {
|
if (null === $localConfig) {
|
||||||
$localConfig = $this->getComposerFile();
|
$localConfig = static::getComposerFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_string($localConfig)) {
|
if (is_string($localConfig)) {
|
||||||
|
|
Loading…
Reference in New Issue