Skip to content

Commit 8e4653c

Browse files
committed
Symfony update to v6.3
1 parent 748950e commit 8e4653c

File tree

8 files changed

+73
-0
lines changed

8 files changed

+73
-0
lines changed

symfony-6.3/_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
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-6.3/_benchmark/setup.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh
2+
# create project
3+
rm -rf _benchmark/temp
4+
composer create-project symfony/skeleton:^6.3 ./_benchmark/temp
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
12+
APP_ENV=prod APP_DEBUG=1 php bin/console cache:clear
13+
composer install --no-dev --optimize-autoloader
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-6.3/_benchmark/update.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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=1 php bin/console cache:clear

0 commit comments

Comments
 (0)