mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 04:17:07 +00:00
Merge branch 'stable'
This commit is contained in:
commit
9346ecdc39
@ -4,7 +4,6 @@ includes:
|
|||||||
- tests/phpstan/configs/impossible-generics.neon
|
- tests/phpstan/configs/impossible-generics.neon
|
||||||
- tests/phpstan/configs/php-bugs.neon
|
- tests/phpstan/configs/php-bugs.neon
|
||||||
- tests/phpstan/configs/phpstan-bugs.neon
|
- tests/phpstan/configs/phpstan-bugs.neon
|
||||||
- tests/phpstan/configs/pthreads-bugs.neon
|
|
||||||
- tests/phpstan/configs/runtime-type-checks.neon
|
- tests/phpstan/configs/runtime-type-checks.neon
|
||||||
- tests/phpstan/configs/spl-fixed-array-sucks.neon
|
- tests/phpstan/configs/spl-fixed-array-sucks.neon
|
||||||
- vendor/phpstan/phpstan-phpunit/extension.neon
|
- vendor/phpstan/phpstan-phpunit/extension.neon
|
||||||
|
@ -352,35 +352,33 @@ class MemoryManager{
|
|||||||
file_put_contents(Path::join($outputFolder, "staticProperties.js"), json_encode($staticProperties, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT));
|
file_put_contents(Path::join($outputFolder, "staticProperties.js"), json_encode($staticProperties, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT));
|
||||||
$logger->info("Wrote $staticCount static properties");
|
$logger->info("Wrote $staticCount static properties");
|
||||||
|
|
||||||
if(isset($GLOBALS)){ //This might be null if we're on a different thread
|
$globalVariables = [];
|
||||||
$globalVariables = [];
|
$globalCount = 0;
|
||||||
$globalCount = 0;
|
|
||||||
|
|
||||||
$ignoredGlobals = [
|
$ignoredGlobals = [
|
||||||
'GLOBALS' => true,
|
'GLOBALS' => true,
|
||||||
'_SERVER' => true,
|
'_SERVER' => true,
|
||||||
'_REQUEST' => true,
|
'_REQUEST' => true,
|
||||||
'_POST' => true,
|
'_POST' => true,
|
||||||
'_GET' => true,
|
'_GET' => true,
|
||||||
'_FILES' => true,
|
'_FILES' => true,
|
||||||
'_ENV' => true,
|
'_ENV' => true,
|
||||||
'_COOKIE' => true,
|
'_COOKIE' => true,
|
||||||
'_SESSION' => true
|
'_SESSION' => true
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach(Utils::stringifyKeys($GLOBALS) as $varName => $value){
|
foreach(Utils::stringifyKeys($GLOBALS) as $varName => $value){
|
||||||
if(isset($ignoredGlobals[$varName])){
|
if(isset($ignoredGlobals[$varName])){
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
$globalCount++;
|
|
||||||
$globalVariables[$varName] = self::continueDump($value, $objects, $refCounts, 0, $maxNesting, $maxStringSize);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
file_put_contents(Path::join($outputFolder, "globalVariables.js"), json_encode($globalVariables, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT));
|
$globalCount++;
|
||||||
$logger->info("Wrote $globalCount global variables");
|
$globalVariables[$varName] = self::continueDump($value, $objects, $refCounts, 0, $maxNesting, $maxStringSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file_put_contents(Path::join($outputFolder, "globalVariables.js"), json_encode($globalVariables, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT));
|
||||||
|
$logger->info("Wrote $globalCount global variables");
|
||||||
|
|
||||||
foreach(get_defined_functions()["user"] as $function){
|
foreach(get_defined_functions()["user"] as $function){
|
||||||
$reflect = new \ReflectionFunction($function);
|
$reflect = new \ReflectionFunction($function);
|
||||||
|
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
parameters:
|
|
||||||
ignoreErrors:
|
|
||||||
-
|
|
||||||
message: "#^Variable \\$GLOBALS in isset\\(\\) always exists and is not nullable\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: ../../../src/MemoryManager.php
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user