Skip to content

Commit daa5ab6

Browse files
minor #633 Improve discoverability of 'composer recipes' (maxhelias)
This PR was merged into the 1.8-dev branch. Discussion ---------- Improve discoverability of 'composer recipes' Discovering the `composer recipes` command during composer install/update Fix issue #629 and move forward #518 - 8) ![Capture d’écran 2020-06-15 à 17 05 28](https://user-images.githubusercontent.com/12966574/84673799-77b41800-af2a-11ea-9a64-751aa78fde83.png) Commits ------- eae35f1 Improve discoverability of 'composer recipes'
2 parents e532411 + eae35f1 commit daa5ab6

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/Flex.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,12 +473,18 @@ public function install(Event $event = null)
473473
$this->io->writeError('');
474474
$this->io->writeError('What about running <comment>composer global require symfony/thanks && composer thanks</> now?');
475475
$this->io->writeError(sprintf('This will spread some %s by sending a %s to the GitHub repositories of your fellow package maintainers.', $love, $star));
476-
$this->io->writeError('');
477476
}
478477

478+
$this->io->writeError('');
479+
479480
if (!$recipes) {
480481
$this->lock->write();
481482

483+
if ($this->downloader->isEnabled()) {
484+
$this->io->writeError('Run <comment>composer recipes</> at any time to see the status of your Symfony recipes.');
485+
$this->io->writeError('');
486+
}
487+
482488
return;
483489
}
484490

tests/FlexTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ public function testPostInstall()
8484

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

256259
$downloader->expects($this->once())->method('getRecipes')->willReturn($recipes);
257-
$downloader->expects($this->once())->method('isEnabled')->willReturn(true);
260+
$downloader->expects($this->exactly(2))->method('isEnabled')->willReturn(true);
258261

259262
return $downloader;
260263
}

0 commit comments

Comments
 (0)