Skip to content

Commit bee855c

Browse files
committed
Move setting 1G memory limit into executeBuild
1 parent e38d99d commit bee855c

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/Framework/Build/BuildTools.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use Throwable;
2020
use function count;
2121
use function fwrite;
22+
use function ini_set;
2223
use function is_array;
2324
use function sprintf;
2425
use function time;
@@ -56,6 +57,8 @@ public static function getReflectionClasses(): array
5657
*/
5758
public static function executeBuild(?LoggerInterface $logger = null): int
5859
{
60+
ini_set('memory_limit', '1G');
61+
5962
/** @var list<class-string<BuildStep>> $buildSteps */
6063
$buildSteps = [];
6164
foreach (BuildTools::parseClassHierarchy(ProjectGlobals::getProjectRoot() . '/src') as $class) {

src/Framework/Services/ServiceLocator.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ class ServiceLocator implements BuildStep
2626
{
2727
public static function build(BuildContext $context): void
2828
{
29-
ini_set('memory_limit', '1G');
30-
3129
// 1. Initialize the Standalone Container Builder
3230
$builder = new ContainerBuilder();
3331

0 commit comments

Comments
 (0)