@@ -26,9 +26,9 @@ |
||
| 26 | 26 | class BitrixInstaller extends BaseInstaller |
| 27 | 27 | { |
| 28 | 28 | protected $locations = array( |
| 29 | - 'module' => '{$bitrix_dir}/modules/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken) |
|
| 29 | + 'module' => '{$bitrix_dir}/modules/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken) |
|
| 30 | 30 | 'component' => '{$bitrix_dir}/components/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken) |
| 31 | - 'theme' => '{$bitrix_dir}/templates/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken) |
|
| 31 | + 'theme' => '{$bitrix_dir}/templates/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken) |
|
| 32 | 32 | 'd7-module' => '{$bitrix_dir}/modules/{$vendor}.{$name}/', |
| 33 | 33 | 'd7-component' => '{$bitrix_dir}/components/{$vendor}/{$name}/', |
| 34 | 34 | 'd7-template' => '{$bitrix_dir}/templates/{$vendor}_{$name}/', |
@@ -5,7 +5,7 @@ discard block |
||
| 5 | 5 | |
| 6 | 6 | class OxidInstaller extends BaseInstaller |
| 7 | 7 | { |
| 8 | - const VENDOR_PATTERN = '/^modules\/(?P<vendor>.+)\/.+/'; |
|
| 8 | + const VENDOR_PATTERN = '/^modules\/(?P<vendor>.+)\/.+/'; |
|
| 9 | 9 | |
| 10 | 10 | protected $locations = array( |
| 11 | 11 | 'module' => 'modules/{$name}/', |
@@ -13,47 +13,47 @@ discard block |
||
| 13 | 13 | 'out' => 'out/{$name}/', |
| 14 | 14 | ); |
| 15 | 15 | |
| 16 | - /** |
|
| 17 | - * getInstallPath |
|
| 18 | - * |
|
| 19 | - * @param PackageInterface $package |
|
| 20 | - * @param string $frameworkType |
|
| 21 | - * @return string |
|
| 22 | - */ |
|
| 23 | - public function getInstallPath(PackageInterface $package, $frameworkType = '') |
|
| 24 | - { |
|
| 25 | - $installPath = parent::getInstallPath($package, $frameworkType); |
|
| 26 | - $type = $this->package->getType(); |
|
| 27 | - if ($type === 'oxid-module') { |
|
| 28 | - $this->prepareVendorDirectory($installPath); |
|
| 29 | - } |
|
| 30 | - return $installPath; |
|
| 31 | - } |
|
| 16 | + /** |
|
| 17 | + * getInstallPath |
|
| 18 | + * |
|
| 19 | + * @param PackageInterface $package |
|
| 20 | + * @param string $frameworkType |
|
| 21 | + * @return string |
|
| 22 | + */ |
|
| 23 | + public function getInstallPath(PackageInterface $package, $frameworkType = '') |
|
| 24 | + { |
|
| 25 | + $installPath = parent::getInstallPath($package, $frameworkType); |
|
| 26 | + $type = $this->package->getType(); |
|
| 27 | + if ($type === 'oxid-module') { |
|
| 28 | + $this->prepareVendorDirectory($installPath); |
|
| 29 | + } |
|
| 30 | + return $installPath; |
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * prepareVendorDirectory |
|
| 35 | - * |
|
| 36 | - * Makes sure there is a vendormetadata.php file inside |
|
| 37 | - * the vendor folder if there is a vendor folder. |
|
| 38 | - * |
|
| 39 | - * @param string $installPath |
|
| 40 | - * @return void |
|
| 41 | - */ |
|
| 42 | - protected function prepareVendorDirectory($installPath) |
|
| 43 | - { |
|
| 44 | - $matches = ''; |
|
| 45 | - $hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches); |
|
| 46 | - if (!$hasVendorDirectory) { |
|
| 47 | - return; |
|
| 48 | - } |
|
| 33 | + /** |
|
| 34 | + * prepareVendorDirectory |
|
| 35 | + * |
|
| 36 | + * Makes sure there is a vendormetadata.php file inside |
|
| 37 | + * the vendor folder if there is a vendor folder. |
|
| 38 | + * |
|
| 39 | + * @param string $installPath |
|
| 40 | + * @return void |
|
| 41 | + */ |
|
| 42 | + protected function prepareVendorDirectory($installPath) |
|
| 43 | + { |
|
| 44 | + $matches = ''; |
|
| 45 | + $hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches); |
|
| 46 | + if (!$hasVendorDirectory) { |
|
| 47 | + return; |
|
| 48 | + } |
|
| 49 | 49 | |
| 50 | - $vendorDirectory = $matches['vendor']; |
|
| 51 | - $vendorPath = getcwd() . '/modules/' . $vendorDirectory; |
|
| 52 | - if (!file_exists($vendorPath)) { |
|
| 53 | - mkdir($vendorPath, 0755, true); |
|
| 54 | - } |
|
| 50 | + $vendorDirectory = $matches['vendor']; |
|
| 51 | + $vendorPath = getcwd() . '/modules/' . $vendorDirectory; |
|
| 52 | + if (!file_exists($vendorPath)) { |
|
| 53 | + mkdir($vendorPath, 0755, true); |
|
| 54 | + } |
|
| 55 | 55 | |
| 56 | - $vendorMetaDataPath = $vendorPath . '/vendormetadata.php'; |
|
| 57 | - touch($vendorMetaDataPath); |
|
| 58 | - } |
|
| 56 | + $vendorMetaDataPath = $vendorPath . '/vendormetadata.php'; |
|
| 57 | + touch($vendorMetaDataPath); |
|
| 58 | + } |
|
| 59 | 59 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | public function getLocations() |
| 37 | 37 | { |
| 38 | 38 | if ($this->matchesCakeVersion('>=', '3.0.0')) { |
| 39 | - $this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/'; |
|
| 39 | + $this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/'; |
|
| 40 | 40 | } |
| 41 | 41 | return $this->locations; |
| 42 | 42 | } |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | protected function matchesCakeVersion($matcher, $version) |
| 53 | 53 | { |
| 54 | 54 | $repositoryManager = $this->composer->getRepositoryManager(); |
| 55 | - if (! $repositoryManager) { |
|
| 55 | + if (!$repositoryManager) { |
|
| 56 | 56 | return false; |
| 57 | 57 | } |
| 58 | 58 | |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | { |
| 170 | 170 | $installPath = $this->getPackageBasePath($package); |
| 171 | 171 | $io = $this->io; |
| 172 | - $outputStatus = function () use ($io, $installPath) { |
|
| 172 | + $outputStatus = function() use ($io, $installPath) { |
|
| 173 | 173 | $io->write(sprintf('Deleting %s - %s', $installPath, !file_exists($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>')); |
| 174 | 174 | }; |
| 175 | 175 | |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | $pattern = $locations ? '(' . implode('|', $locations) . ')' : false; |
| 240 | 240 | } |
| 241 | 241 | |
| 242 | - return $pattern ? : '(\w+)'; |
|
| 242 | + return $pattern ?: '(\w+)'; |
|
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | /** |
@@ -6,8 +6,8 @@ |
||
| 6 | 6 | } |
| 7 | 7 | } |
| 8 | 8 | if ((!$loader = includeIfExists(__DIR__ . '/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__ . '/../../../autoload.php'))) { |
| 9 | - die('You must set up the project dependencies, run the following commands:'.PHP_EOL. |
|
| 10 | - 'curl -s http://getcomposer.org/installer | php'.PHP_EOL. |
|
| 11 | - 'php composer.phar install'.PHP_EOL); |
|
| 9 | + die('You must set up the project dependencies, run the following commands:' . PHP_EOL . |
|
| 10 | + 'curl -s http://getcomposer.org/installer | php' . PHP_EOL . |
|
| 11 | + 'php composer.phar install' . PHP_EOL); |
|
| 12 | 12 | } |
| 13 | 13 | return $loader; |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | return false; |
| 451 | 451 | } |
| 452 | 452 | if (null !== $this->apcuPrefix) { |
| 453 | - $file = apcu_fetch($this->apcuPrefix.$class, $hit); |
|
| 453 | + $file = apcu_fetch($this->apcuPrefix . $class, $hit); |
|
| 454 | 454 | if ($hit) { |
| 455 | 455 | return $file; |
| 456 | 456 | } |
@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | } |
| 465 | 465 | |
| 466 | 466 | if (null !== $this->apcuPrefix) { |
| 467 | - apcu_add($this->apcuPrefix.$class, $file); |
|
| 467 | + apcu_add($this->apcuPrefix . $class, $file); |
|
| 468 | 468 | } |
| 469 | 469 | |
| 470 | 470 | if (false === $file) { |
@@ -6,8 +6,8 @@ |
||
| 6 | 6 | $baseDir = dirname($vendorDir); |
| 7 | 7 | |
| 8 | 8 | return array( |
| 9 | - 'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => array( |
|
| 10 | - 'version' => '2.10.7.0', |
|
| 11 | - 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php' |
|
| 12 | - ), |
|
| 9 | + 'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => array( |
|
| 10 | + 'version' => '2.10.7.0', |
|
| 11 | + 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php' |
|
| 12 | + ), |
|
| 13 | 13 | ); |
@@ -25,8 +25,8 @@ discard block |
||
| 25 | 25 | class InstalledVersions |
| 26 | 26 | { |
| 27 | 27 | private static $installed = array ( |
| 28 | - 'root' => |
|
| 29 | - array ( |
|
| 28 | + 'root' => |
|
| 29 | + array ( |
|
| 30 | 30 | 'pretty_version' => 'dev-trunk', |
| 31 | 31 | 'version' => 'dev-trunk', |
| 32 | 32 | 'aliases' => |
@@ -34,51 +34,51 @@ discard block |
||
| 34 | 34 | ), |
| 35 | 35 | 'reference' => '5cc9182a7c1e8991839ea1600607c242e6738991', |
| 36 | 36 | 'name' => 'woocommerce/woocommerce-blocks', |
| 37 | - ), |
|
| 38 | - 'versions' => |
|
| 39 | - array ( |
|
| 37 | + ), |
|
| 38 | + 'versions' => |
|
| 39 | + array ( |
|
| 40 | 40 | 'automattic/jetpack-autoloader' => |
| 41 | 41 | array ( |
| 42 | - 'pretty_version' => 'v2.10.7', |
|
| 43 | - 'version' => '2.10.7.0', |
|
| 44 | - 'aliases' => |
|
| 45 | - array ( |
|
| 46 | - ), |
|
| 47 | - 'reference' => 'e3dfa1a2679e4b8e380bc37b722081875c84a381', |
|
| 42 | + 'pretty_version' => 'v2.10.7', |
|
| 43 | + 'version' => '2.10.7.0', |
|
| 44 | + 'aliases' => |
|
| 45 | + array ( |
|
| 46 | + ), |
|
| 47 | + 'reference' => 'e3dfa1a2679e4b8e380bc37b722081875c84a381', |
|
| 48 | 48 | ), |
| 49 | 49 | 'composer/installers' => |
| 50 | 50 | array ( |
| 51 | - 'pretty_version' => 'v1.12.0', |
|
| 52 | - 'version' => '1.12.0.0', |
|
| 53 | - 'aliases' => |
|
| 54 | - array ( |
|
| 55 | - ), |
|
| 56 | - 'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19', |
|
| 51 | + 'pretty_version' => 'v1.12.0', |
|
| 52 | + 'version' => '1.12.0.0', |
|
| 53 | + 'aliases' => |
|
| 54 | + array ( |
|
| 55 | + ), |
|
| 56 | + 'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19', |
|
| 57 | 57 | ), |
| 58 | 58 | 'roundcube/plugin-installer' => |
| 59 | 59 | array ( |
| 60 | - 'replaced' => |
|
| 61 | - array ( |
|
| 60 | + 'replaced' => |
|
| 61 | + array ( |
|
| 62 | 62 | 0 => '*', |
| 63 | - ), |
|
| 63 | + ), |
|
| 64 | 64 | ), |
| 65 | 65 | 'shama/baton' => |
| 66 | 66 | array ( |
| 67 | - 'replaced' => |
|
| 68 | - array ( |
|
| 67 | + 'replaced' => |
|
| 68 | + array ( |
|
| 69 | 69 | 0 => '*', |
| 70 | - ), |
|
| 70 | + ), |
|
| 71 | 71 | ), |
| 72 | 72 | 'woocommerce/woocommerce-blocks' => |
| 73 | 73 | array ( |
| 74 | - 'pretty_version' => 'dev-trunk', |
|
| 75 | - 'version' => 'dev-trunk', |
|
| 76 | - 'aliases' => |
|
| 77 | - array ( |
|
| 78 | - ), |
|
| 79 | - 'reference' => '5cc9182a7c1e8991839ea1600607c242e6738991', |
|
| 74 | + 'pretty_version' => 'dev-trunk', |
|
| 75 | + 'version' => 'dev-trunk', |
|
| 76 | + 'aliases' => |
|
| 77 | + array ( |
|
| 78 | + ), |
|
| 79 | + 'reference' => '5cc9182a7c1e8991839ea1600607c242e6738991', |
|
| 80 | + ), |
|
| 80 | 81 | ), |
| 81 | - ), |
|
| 82 | 82 | ); |
| 83 | 83 | private static $canGetVendors; |
| 84 | 84 | private static $installedByVendor = array(); |
@@ -24,57 +24,57 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | class InstalledVersions |
| 26 | 26 | { |
| 27 | -private static $installed = array ( |
|
| 27 | +private static $installed = array( |
|
| 28 | 28 | 'root' => |
| 29 | - array ( |
|
| 29 | + array( |
|
| 30 | 30 | 'pretty_version' => 'dev-trunk', |
| 31 | 31 | 'version' => 'dev-trunk', |
| 32 | 32 | 'aliases' => |
| 33 | - array ( |
|
| 33 | + array( |
|
| 34 | 34 | ), |
| 35 | 35 | 'reference' => '5cc9182a7c1e8991839ea1600607c242e6738991', |
| 36 | 36 | 'name' => 'woocommerce/woocommerce-blocks', |
| 37 | 37 | ), |
| 38 | 38 | 'versions' => |
| 39 | - array ( |
|
| 39 | + array( |
|
| 40 | 40 | 'automattic/jetpack-autoloader' => |
| 41 | - array ( |
|
| 41 | + array( |
|
| 42 | 42 | 'pretty_version' => 'v2.10.7', |
| 43 | 43 | 'version' => '2.10.7.0', |
| 44 | 44 | 'aliases' => |
| 45 | - array ( |
|
| 45 | + array( |
|
| 46 | 46 | ), |
| 47 | 47 | 'reference' => 'e3dfa1a2679e4b8e380bc37b722081875c84a381', |
| 48 | 48 | ), |
| 49 | 49 | 'composer/installers' => |
| 50 | - array ( |
|
| 50 | + array( |
|
| 51 | 51 | 'pretty_version' => 'v1.12.0', |
| 52 | 52 | 'version' => '1.12.0.0', |
| 53 | 53 | 'aliases' => |
| 54 | - array ( |
|
| 54 | + array( |
|
| 55 | 55 | ), |
| 56 | 56 | 'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19', |
| 57 | 57 | ), |
| 58 | 58 | 'roundcube/plugin-installer' => |
| 59 | - array ( |
|
| 59 | + array( |
|
| 60 | 60 | 'replaced' => |
| 61 | - array ( |
|
| 61 | + array( |
|
| 62 | 62 | 0 => '*', |
| 63 | 63 | ), |
| 64 | 64 | ), |
| 65 | 65 | 'shama/baton' => |
| 66 | - array ( |
|
| 66 | + array( |
|
| 67 | 67 | 'replaced' => |
| 68 | - array ( |
|
| 68 | + array( |
|
| 69 | 69 | 0 => '*', |
| 70 | 70 | ), |
| 71 | 71 | ), |
| 72 | 72 | 'woocommerce/woocommerce-blocks' => |
| 73 | - array ( |
|
| 73 | + array( |
|
| 74 | 74 | 'pretty_version' => 'dev-trunk', |
| 75 | 75 | 'version' => 'dev-trunk', |
| 76 | 76 | 'aliases' => |
| 77 | - array ( |
|
| 77 | + array( |
|
| 78 | 78 | ), |
| 79 | 79 | 'reference' => '5cc9182a7c1e8991839ea1600607c242e6738991', |
| 80 | 80 | ), |
@@ -318,8 +318,8 @@ discard block |
||
| 318 | 318 | foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { |
| 319 | 319 | if (isset(self::$installedByVendor[$vendorDir])) { |
| 320 | 320 | $installed[] = self::$installedByVendor[$vendorDir]; |
| 321 | -} elseif (is_file($vendorDir.'/composer/installed.php')) { |
|
| 322 | -$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; |
|
| 321 | +} elseif (is_file($vendorDir . '/composer/installed.php')) { |
|
| 322 | +$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir . '/composer/installed.php'; |
|
| 323 | 323 | } |
| 324 | 324 | } |
| 325 | 325 | } |
@@ -6,18 +6,18 @@ discard block |
||
| 6 | 6 | |
| 7 | 7 | class ComposerStaticInit526c9128fcc85a1cd942451999a66eb0 |
| 8 | 8 | { |
| 9 | - public static $files = array ( |
|
| 9 | + public static $files = array( |
|
| 10 | 10 | 'fcd5d7d87e03ff4f5b5a66c2b8968671' => __DIR__ . '/../..' . '/src/StoreApi/deprecated.php', |
| 11 | 11 | 'd0f16a186498c2ba04f1d0064fecf9cf' => __DIR__ . '/../..' . '/src/StoreApi/functions.php', |
| 12 | 12 | ); |
| 13 | 13 | |
| 14 | - public static $prefixLengthsPsr4 = array ( |
|
| 14 | + public static $prefixLengthsPsr4 = array( |
|
| 15 | 15 | 'C' => |
| 16 | - array ( |
|
| 16 | + array( |
|
| 17 | 17 | 'Composer\\Installers\\' => 20, |
| 18 | 18 | ), |
| 19 | 19 | 'A' => |
| 20 | - array ( |
|
| 20 | + array( |
|
| 21 | 21 | 'Automattic\\WooCommerce\\StoreApi\\' => 32, |
| 22 | 22 | 'Automattic\\WooCommerce\\Blocks\\Tests\\' => 36, |
| 23 | 23 | 'Automattic\\WooCommerce\\Blocks\\' => 30, |
@@ -25,37 +25,37 @@ discard block |
||
| 25 | 25 | ), |
| 26 | 26 | ); |
| 27 | 27 | |
| 28 | - public static $prefixDirsPsr4 = array ( |
|
| 28 | + public static $prefixDirsPsr4 = array( |
|
| 29 | 29 | 'Composer\\Installers\\' => |
| 30 | - array ( |
|
| 30 | + array( |
|
| 31 | 31 | 0 => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers', |
| 32 | 32 | ), |
| 33 | 33 | 'Automattic\\WooCommerce\\StoreApi\\' => |
| 34 | - array ( |
|
| 34 | + array( |
|
| 35 | 35 | 0 => __DIR__ . '/../..' . '/src/StoreApi', |
| 36 | 36 | ), |
| 37 | 37 | 'Automattic\\WooCommerce\\Blocks\\Tests\\' => |
| 38 | - array ( |
|
| 38 | + array( |
|
| 39 | 39 | 0 => __DIR__ . '/../..' . '/tests/php', |
| 40 | 40 | ), |
| 41 | 41 | 'Automattic\\WooCommerce\\Blocks\\' => |
| 42 | - array ( |
|
| 42 | + array( |
|
| 43 | 43 | 0 => __DIR__ . '/../..' . '/src', |
| 44 | 44 | ), |
| 45 | 45 | 'Automattic\\Jetpack\\Autoloader\\' => |
| 46 | - array ( |
|
| 46 | + array( |
|
| 47 | 47 | 0 => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src', |
| 48 | 48 | ), |
| 49 | 49 | ); |
| 50 | 50 | |
| 51 | - public static $classMap = array ( |
|
| 51 | + public static $classMap = array( |
|
| 52 | 52 | 'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php', |
| 53 | 53 | 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
| 54 | 54 | ); |
| 55 | 55 | |
| 56 | 56 | public static function getInitializer(ClassLoader $loader) |
| 57 | 57 | { |
| 58 | - return \Closure::bind(function () use ($loader) { |
|
| 58 | + return \Closure::bind(function() use ($loader) { |
|
| 59 | 59 | $loader->prefixLengthsPsr4 = ComposerStaticInit526c9128fcc85a1cd942451999a66eb0::$prefixLengthsPsr4; |
| 60 | 60 | $loader->prefixDirsPsr4 = ComposerStaticInit526c9128fcc85a1cd942451999a66eb0::$prefixDirsPsr4; |
| 61 | 61 | $loader->classMap = ComposerStaticInit526c9128fcc85a1cd942451999a66eb0::$classMap; |