Skip to content

Commit 93996f8

Browse files
committed
Add Symfony-7.0
1 parent 3912566 commit 93996f8

File tree

9 files changed

+76
-0
lines changed

9 files changed

+76
-0
lines changed

config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ silex-2.3
3232
slim-4.12
3333
symfony-5.4
3434
symfony-6.4
35+
symfony-7.0
3536
ubiquity-2.4.x.dev
3637
yii-2.0-basic
3738
"

symfony-7.0/_benchmark/clean.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
rm -rf !("_benchmark")
3+
find -path './.*' -delete
4+
rm -rf _benchmark/temp
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
# clear cache
3+
bin/console cache:clear -q
4+
echo -e "done"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
url="$base/$fw/public/index.php/hello/index"

symfony-7.0/_benchmark/setup.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
# create project
3+
rm -rf _benchmark/temp
4+
composer create-project symfony/skeleton:7.0.* ./_benchmark/temp --ansi
5+
mv ./_benchmark/temp/{.,}* ./
6+
7+
# have the route & controller
8+
yes|cp -r _benchmark/symfony/* ./
9+
10+
# some enhancement
11+
composer dump-env prod --ansi
12+
APP_ENV=prod APP_DEBUG=0 bin/console cache:clear
13+
composer install --no-dev --optimize-autoloader --ansi
14+
chmod -R o+w var
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#index:
2+
# path: /
3+
# controller: App\Controller\DefaultController::index
4+
hello_world:
5+
path: /hello/index
6+
controller: App\Controller\HelloWorldController::index
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
/*
3+
PHP-Frameworks-Bench
4+
this is a simple hello world controller to make benchmark
5+
*/
6+
use App\Kernel;
7+
8+
use Symfony\Component\HttpFoundation\Request;
9+
10+
require __DIR__.'/../vendor/autoload.php';
11+
12+
13+
$kernel = new Kernel('prod', false);
14+
$request = Request::createFromGlobals();
15+
$response = $kernel->handle($request);
16+
$response->send();
17+
$kernel->terminate($request, $response);
18+
19+
require $_SERVER['DOCUMENT_ROOT'].'/PHP-Frameworks-Bench/libs/output_data.php';
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php declare(strict_types=1);
2+
/*
3+
PHP-Frameworks-Bench
4+
this is a simple hello world controller to make benchmark
5+
*/
6+
namespace App\Controller;
7+
8+
use Symfony\Component\HttpFoundation\Response;
9+
10+
// such simple controller
11+
class HelloWorldController {
12+
public function index(): Response {
13+
return new Response('Hello World!');
14+
}
15+
}

symfony-7.0/_benchmark/update.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
composer update
3+
4+
# have the route & controller
5+
yes|cp -r _benchmark/symfony/* ./
6+
7+
# some enhancements
8+
composer dump-env prod
9+
composer install --no-dev --optimize-autoloader
10+
APP_ENV=prod APP_DEBUG=0 bin/console cache:clear
11+
chmod -R o+w var

0 commit comments

Comments
 (0)