From ad46983a0df596e397cd2088725038956c81b606 Mon Sep 17 00:00:00 2001 From: Wim Leers Date: Fri, 1 Sep 2023 18:25:06 +0200 Subject: [PATCH 1/2] PHP defaults to no user agent. (Drupal.org's) GitLab requires it. So: specify a user agent to make it happy. (#1587) --- src/Command/App/NewFromDrupal7Command.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Command/App/NewFromDrupal7Command.php b/src/Command/App/NewFromDrupal7Command.php index f9973fa9c..047bd1646 100644 --- a/src/Command/App/NewFromDrupal7Command.php +++ b/src/Command/App/NewFromDrupal7Command.php @@ -148,6 +148,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int return Command::FAILURE; } } + // PHP defaults to no user agent. (Drupal.org's) GitLab requires it. + // @see https://www.php.net/manual/en/filesystem.configuration.php#ini.user-agent + ini_set('user_agent', 'ACLI'); $recommendations_resource = fopen($recommendations_location, 'r'); $recommendations = Recommendations::createFromResource($recommendations_resource); fclose($recommendations_resource); From b2c681125f6acb5b493ba05ef8eb35d37f418727 Mon Sep 17 00:00:00 2001 From: Wim Leers Date: Fri, 1 Sep 2023 18:25:30 +0200 Subject: [PATCH 2/2] Make `acli app:new:from:drupal7` default to the latest AMA recommendations on d.o (#1588) * PHP defaults to no user agent. (Drupal.org's) GitLab requires it. So: specify a user agent to make it happy. * Default to using the latest AMA recommendations instead of the hardcoded MVP. --- src/Command/App/NewFromDrupal7Command.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Command/App/NewFromDrupal7Command.php b/src/Command/App/NewFromDrupal7Command.php index 047bd1646..ad1dabbc3 100644 --- a/src/Command/App/NewFromDrupal7Command.php +++ b/src/Command/App/NewFromDrupal7Command.php @@ -137,7 +137,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int fclose($config_resource); // Parse recommendations for project builder. - $recommendations_location = __DIR__ . '/../../../config/from_d7_recommendations.json'; + $recommendations_location = "https://git.drupalcode.org/project/acquia_migrate/-/raw/recommendations/recommendations.json"; if ($input->getOption('recommendations') !== NULL) { $raw_recommendations_location = $input->getOption('recommendations'); try {