Skip to content

Commit

Permalink
Merge branch '6.4' into 7.0
Browse files Browse the repository at this point in the history
* 6.4:
  [FrameworkBundle] Add TemplateController to the list of allowed controllers for fragments
  [Cache][Lock] Fix PDO store not creating table + add tests
  Closes #51936-Added Missing translations for Czech (cs) in validators.cs.xlf file
  Added missing translations in turkish and updated validators.tr.xlf
  [Serializer] Fix denormalizing date intervals having both weeks and days
  [Validator] updated Turkish translation
  [Serializer] Remove wrong final tags
  [Serializer] Fix denormalize constructor arguments
  Add some more non-countable English nouns
  Add hint that changing input arguments has no effect
  register the virtual request stack together with common profiling services
  Don't lose checkpoint state when lock is acquired from another
  [DomCrawler] Revert "bug #52579 UriResolver support path with colons"
  [VarExporter] Fix handling mangled property names returned by __sleep()
  Update Github template for 7.1
  Fix memory limit in PhpSubprocess unit test
  • Loading branch information
nicolas-grekas committed Nov 20, 2023
2 parents 5610dee + 191703b commit 13bdb16
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Tests/PhpSubprocessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static function subprocessProvider(): \Generator
yield 'Process does ignore dynamic memory_limit' => [
'Process',
self::getRandomMemoryLimit(),
self::getCurrentMemoryLimit(),
self::getDefaultMemoryLimit(),
];

yield 'PhpSubprocess does not ignore dynamic memory_limit' => [
Expand All @@ -57,16 +57,16 @@ public static function subprocessProvider(): \Generator
];
}

private static function getCurrentMemoryLimit(): string
private static function getDefaultMemoryLimit(): string
{
return trim(\ini_get('memory_limit'));
return trim(ini_get_all()['memory_limit']['global_value']);
}

private static function getRandomMemoryLimit(): string
{
$memoryLimit = 123; // Take something that's really unlikely to be configured on a user system.

while (($formatted = $memoryLimit.'M') === self::getCurrentMemoryLimit()) {
while (($formatted = $memoryLimit.'M') === self::getDefaultMemoryLimit()) {
++$memoryLimit;
}

Expand Down

0 comments on commit 13bdb16

Please sign in to comment.