File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public static function subprocessProvider(): \Generator
4747 yield 'Process does ignore dynamic memory_limit ' => [
4848 'Process ' ,
4949 self ::getRandomMemoryLimit (),
50- self ::getCurrentMemoryLimit (),
50+ self ::getDefaultMemoryLimit (),
5151 ];
5252
5353 yield 'PhpSubprocess does not ignore dynamic memory_limit ' => [
@@ -57,16 +57,16 @@ public static function subprocessProvider(): \Generator
5757 ];
5858 }
5959
60- private static function getCurrentMemoryLimit (): string
60+ private static function getDefaultMemoryLimit (): string
6161 {
62- return trim (\ini_get ( 'memory_limit ' ) );
62+ return trim (ini_get_all ()[ 'memory_limit ' ][ ' global_value ' ] );
6363 }
6464
6565 private static function getRandomMemoryLimit (): string
6666 {
6767 $ memoryLimit = 123 ; // Take something that's really unlikely to be configured on a user system.
6868
69- while (($ formatted = $ memoryLimit .'M ' ) === self ::getCurrentMemoryLimit ()) {
69+ while (($ formatted = $ memoryLimit .'M ' ) === self ::getDefaultMemoryLimit ()) {
7070 ++$ memoryLimit ;
7171 }
7272
You can’t perform that action at this time.
0 commit comments