来自Drupal:scafold文件生成器的摘录如下。
public function generateAutoload() {
$vendorPath = $this->getVendorPath();
$webroot = $this->getWebRoot();
// Calculate the relative path from the webroot (location of the
// project autoload.php) to the vendor directory.
$fs = new SymfonyFilesystem();
$relativeVendorPath = $fs->makePathRelative($vendorPath, realpath($webroot));
$fs->dumpFile($webroot . "/autoload.php", $this->autoLoadContents($relativeVendorPath));
}
为什么此$fs->dumpFile()
在创建autoload.php文件时不遵守umask值。这是同一期https://github.com/drupal-composer/drupal-scaffold/issues/98