From 8e4653c418460800257b677025595cc03bd2e5b3 Mon Sep 17 00:00:00 2001 From: Joanhey Date: Tue, 25 Jul 2023 02:19:26 +0200 Subject: [PATCH 1/4] Symfony update to v6.3 --- symfony-6.3/_benchmark/clean.sh | 4 ++++ symfony-6.3/_benchmark/clear-cache.sh | 4 ++++ symfony-6.3/_benchmark/hello_world.sh | 2 ++ symfony-6.3/_benchmark/setup.sh | 13 +++++++++++++ .../_benchmark/symfony/config/routes.yaml | 6 ++++++ .../_benchmark/symfony/public/index.php | 19 +++++++++++++++++++ .../src/Controller/HelloWorldController.php | 15 +++++++++++++++ symfony-6.3/_benchmark/update.sh | 10 ++++++++++ 8 files changed, 73 insertions(+) create mode 100644 symfony-6.3/_benchmark/clean.sh create mode 100755 symfony-6.3/_benchmark/clear-cache.sh create mode 100644 symfony-6.3/_benchmark/hello_world.sh create mode 100755 symfony-6.3/_benchmark/setup.sh create mode 100644 symfony-6.3/_benchmark/symfony/config/routes.yaml create mode 100644 symfony-6.3/_benchmark/symfony/public/index.php create mode 100644 symfony-6.3/_benchmark/symfony/src/Controller/HelloWorldController.php create mode 100644 symfony-6.3/_benchmark/update.sh diff --git a/symfony-6.3/_benchmark/clean.sh b/symfony-6.3/_benchmark/clean.sh new file mode 100644 index 0000000..36d8cb0 --- /dev/null +++ b/symfony-6.3/_benchmark/clean.sh @@ -0,0 +1,4 @@ +#!/bin/sh +rm -rf !("_benchmark") +find -path './.*' -delete +rm -rf _benchmark/temp \ No newline at end of file diff --git a/symfony-6.3/_benchmark/clear-cache.sh b/symfony-6.3/_benchmark/clear-cache.sh new file mode 100755 index 0000000..3ebcec0 --- /dev/null +++ b/symfony-6.3/_benchmark/clear-cache.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# clear cache +bin/console cache:clear +echo -e "done" \ No newline at end of file diff --git a/symfony-6.3/_benchmark/hello_world.sh b/symfony-6.3/_benchmark/hello_world.sh new file mode 100644 index 0000000..2d69368 --- /dev/null +++ b/symfony-6.3/_benchmark/hello_world.sh @@ -0,0 +1,2 @@ +#!/bin/sh +url="$base/$fw/public/index.php/hello/index" \ No newline at end of file diff --git a/symfony-6.3/_benchmark/setup.sh b/symfony-6.3/_benchmark/setup.sh new file mode 100755 index 0000000..24f365d --- /dev/null +++ b/symfony-6.3/_benchmark/setup.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# create project +rm -rf _benchmark/temp +composer create-project symfony/skeleton:^6.3 ./_benchmark/temp +mv ./_benchmark/temp/{.,}* ./ + +# have the route & controller +yes|cp -r _benchmark/symfony/* ./ + +# some enhancement +composer dump-env prod +APP_ENV=prod APP_DEBUG=1 php bin/console cache:clear +composer install --no-dev --optimize-autoloader \ No newline at end of file diff --git a/symfony-6.3/_benchmark/symfony/config/routes.yaml b/symfony-6.3/_benchmark/symfony/config/routes.yaml new file mode 100644 index 0000000..82b6673 --- /dev/null +++ b/symfony-6.3/_benchmark/symfony/config/routes.yaml @@ -0,0 +1,6 @@ +#index: +# path: / +# controller: App\Controller\DefaultController::index +hello_world: + path: /hello/index + controller: App\Controller\HelloWorldController::index \ No newline at end of file diff --git a/symfony-6.3/_benchmark/symfony/public/index.php b/symfony-6.3/_benchmark/symfony/public/index.php new file mode 100644 index 0000000..a015893 --- /dev/null +++ b/symfony-6.3/_benchmark/symfony/public/index.php @@ -0,0 +1,19 @@ +handle($request); +$response->send(); +$kernel->terminate($request, $response); + +require $_SERVER['DOCUMENT_ROOT'].'/PHP-Frameworks-Bench/libs/output_data.php'; \ No newline at end of file diff --git a/symfony-6.3/_benchmark/symfony/src/Controller/HelloWorldController.php b/symfony-6.3/_benchmark/symfony/src/Controller/HelloWorldController.php new file mode 100644 index 0000000..a2f531c --- /dev/null +++ b/symfony-6.3/_benchmark/symfony/src/Controller/HelloWorldController.php @@ -0,0 +1,15 @@ + Date: Tue, 25 Jul 2023 11:17:46 +0200 Subject: [PATCH 2/4] Change version bench config --- benchmark.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark.config b/benchmark.config index a3334a1..f3f06a5 100644 --- a/benchmark.config +++ b/benchmark.config @@ -33,7 +33,7 @@ silex-2.3 slim-3.12 slim-4.11 symfony-5.4 -symfony-6.2 +symfony-6.3 ubiquity-2.4.x.dev yii-2.0-basic " \ No newline at end of file From 67909d70d9a6de2ac021b084f01ddb741b70f83c Mon Sep 17 00:00:00 2001 From: Joanhey Date: Tue, 25 Jul 2023 12:40:09 +0200 Subject: [PATCH 3/4] Move dir --- symfony-6.2/_benchmark/clean.sh | 4 ---- symfony-6.2/_benchmark/clear-cache.sh | 4 ---- symfony-6.2/_benchmark/hello_world.sh | 2 -- symfony-6.2/_benchmark/setup.sh | 13 ------------- .../_benchmark/symfony/config/routes.yaml | 6 ------ .../_benchmark/symfony/public/index.php | 19 ------------------- .../src/Controller/HelloWorldController.php | 15 --------------- symfony-6.2/_benchmark/update.sh | 10 ---------- 8 files changed, 73 deletions(-) delete mode 100644 symfony-6.2/_benchmark/clean.sh delete mode 100755 symfony-6.2/_benchmark/clear-cache.sh delete mode 100644 symfony-6.2/_benchmark/hello_world.sh delete mode 100755 symfony-6.2/_benchmark/setup.sh delete mode 100644 symfony-6.2/_benchmark/symfony/config/routes.yaml delete mode 100644 symfony-6.2/_benchmark/symfony/public/index.php delete mode 100644 symfony-6.2/_benchmark/symfony/src/Controller/HelloWorldController.php delete mode 100644 symfony-6.2/_benchmark/update.sh diff --git a/symfony-6.2/_benchmark/clean.sh b/symfony-6.2/_benchmark/clean.sh deleted file mode 100644 index 36d8cb0..0000000 --- a/symfony-6.2/_benchmark/clean.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -rm -rf !("_benchmark") -find -path './.*' -delete -rm -rf _benchmark/temp \ No newline at end of file diff --git a/symfony-6.2/_benchmark/clear-cache.sh b/symfony-6.2/_benchmark/clear-cache.sh deleted file mode 100755 index 3ebcec0..0000000 --- a/symfony-6.2/_benchmark/clear-cache.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -# clear cache -bin/console cache:clear -echo -e "done" \ No newline at end of file diff --git a/symfony-6.2/_benchmark/hello_world.sh b/symfony-6.2/_benchmark/hello_world.sh deleted file mode 100644 index 2d69368..0000000 --- a/symfony-6.2/_benchmark/hello_world.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -url="$base/$fw/public/index.php/hello/index" \ No newline at end of file diff --git a/symfony-6.2/_benchmark/setup.sh b/symfony-6.2/_benchmark/setup.sh deleted file mode 100755 index 66a9036..0000000 --- a/symfony-6.2/_benchmark/setup.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# create project -rm -rf _benchmark/temp -composer create-project symfony/skeleton:^6.2 ./_benchmark/temp -mv ./_benchmark/temp/{.,}* ./ - -# have the route & controller -yes|cp -r _benchmark/symfony/* ./ - -# some enhancement -composer dump-env prod -APP_ENV=prod APP_DEBUG=0 php bin/console cache:clear -composer install --no-dev --optimize-autoloader \ No newline at end of file diff --git a/symfony-6.2/_benchmark/symfony/config/routes.yaml b/symfony-6.2/_benchmark/symfony/config/routes.yaml deleted file mode 100644 index 82b6673..0000000 --- a/symfony-6.2/_benchmark/symfony/config/routes.yaml +++ /dev/null @@ -1,6 +0,0 @@ -#index: -# path: / -# controller: App\Controller\DefaultController::index -hello_world: - path: /hello/index - controller: App\Controller\HelloWorldController::index \ No newline at end of file diff --git a/symfony-6.2/_benchmark/symfony/public/index.php b/symfony-6.2/_benchmark/symfony/public/index.php deleted file mode 100644 index a015893..0000000 --- a/symfony-6.2/_benchmark/symfony/public/index.php +++ /dev/null @@ -1,19 +0,0 @@ -handle($request); -$response->send(); -$kernel->terminate($request, $response); - -require $_SERVER['DOCUMENT_ROOT'].'/PHP-Frameworks-Bench/libs/output_data.php'; \ No newline at end of file diff --git a/symfony-6.2/_benchmark/symfony/src/Controller/HelloWorldController.php b/symfony-6.2/_benchmark/symfony/src/Controller/HelloWorldController.php deleted file mode 100644 index a2f531c..0000000 --- a/symfony-6.2/_benchmark/symfony/src/Controller/HelloWorldController.php +++ /dev/null @@ -1,15 +0,0 @@ - Date: Tue, 25 Jul 2023 12:44:01 +0200 Subject: [PATCH 4/4] Debug off --- symfony-6.3/_benchmark/setup.sh | 2 +- symfony-6.3/_benchmark/update.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/symfony-6.3/_benchmark/setup.sh b/symfony-6.3/_benchmark/setup.sh index 24f365d..3eb7c2f 100755 --- a/symfony-6.3/_benchmark/setup.sh +++ b/symfony-6.3/_benchmark/setup.sh @@ -9,5 +9,5 @@ yes|cp -r _benchmark/symfony/* ./ # some enhancement composer dump-env prod -APP_ENV=prod APP_DEBUG=1 php bin/console cache:clear +APP_ENV=prod APP_DEBUG=0 php bin/console cache:clear composer install --no-dev --optimize-autoloader \ No newline at end of file diff --git a/symfony-6.3/_benchmark/update.sh b/symfony-6.3/_benchmark/update.sh index 50a17c4..fc2c7cf 100644 --- a/symfony-6.3/_benchmark/update.sh +++ b/symfony-6.3/_benchmark/update.sh @@ -7,4 +7,4 @@ yes|cp -r _benchmark/symfony/* ./ # some enhancements composer dump-env prod composer install --no-dev --optimize-autoloader -APP_ENV=prod APP_DEBUG=1 php bin/console cache:clear \ No newline at end of file +APP_ENV=prod APP_DEBUG=0 php bin/console cache:clear \ No newline at end of file