Skip to content

Commit 7c145ec

Browse files
committed
Do not configure project if Flex is not explicitly required
1 parent 955774e commit 7c145ec

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Flex.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,12 @@ public function activate(Composer $composer, IOInterface $io)
239239

240240
public function configureProject(Event $event)
241241
{
242+
if (null === $this->downloader->getEndpoint()) {
243+
$this->io->writeError('<warning>Project configuration is disabled: "symfony/flex" not found in the root composer.json</warning>');
244+
245+
return;
246+
}
247+
242248
$json = new JsonFile(Factory::getComposerFile());
243249
$contents = file_get_contents($json->getPath());
244250
$manipulator = new JsonManipulator($contents);

0 commit comments

Comments
 (0)