Issue #3540215 by phenaproxima, catch, benjifisher, dww, poker10: Remove the...
Issue #3540215 by phenaproxima, catch, benjifisher, dww, poker10: Remove the ability to configure the path to Composer
(cherry picked from commit 7dd237cb)
@trigger_error("Storing the path to rsync in configuration is deprecated in drupal:11.2.4 and not supported in drupal:12.0.0. Move it to the <code>package_manager_rsync_path</code> setting instead. See https://www.drupal.org/node/3540264",E_USER_DEPRECATED);
return$legacy_executables[$name];
}
throw$e;
}
}
// If we're looking for Composer, use the project's local copy if available.
@trigger_error("Storing the path to Composer in configuration is deprecated in drupal:11.2.4 and not supported in drupal:12.0.0. Add composer/composer directly to your project's dependencies instead. See https://www.drupal.org/node/3540264",E_USER_DEPRECATED);
return$legacy_executables[$name];
}
throw$e;
}
}
return$this->decorated->find($name);
}
/**
* Tries to find the Composer binary installed in the project.
*
* @return string|null
* The path of the `composer` binary installed in the project's vendor
* dependencies, or NULL if it is not installed or cannot be found.
*/
privatefunctiongetLocalComposerPath():?string{
// Composer is not installed in the project, so there's nothing to do.
if($this->composerPackagePath===FALSE){
returnNULL;
}
// This is a bit expensive to compute, so statically cache it.
@@ -54,15 +54,15 @@ public function help($route_name) : ?string {
$output.=' <p>'.$this->t('Ask your system administrator to remove <code>proc_open()</code> from the <a href=":url">disable_functions</a> setting in <code>php.ini</code>.',[':url'=>'https://www.php.net/manual/en/ini.core.php#ini.disable-functions']).'</p>';
$output.=' </li>';
$output.=' <li>'.$this->t('What if it says the <code>composer</code> executable cannot be found?');
$output.=' <p>'.$this->t("If the <code>composer</code> executable's path cannot be automatically determined, it can be explicitly set by adding the following line to <code>settings.php</code>:").'</p>';
$output.=' <p>'.$this->t("If the <code>composer</code> executable's path cannot be automatically determined, you will need to add Composer to your project by running the following command: <code>composer require \"composer/composer:@version\"</code>:",[
'@version'=>ComposerInspector::SUPPORTED_VERSION,
]).'</p>';
$output.=' </li>';
$output.=' <li>'.$this->t('What if it says the detected version of Composer is not supported?');
$output.=' <p>'.$this->t('The version of the <code>composer</code> executable must satisfy <code>@version</code>. See the <a href=":url">the Composer documentation</a> for more information, or use this command to update Composer:',[
$output.=' <p>'.$this->t('The version of the <code>composer</code> executable must satisfy <code>@version</code>. See the <a href=":url">the Composer documentation</a> for more information, or use this command to add Composer to your project: <code>composer require "composer/composer:@version"</code>',[
$output.=' <li>'.$this->t('What if it says the <code>composer validate</code> command failed?');
$output.=' <p>'.$this->t('Composer detected problems with your <code>composer.json</code> and/or <code>composer.lock</code> files, and the project is not in a completely valid state. See <a href=":url">the Composer documentation</a> for more information.',[':url'=>'https://getcomposer.org/doc/04-schema.md']).'</p>';