|
|
@@ -5,7 +5,6 @@ declare(strict_types=1);
|
|
|
namespace SixShop\Core;
|
|
|
|
|
|
use Composer\InstalledVersions;
|
|
|
-use RuntimeException;
|
|
|
|
|
|
class Plugin
|
|
|
{
|
|
|
@@ -23,9 +22,9 @@ class Plugin
|
|
|
}
|
|
|
$composerDir = dirname(InstalledVersions::getInstallPath('composer/composer'), 2);
|
|
|
$filePath = $composerDir . '/installedSixShop.php';
|
|
|
- if (file_exists($filePath)) {
|
|
|
- return self::$installedSixShopExtensions = require $filePath;
|
|
|
+ if (!file_exists($filePath)) {
|
|
|
+ require dirname(__DIR__) . '/bin/generate-installed-sixshop.php';
|
|
|
}
|
|
|
- throw new RuntimeException('Please run "composer dump-autoload" to generate installedSixShop.php');
|
|
|
+ return self::$installedSixShopExtensions = require $filePath;
|
|
|
}
|
|
|
}
|