Convert VersionInfo into a final class

this allows it to be loaded by the autoloader without additional changes.
This commit is contained in:
Dylan K. Taylor
2020-07-25 19:00:48 +01:00
parent 5910905e95
commit 2645b19617
11 changed files with 45 additions and 45 deletions

View File

@ -23,16 +23,13 @@ declare(strict_types=1);
namespace pocketmine;
use function defined;
final class VersionInfo{
public const NAME = "PocketMine-MP";
public const BASE_VERSION = "4.0.0";
public const IS_DEVELOPMENT_BUILD = true;
public const BUILD_NUMBER = 0;
// composer autoload doesn't use require_once and also pthreads can inherit things
// TODO: drop this file and use a final class with constants
if(defined('pocketmine\_VERSION_INFO_INCLUDED')){
return;
private function __construct(){
//NOOP
}
}
const _VERSION_INFO_INCLUDED = true;
const NAME = "PocketMine-MP";
const BASE_VERSION = "4.0.0";
const IS_DEVELOPMENT_BUILD = true;
const BUILD_NUMBER = 0;