From b1a7606e822365362e542292a8c93393f281909c Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 18 May 2018 18:47:12 +0100 Subject: [PATCH] PocketMine.php: Take dependency versions for granted Since this is managed by Composer now, it's expected that users should install dependencies appropriately when running from source code. We have a few more dependencies than just RakLib and SPL which are version-critical which are not checked here, and I don't have the taste for adding more version checks here. A better way would be to automatically detect outdated Composer autoloader and warn that dependencies might need updating, but I'm not sure how to do that off the hop. Users should prefer using prebuilt phars anyway - only developers and/or people who know what they are doing should be running the server from source code. --- src/pocketmine/PocketMine.php | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/pocketmine/PocketMine.php b/src/pocketmine/PocketMine.php index a64227bcc..9a9e8c21a 100644 --- a/src/pocketmine/PocketMine.php +++ b/src/pocketmine/PocketMine.php @@ -77,7 +77,6 @@ namespace pocketmine { use pocketmine\utils\Timezone; use pocketmine\utils\Utils; use pocketmine\wizard\SetupWizard; - use raklib\RakLib; const NAME = "PocketMine-MP"; const VERSION = "1.7dev"; @@ -199,16 +198,6 @@ namespace pocketmine { composer_error_die("Composer autoloader not found."); } - if(!class_exists(RakLib::class)){ - composer_error_die("Unable to find the RakLib library."); - } - if(version_compare(RakLib::VERSION, "0.11.0") < 0){ //TODO: remove this check (it's managed by Composer now) - composer_error_die("RakLib version 0.11.0 is required, while you have version " . RakLib::VERSION . "."); - } - if(!class_exists(\BaseClassLoader::class)){ - composer_error_die("Unable to find the PocketMine-SPL library."); - } - /* * We now use the Composer autoloader, but this autoloader is still for loading plugins. */