mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-26 19:04:40 +01:00
Improve phar stub
This commit is contained in:
parent
3d51d036b4
commit
3dd6aac260
2
docs
2
docs
@ -1 +1 @@
|
|||||||
Subproject commit 8a319f4642fc699965833ac98f270ff92bccc9ee
|
Subproject commit 422f5aa4f6c2cec63663d5b82f383113b4fab80f
|
2
schemas
2
schemas
@ -1 +1 @@
|
|||||||
Subproject commit 424aaa1cad6da9b0266605fc3b6a11e7702cfda3
|
Subproject commit 86b054b6f2790f42dfeeb033fa8f2288657ab3d9
|
@ -30,12 +30,16 @@ if (PHP_INT_SIZE < 8) {
|
|||||||
die("A 64-bit build of PHP is required to run MadelineProto, PHP 8.2 is required.".PHP_EOL);
|
die("A 64-bit build of PHP is required to run MadelineProto, PHP 8.2 is required.".PHP_EOL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (\extension_loaded("psr")) {
|
||||||
|
die("Please uninstall the psr extension to use MadelineProto!");
|
||||||
|
}
|
||||||
|
|
||||||
if (\defined("MADELINE_PHAR")) {
|
if (\defined("MADELINE_PHAR")) {
|
||||||
throw new \Exception("Please do not include madeline.phar twice, use require_once \'madeline.phar\';!");
|
die("Please do not include madeline.phar twice, use require_once \'madeline.phar\';!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!\defined(\'MADELINE_ALLOW_COMPOSER\') && \class_exists(\Composer\Autoload\ClassLoader::class)) {
|
if (!\defined(\'MADELINE_ALLOW_COMPOSER\') && \class_exists(\Composer\Autoload\ClassLoader::class)) {
|
||||||
throw new \Exception(\'Composer autoloader detected: madeline.phar is incompatible with Composer, please install MadelineProto using composer: https://docs.madelineproto.xyz/docs/INSTALLATION.html#composer-from-existing-project\');
|
die(\'Composer autoloader detected: madeline.phar is incompatible with Composer, please install MadelineProto using composer: https://docs.madelineproto.xyz/docs/INSTALLATION.html#composer-from-existing-project\');
|
||||||
}
|
}
|
||||||
|
|
||||||
\define(\'MADELINE_PHAR\', __FILE__);
|
\define(\'MADELINE_PHAR\', __FILE__);
|
||||||
|
Loading…
Reference in New Issue
Block a user