Skip to content

Commit

Permalink
Improve discoverability of 'composer recipes'
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhelias authored and nicolas-grekas committed Aug 25, 2020
1 parent 967fb2d commit eae35f1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/Flex.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,12 +436,18 @@ public function install(Event $event = null)
$this->io->writeError('');
$this->io->writeError('What about running <comment>composer global require symfony/thanks && composer thanks</> now?');
$this->io->writeError(sprintf('This will spread some %s by sending a %s to the GitHub repositories of your fellow package maintainers.', $love, $star));
$this->io->writeError('');
}

$this->io->writeError('');

if (!$recipes) {
$this->lock->write();

if ($this->downloader->isEnabled()) {
$this->io->writeError('Run <comment>composer recipes</> at any time to see the status of your Symfony recipes.');
$this->io->writeError('');
}

return;
}

Expand Down
5 changes: 4 additions & 1 deletion tests/FlexTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ public function testPostInstall()

$this->assertSame(
<<<EOF
Run composer recipes at any time to see the status of your Symfony recipes.
Symfony operations: 1 recipe ()
- Configuring dummy/dummy (>=1.0): From github.com/symfony/recipes:master
Expand Down Expand Up @@ -254,7 +257,7 @@ private function mockDownloader(array $recipes = []): Downloader
$downloader = $this->getMockBuilder(Downloader::class)->disableOriginalConstructor()->getMock();

$downloader->expects($this->once())->method('getRecipes')->willReturn($recipes);
$downloader->expects($this->once())->method('isEnabled')->willReturn(true);
$downloader->expects($this->exactly(2))->method('isEnabled')->willReturn(true);

return $downloader;
}
Expand Down

0 comments on commit eae35f1

Please sign in to comment.