Skip to content

Commit 8ac05cf

Browse files
Tantrissesteevanb
authored andcommitted
Fix missing check for root preload key (and childs) in statistics json format
1 parent f276579 commit 8ac05cf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Command/Validate/Benchmark/ValidateBenchmarkStatisticsCommand.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ protected function afterHttpCodeValidated(
6767
(new OptionsResolver())
6868
->configureRequiredOption('memory', ['array'])
6969
->configureRequiredOption('code', ['array'])
70+
->configureRequiredOption('preload', ['array'])
7071
->resolve($statistics);
7172

7273
(new OptionsResolver())
@@ -83,6 +84,11 @@ protected function afterHttpCodeValidated(
8384
->configureRequiredOption('functions', ['int'])
8485
->configureRequiredOption('constants', ['int'])
8586
->resolve($statistics['code']);
87+
88+
(new OptionsResolver())
89+
->configureRequiredOption('memory', ['int', 'null'])
90+
->configureRequiredOption('files', ['int', 'null'])
91+
->resolve($statistics['preload']);
8692
} catch (\Throwable $exception) {
8793
throw new \Exception('Invalid statistics JSON file format.', 0, $exception);
8894
}

0 commit comments

Comments
 (0)