8000 Improve discoverability of 'composer recipes' · symfony/flex@eae35f1 · GitHub
[go: up one dir, main page]

Skip to content

Commit eae35f1

Browse files
maxheliasnicolas-grekas
authored andcommitted
Improve discoverability of 'composer recipes'
1 parent 967fb2d commit eae35f1

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
@@ -436,12 +436,18 @@ public function install(Event $event = null)
436436
$this->io->writeError('');
437437
$this->io->writeError('What about running <comment>composer global require symfony/thanks && composer thanks</> now?');
438438
$this->io->writeError(sprintf('This will spread some %s by sending a %s to the GitHub repositories of your fellow package maintainers.', $love, $star));
439-
$this->io->writeError('');
440439
}
441440

441+
$this->io->writeError('');
442+
442443
if (!$recipes) {
443444
$this->lock->write();
444445

446+
if ($this->downloader->isEnabled()) {
447+
$this->io->writeError('Run <comment>composer recipes</> at any time to see the status of your Symfony recipes.');
448+
$this->io->writeError('');
449+
}
450< D5D7 /td>+
445451
return;
446452
}
447453

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)
0