mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Make sure COMPOSER_AUTOLOADER_PATH is always declared
Sacrifice dynamic composer autoloader path to do this, because we don't need it anyway - it was a misconceived feature from the days when I used the same workspace for PM3 and PM4 both.
This commit is contained in:
parent
f5266ec816
commit
54174eefa0
@ -35,3 +35,4 @@ define('pocketmine\_CORE_CONSTANTS_INCLUDED', true);
|
||||
|
||||
define('pocketmine\PATH', dirname(__DIR__) . '/');
|
||||
define('pocketmine\RESOURCE_PATH', dirname(__DIR__) . '/resources/');
|
||||
define('pocketmine\COMPOSER_AUTOLOADER_PATH', dirname(__DIR__) . '/vendor/autoload.php');
|
||||
|
@ -214,20 +214,13 @@ JIT_WARNING
|
||||
error_reporting(-1);
|
||||
set_ini_entries();
|
||||
|
||||
$opts = getopt("", ["bootstrap:"]);
|
||||
if(isset($opts["bootstrap"])){
|
||||
$bootstrap = ($real = realpath($opts["bootstrap"])) !== false ? $real : $opts["bootstrap"];
|
||||
}else{
|
||||
$bootstrap = dirname(__FILE__, 2) . '/vendor/autoload.php';
|
||||
}
|
||||
|
||||
if($bootstrap === false or !is_file($bootstrap)){
|
||||
$bootstrap = dirname(__FILE__, 2) . '/vendor/autoload.php';
|
||||
if(!is_file($bootstrap)){
|
||||
critical_error("Composer autoloader not found at " . $bootstrap);
|
||||
critical_error("Please install/update Composer dependencies or use provided builds.");
|
||||
exit(1);
|
||||
}
|
||||
define('pocketmine\COMPOSER_AUTOLOADER_PATH', $bootstrap);
|
||||
require_once(\pocketmine\COMPOSER_AUTOLOADER_PATH);
|
||||
require_once($bootstrap);
|
||||
|
||||
$composerGitHash = InstalledVersions::getReference('pocketmine/pocketmine-mp');
|
||||
if($composerGitHash !== null){
|
||||
|
Loading…
x
Reference in New Issue
Block a user