function OxidInstaller::prepareVendorDirectory
Makes sure there is a vendormetadata.php file inside the vendor folder if there is a vendor folder.
1 call to OxidInstaller::prepareVendorDirectory()
- OxidInstaller::getInstallPath in vendor/
composer/ installers/ src/ Composer/ Installers/ OxidInstaller.php - Return the install path based on package type.
File
-
vendor/
composer/ installers/ src/ Composer/ Installers/ OxidInstaller.php, line 32
Class
Namespace
Composer\InstallersCode
protected function prepareVendorDirectory(string $installPath) : void {
$matches = '';
$hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches);
if (!$hasVendorDirectory) {
return;
}
$vendorDirectory = $matches['vendor'];
$vendorPath = getcwd() . '/modules/' . $vendorDirectory;
if (!file_exists($vendorPath)) {
mkdir($vendorPath, 0755, true);
}
$vendorMetaDataPath = $vendorPath . '/vendormetadata.php';
touch($vendorMetaDataPath);
}