Skip to content

Commit

Permalink
fix composer factories
Browse files Browse the repository at this point in the history
  • Loading branch information
wachterjohannes committed Jan 19, 2021
1 parent 61886db commit f768107
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ Nanbando is a simple application to automate website backups. It provides an ele
backup parts. Nanbando has built-in support for various storage's and provides easy to use sync and fetch operations. It
was built with modularity, extensibility and simplicity in mind.

## Status

This repository **will become** version 1.0 of Nanbando. It is **under heavy development** and currently it's APIs and
code are not yet stable (pre 1.0).

## Installation

To install the application simply download the executable and move it to the global bin folder.
Expand Down
8 changes: 8 additions & 0 deletions src/Application/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ protected function getKernelParameters()

public function process(ContainerBuilder $container)
{
if (!file_exists($this->embeddedComposer->getExternalComposerFilename())) {
return;
}

$container->set('composer', $this->embeddedComposer->createComposer(new NullIO()));
}

Expand All @@ -162,6 +166,10 @@ public function getEmbeddedComposer()

protected function discoverPlugins(): array
{
if (!file_exists($this->embeddedComposer->getExternalComposerFilename())) {
return [];
}

/** @var EmbeddedComposerInterface $embeddedComposer */
$embeddedComposer = $this->getEmbeddedComposer();

Expand Down
5 changes: 5 additions & 0 deletions src/Bundle/Command/ComposerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,9 @@ protected function execute(InputInterface $input, OutputInterface $output)

return $installer->run();
}

public function isEnabled()
{
return file_exists($this->getApplication()->getEmbeddedComposer()->getExternalComposerFilename());
}
}

0 comments on commit f768107

Please sign in to comment.