Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. GenerateAutoloadReferenceFile.php

function 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\Scaffold

Code

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);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal