diff --git a/src/Flex.php b/src/Flex.php index 3d4bff9f..afec54ae 100644 --- a/src/Flex.php +++ b/src/Flex.php @@ -600,6 +600,12 @@ public function finish(string $rootDir, ?string $originalComposerJsonHash = null private function synchronizePackageJson(string $rootDir) { + if (!$this->downloader->isEnabled()) { + $this->io->writeError('Synchronizing package.json is disabled: "symfony/flex" not found in the root composer.json'); + + return; + } + $rootDir = realpath($rootDir); $vendorDir = trim((new Filesystem())->makePathRelative($this->config->get('vendor-dir'), $rootDir), '/');