Skip to content

Commit 2f88bf5

Browse files
committed
Create Hello world benchmark
1 parent 4548099 commit 2f88bf5

File tree

18 files changed

+1493
-209
lines changed

18 files changed

+1493
-209
lines changed

.env.dist

Lines changed: 0 additions & 10 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea/
2+
composer.lock
23

34
###> symfony/framework-bundle ###
45
/.env

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<p align="center">
2+
<img src="http://www.phpbenchmarks.com/images/logo_github.png">
3+
<br>
4+
<a href="http://www.phpbenchmarks.com" target="_blank">www.phpbenchmarks.com</a>
5+
</p>
6+
7+
## What is www.phpbenchmarks.com ?
8+
9+
You will find lot of benchmarks for PHP frameworks and template engines.
10+
11+
You can compare results between Apache Bench and Siege, and PHP 5.6 to 7.2.
12+
13+
## What is this repository ?
14+
15+
It's benchmark common code for Symfony benchmarks.
16+
17+
Switch branch to select your Symfony major version and benchmark you want to see.
18+
19+
See all Symfony benchmarked versions on [phpbenchmarks/symfony](https://github.com/phpbenchmarks/symfony).
20+
21+
You can find how we benchmark on [phpbenchmarks.com](http://www.phpbenchmarks.com/en/benchmark-protocol.html).
22+
23+
## Benchmarks
24+
25+
You can find all Symfony benchmarks results on [phpbenchmarks.com](http://www.phpbenchmarks.com/en/benchmark/symfony.html).
26+
27+
Scores are too low ? Do not hesitate to create a pull request, and ask a new benchmark !

bin/console

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,6 @@ set_time_limit(0);
1111

1212
require __DIR__.'/../vendor/autoload.php';
1313

14-
if (!class_exists(Application::class)) {
15-
throw new \RuntimeException('You need to add "symfony/framework-bundle" as a Composer dependency.');
16-
}
17-
18-
if (!isset($_SERVER['APP_ENV'])) {
19-
if (!class_exists(Dotenv::class)) {
20-
throw new \RuntimeException('APP_ENV environment variable is not defined. You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file.');
21-
}
22-
(new Dotenv())->load(__DIR__.'/../.env');
23-
}
24-
25-
$input = new ArgvInput();
26-
$env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev', true);
27-
$debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption('--no-debug', true);
28-
29-
if ($debug) {
30-
umask(0000);
31-
32-
if (class_exists(Debug::class)) {
33-
Debug::enable();
34-
}
35-
}
36-
37-
$kernel = new Kernel($env, $debug);
14+
$kernel = new Kernel('prod', false);
3815
$application = new Application($kernel);
3916
$application->run($input);

composer.json

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@
99
"symfony/flex": "^1.0",
1010
"symfony/framework-bundle": "4.1.0-BETA2",
1111
"symfony/lts": "^4@dev",
12-
"symfony/yaml": "4.1.0-BETA2"
12+
"symfony/yaml": "4.1.0-BETA2",
13+
"phpbenchmarks/symfony-common": "4.1.0"
1314
},
1415
"minimum-stability": "beta",
15-
"require-dev": {
16-
"symfony/dotenv": "^4.0"
17-
},
1816
"config": {
1917
"preferred-install": {
2018
"*": "dist"
@@ -26,11 +24,6 @@
2624
"App\\": "src/"
2725
}
2826
},
29-
"autoload-dev": {
30-
"psr-4": {
31-
"App\\Tests\\": "tests/"
32-
}
33-
},
3427
"replace": {
3528
"symfony/polyfill-iconv": "*",
3629
"symfony/polyfill-php71": "*",
@@ -39,8 +32,7 @@
3932
},
4033
"scripts": {
4134
"auto-scripts": {
42-
"cache:clear": "symfony-cmd",
43-
"assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd"
35+
"cache:clear": "symfony-cmd"
4436
},
4537
"post-install-cmd": [
4638
"@auto-scripts"

composer.lock renamed to composer.lock.php7.1

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

0 commit comments

Comments
 (0)