From af86ca1fb3bde63ec351d78f431da5502318bc3f Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 1 Nov 2019 16:32:34 +0100 Subject: [PATCH 1/2] Output a hint that maybe you are not in the right directory, fixes #8404 --- src/Composer/Command/RequireCommand.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Composer/Command/RequireCommand.php b/src/Composer/Command/RequireCommand.php index 1fa280d3f..bb99fc310 100644 --- a/src/Composer/Command/RequireCommand.php +++ b/src/Composer/Command/RequireCommand.php @@ -139,7 +139,15 @@ EOT } $phpVersion = $this->repos->findPackage('php', '*')->getPrettyVersion(); - $requirements = $this->determineRequirements($input, $output, $input->getArgument('packages'), $phpVersion, $preferredStability, !$input->getOption('no-update')); + try { + $requirements = $this->determineRequirements($input, $output, $input->getArgument('packages'), $phpVersion, $preferredStability, !$input->getOption('no-update')); + } catch (\Exception $e) { + if ($this->newlyCreated) { + throw new \RuntimeException('No composer.json present in the current directory, this may be the cause of the following exception.', 0, $e); + } + + throw $e; + } $requireKey = $input->getOption('dev') ? 'require-dev' : 'require'; $removeKey = $input->getOption('dev') ? 'require' : 'require-dev'; From 1a797c16a0e641c91cfa201da72a59e0925da0c4 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 1 Nov 2019 16:40:30 +0100 Subject: [PATCH 2/2] Prepare 1.9.1 changelog --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15526d860..ade8d99cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +### [1.9.1] 2019-11-01 + + * Fixed various credential handling issues with gitlab and github + * Fixed credentials being present in git remotes in Composer cache and vendor directory when not using SSH keys + * Fixed `composer why` not listing replacers as a reason something is present + * Fixed various PHP 7.4 compatibility issues + * Fixed root warnings always present in Docker containers, setting COMPOSER_ALLOW_SUPERUSER is not necessary anymore + * Fixed GitHub access tokens leaking into debug-verbosity output + * Fixed several edge case issues detecting GitHub, Bitbucket and GitLab repository types + * Fixed Composer asking if you want to use a composer.json in a parent directory when ran in non-interactive mode + * Fixed classmap autoloading issue finding classes located within a few non-PHP context blocks (?>...