Skip to content

Commit 0f31903

Browse files
steevanbphpbenchmarks
authored andcommitted
Change phpbenchmarks/benchmark-json-serialization-hello-world dependency name
1 parent 8ff3984 commit 0f31903

File tree

4 files changed

+20
-16
lines changed

4 files changed

+20
-16
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
.idea/
2-
vendor/
3-
composer.lock
1+
/.idea/
2+
/vendor/
3+
/composer.lock

.phpbenchmarks/composer.lock.php7.3

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
"require": {
66
"php": "7.3.*",
77
"ext-json": "*",
8-
"phpbenchmarks/benchmark-json-serializer-hello-world": "1.0.0"
8+
"phpbenchmarks/benchmark-json-serialization-hello-world": "1.0.0"
99
}
1010
}

public/index.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22

33
declare(strict_types=1);
44

5-
if ($_GET['phpBenchmarksShowResults'] ?? null === '1') {
6-
echo json_encode(['Hello World !']);
5+
require __DIR__ . '/../vendor/autoload.php';
6+
7+
use PhpBenchmarks\BenchmarkJsonSerializationHelloWorld\BenchmarkService;
8+
9+
if (BenchmarkService::isWriteToResponseBody()) {
10+
echo json_encode(BenchmarkService::getDataToSerialize());
711
} else {
8-
json_encode(['Hello World !']);
12+
json_encode(BenchmarkService::getDataToSerialize());
913
}
1014

1115
// require phpbenchmarks stats.php here when needed

0 commit comments

Comments
 (0)