public static function GenerateAutoloadReferenceFile::autoloadFileCommitted in Drupal 9
Same name and namespace in other branches
- 8 composer/Plugin/Scaffold/GenerateAutoloadReferenceFile.php \Drupal\Composer\Plugin\Scaffold\GenerateAutoloadReferenceFile::autoloadFileCommitted()
- 10 composer/Plugin/Scaffold/GenerateAutoloadReferenceFile.php \Drupal\Composer\Plugin\Scaffold\GenerateAutoloadReferenceFile::autoloadFileCommitted()
Determines whether or not the autoload file has been committed.
Parameters
\Composer\IO\IOInterface $io: IOInterface to write to.
string $package_name: The name of the package defining the autoload file (the root package).
string $web_root: The path to the web root.
Return value
bool True if autoload.php file exists and has been committed to the repository
1 call to GenerateAutoloadReferenceFile::autoloadFileCommitted()
- Handler::scaffold in composer/
Plugin/ Scaffold/ Handler.php - Copies all scaffold files from source to destination.
File
- composer/
Plugin/ Scaffold/ GenerateAutoloadReferenceFile.php, line 64
Class
- GenerateAutoloadReferenceFile
- Generates an 'autoload.php' that includes the autoloader created by Composer.
Namespace
Drupal\Composer\Plugin\ScaffoldCode
public static function autoloadFileCommitted(IOInterface $io, $package_name, $web_root) {
$autoload_path = static::autoloadPath($package_name, $web_root);
$autoload_file = $autoload_path
->fullPath();
$location = dirname($autoload_file);
if (!file_exists($autoload_file)) {
return FALSE;
}
return Git::checkTracked($io, $autoload_file, $location);
}