diff --git a/.docker/frankenphp/Caddyfile b/.docker/frankenphp/Caddyfile new file mode 100644 index 00000000..83839304 --- /dev/null +++ b/.docker/frankenphp/Caddyfile @@ -0,0 +1,55 @@ +{ + {$CADDY_GLOBAL_OPTIONS} + + frankenphp { + {$FRANKENPHP_CONFIG} + } + + # https://caddyserver.com/docs/caddyfile/directives#sorting-algorithm + order mercure after encode + order vulcain after reverse_proxy + order php_server before file_server +} + +{$CADDY_EXTRA_CONFIG} + +{$SERVER_NAME:localhost} { + log { + # Redact the authorization query parameter that can be set by Mercure + format filter { + wrap console + fields { + uri query { + replace authorization REDACTED + } + } + } + } + + root * /app/public + encode zstd br gzip + + mercure { + # Transport to use (default to Bolt) + transport_url {$MERCURE_TRANSPORT_URL:bolt:///data/mercure.db} + # Publisher JWT key + publisher_jwt {env.MERCURE_PUBLISHER_JWT_KEY} {env.MERCURE_PUBLISHER_JWT_ALG} + # Subscriber JWT key + subscriber_jwt {env.MERCURE_SUBSCRIBER_JWT_KEY} {env.MERCURE_SUBSCRIBER_JWT_ALG} + # Allow anonymous subscribers (double-check that it's what you want) + anonymous + # Enable the subscription API (double-check that it's what you want) + subscriptions + # Extra directives + {$MERCURE_EXTRA_DIRECTIVES} + } + + vulcain + + {$CADDY_SERVER_EXTRA_DIRECTIVES} + + # Disable Topics tracking if not enabled explicitly: https://github.com/jkarlin/topics + header ?Permissions-Policy "browsing-topics=()" + + php_server +} diff --git a/.docker/frankenphp/conf.d/app.dev.ini b/.docker/frankenphp/conf.d/app.dev.ini new file mode 100644 index 00000000..e50f43d0 --- /dev/null +++ b/.docker/frankenphp/conf.d/app.dev.ini @@ -0,0 +1,5 @@ +; See https://docs.docker.com/desktop/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host +; See https://github.com/docker/for-linux/issues/264 +; The `client_host` below may optionally be replaced with `discover_client_host=yes` +; Add `start_with_request=yes` to start debug session on each request +xdebug.client_host = host.docker.internal diff --git a/.docker/frankenphp/conf.d/app.ini b/.docker/frankenphp/conf.d/app.ini new file mode 100644 index 00000000..10a062f2 --- /dev/null +++ b/.docker/frankenphp/conf.d/app.ini @@ -0,0 +1,18 @@ +expose_php = 0 +date.timezone = UTC +apc.enable_cli = 1 +session.use_strict_mode = 1 +zend.detect_unicode = 0 + +; https://symfony.com/doc/current/performance.html +realpath_cache_size = 4096K +realpath_cache_ttl = 600 +opcache.interned_strings_buffer = 16 +opcache.max_accelerated_files = 20000 +opcache.memory_consumption = 256 +opcache.enable_file_override = 1 + +memory_limit = 256M + +upload_max_filesize=256M +post_max_size=300M \ No newline at end of file diff --git a/.docker/frankenphp/conf.d/app.prod.ini b/.docker/frankenphp/conf.d/app.prod.ini new file mode 100644 index 00000000..3bcaa71e --- /dev/null +++ b/.docker/frankenphp/conf.d/app.prod.ini @@ -0,0 +1,2 @@ +opcache.preload_user = root +opcache.preload = /app/config/preload.php diff --git a/.docker/frankenphp/docker-entrypoint.sh b/.docker/frankenphp/docker-entrypoint.sh new file mode 100644 index 00000000..1655af5a --- /dev/null +++ b/.docker/frankenphp/docker-entrypoint.sh @@ -0,0 +1,60 @@ +#!/bin/sh +set -e + +if [ "$1" = 'frankenphp' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then + # Install the project the first time PHP is started + # After the installation, the following block can be deleted + if [ ! -f composer.json ]; then + rm -Rf tmp/ + composer create-project "symfony/skeleton $SYMFONY_VERSION" tmp --stability="$STABILITY" --prefer-dist --no-progress --no-interaction --no-install + + cd tmp + cp -Rp . .. + cd - + rm -Rf tmp/ + + composer require "php:>=$PHP_VERSION" runtime/frankenphp-symfony + composer config --json extra.symfony.docker 'true' + + if grep -q ^DATABASE_URL= .env; then + echo "To finish the installation please press Ctrl+C to stop Docker Compose and run: docker compose up --build -d --wait" + sleep infinity + fi + fi + + if [ -z "$(ls -A 'vendor/' 2>/dev/null)" ]; then + composer install --prefer-dist --no-progress --no-interaction + fi + + if grep -q ^DATABASE_URL= .env; then + echo "Waiting for database to be ready..." + ATTEMPTS_LEFT_TO_REACH_DATABASE=60 + until [ $ATTEMPTS_LEFT_TO_REACH_DATABASE -eq 0 ] || DATABASE_ERROR=$(php bin/console dbal:run-sql -q "SELECT 1" 2>&1); do + if [ $? -eq 255 ]; then + # If the Doctrine command exits with 255, an unrecoverable error occurred + ATTEMPTS_LEFT_TO_REACH_DATABASE=0 + break + fi + sleep 1 + ATTEMPTS_LEFT_TO_REACH_DATABASE=$((ATTEMPTS_LEFT_TO_REACH_DATABASE - 1)) + echo "Still waiting for database to be ready... Or maybe the database is not reachable. $ATTEMPTS_LEFT_TO_REACH_DATABASE attempts left." + done + + if [ $ATTEMPTS_LEFT_TO_REACH_DATABASE -eq 0 ]; then + echo "The database is not up or not reachable:" + echo "$DATABASE_ERROR" + exit 1 + else + echo "The database is now ready and reachable" + fi + + if [ "$( find ./migrations -iname '*.php' -print -quit )" ]; then + php bin/console doctrine:migrations:migrate --no-interaction + fi + fi + + setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX var + setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var +fi + +exec docker-php-entrypoint "$@" \ No newline at end of file diff --git a/.docker/frankenphp/worker.Caddyfile b/.docker/frankenphp/worker.Caddyfile new file mode 100644 index 00000000..d384ae4c --- /dev/null +++ b/.docker/frankenphp/worker.Caddyfile @@ -0,0 +1,4 @@ +worker { + file ./public/index.php + env APP_RUNTIME Runtime\FrankenPhpSymfony\Runtime +} diff --git a/.dockerignore b/.dockerignore index 8929729c..472b1bb3 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,6 +5,8 @@ tests/ docs/ .git +/public/media/* + ###> symfony/framework-bundle ### /.env.local /.env.local.php @@ -42,3 +44,39 @@ yarn-error.log /phpunit.xml .phpunit.result.cache ###< phpunit/phpunit ### + + +### From frankenphp + +**/*.log +**/*.php~ +**/*.dist.php +**/*.dist +**/*.cache +**/._* +**/.dockerignore +**/.DS_Store +**/.git/ +**/.gitattributes +**/.gitignore +**/.gitmodules +**/compose.*.yaml +**/compose.*.yml +**/compose.yaml +**/compose.yml +**/docker-compose.*.yaml +**/docker-compose.*.yml +**/docker-compose.yaml +**/docker-compose.yml +**/Dockerfile +**/Thumbs.db +.github/ +public/bundles/ +var/ +vendor/ +.editorconfig +.env.*.local +.env.local +.env.local.php +.env.test + diff --git a/.github/workflows/docker_frankenphp.yml b/.github/workflows/docker_frankenphp.yml new file mode 100644 index 00000000..54b50ae3 --- /dev/null +++ b/.github/workflows/docker_frankenphp.yml @@ -0,0 +1,77 @@ +name: Docker Image Build (FrankenPHP) + +on: + #schedule: + # - cron: '0 10 * * *' # everyday at 10am + push: + branches: + - '**' + - '!l10n_**' + tags: + - 'v*.*.*' + - 'v*.*.*-**' + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: Docker meta + id: docker_meta + uses: docker/metadata-action@v5 + with: + # list of Docker images to use as base name for tags + images: | + partdborg/part-db + # Mark the image build from master as latest (as we dont have really releases yet) + tags: | + type=edge,branch=master + type=ref,event=branch, + type=ref,event=tag, + type=schedule + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=ref,event=branch + type=ref,event=pr + labels: | + org.opencontainers.image.source=${{ github.event.repository.clone_url }} + org.opencontainers.image.revision=${{ github.sha }} + org.opencontainers.image.title=Part-DB + org.opencontainers.image.description=Part-DB is a web application for managing electronic components and your inventory. + org.opencontainers.image.url=https://github.com/Part-DB/Part-DB-server + org.opencontainers.image.source=https://github.com/Part-DB/Part-DB-server + org.opencontainers.image.authors=Jan Böhmer + org.opencontainers.licenses=AGPL-3.0-or-later + + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: 'arm64,arm' + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - + name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile-frankenphp + platforms: linux/amd64,linux/arm64,linux/arm/v7 + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.docker_meta.outputs.tags }} + labels: ${{ steps.docker_meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max \ No newline at end of file diff --git a/Dockerfile-frankenphp b/Dockerfile-frankenphp new file mode 100644 index 00000000..a42cd1ed --- /dev/null +++ b/Dockerfile-frankenphp @@ -0,0 +1,85 @@ +FROM dunglas/frankenphp:1-php8.3 AS frankenphp_upstream + +RUN apt-get update && apt-get -y install curl zip mariadb-client file acl git gettext ca-certificates gnupg \ + && apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*; + +# Create workdir and set permissions if directory does not exists +RUN mkdir -p /app +WORKDIR /app + +# Install PHP +RUN set -eux; \ + install-php-extensions \ + @composer \ + apcu \ + intl \ + opcache \ + zip \ + pdo_mysql \ + pdo_sqlite \ + gd \ + bcmath \ + xsl \ + ; + +# Copy config files for php and caddy +COPY --link .docker/frankenphp/conf.d/app.ini $PHP_INI_DIR/conf.d/ +COPY --chmod=755 .docker/frankenphp/docker-entrypoint.sh /usr/local/bin/docker-entrypoint +COPY --link .docker/frankenphp/Caddyfile /etc/caddy/Caddyfile +COPY --link .docker/frankenphp/conf.d/app.prod.ini $PHP_INI_DIR/conf.d/ +COPY --link .docker/frankenphp/worker.Caddyfile /etc/caddy/worker.Caddyfile +ENV FRANKENPHP_CONFIG="import worker.Caddyfile" + +RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" + +# Install node and yarn +RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - +RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list +RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - && apt-get update && apt-get install -y nodejs yarn && apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/* + +# Install composer +ENV COMPOSER_ALLOW_SUPERUSER=1 +#COPY --from=composer:latest /usr/bin/composer /usr/bin/composer + +# prevent the reinstallation of vendors at every changes in the source code +COPY --link composer.* symfony.* ./ +RUN set -eux; \ + composer install --no-cache --prefer-dist --no-dev --no-autoloader --no-scripts --no-progress + +# copy sources +COPY --link . ./ + +# Install composer and yarn dependencies for Part-DB +RUN set -eux; \ + mkdir -p var/cache var/log; \ + composer dump-autoload --classmap-authoritative --no-dev; \ + composer dump-env prod; \ + composer run-script --no-dev post-install-cmd; \ + chmod +x bin/console; sync; + +RUN yarn install --network-timeout 600000 && yarn build && yarn cache clean && rm -rf node_modules/ + +# Use docker env to output logs to stdout +ENV APP_ENV=docker +ENV DATABASE_URL="sqlite:///%kernel.project_dir%/uploads/app.db" + +USER root + +ENTRYPOINT ["docker-entrypoint"] +CMD ["frankenphp", "run", "--config", "/etc/caddy/Caddyfile"] + +# https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop +STOPSIGNAL SIGWINCH + +VOLUME ["/var/www/html/uploads", "/var/www/html/public/media"] + +HEALTHCHECK --start-period=60s CMD curl -f http://localhost:2019/metrics || exit 1 + +# See https://caddyserver.com/docs/conventions#file-locations for details +ENV XDG_CONFIG_HOME /config +ENV XDG_DATA_HOME /data + +EXPOSE 80 +EXPOSE 443 +EXPOSE 443/udp +EXPOSE 2019 \ No newline at end of file diff --git a/composer.json b/composer.json index 3d760da4..20d02876 100644 --- a/composer.json +++ b/composer.json @@ -45,6 +45,7 @@ "php-translation/symfony-bundle": "^0.14.0", "phpdocumentor/reflection-docblock": "^5.2", "phpstan/phpdoc-parser": "^1.23", + "runtime/frankenphp-symfony": "^0.2.0", "s9e/text-formatter": "^2.1", "scheb/2fa-backup-code": "^6.8.0", "scheb/2fa-bundle": "^6.8.0", @@ -165,7 +166,8 @@ "extra": { "symfony": { "allow-contrib": false, - "require": "6.4.*" + "require": "6.4.*", + "docker": true } } } diff --git a/composer.lock b/composer.lock index 229eb618..5a7e5232 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c92c91e2ea0afe0c366c423a217bd0cb", + "content-hash": "19c280b6d5021cb69af33476174dfc1e", "packages": [ { "name": "api-platform/core", @@ -6467,6 +6467,58 @@ }, "time": "2020-09-05T13:00:25+00:00" }, + { + "name": "runtime/frankenphp-symfony", + "version": "0.2.0", + "source": { + "type": "git", + "url": "https://github.com/php-runtime/frankenphp-symfony.git", + "reference": "56822c3631d9522a3136a4c33082d006bdfe4bad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-runtime/frankenphp-symfony/zipball/56822c3631d9522a3136a4c33082d006bdfe4bad", + "reference": "56822c3631d9522a3136a4c33082d006bdfe4bad", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0", + "symfony/http-kernel": "^5.4 || ^6.0 || ^7.0", + "symfony/runtime": "^5.4 || ^6.0 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Runtime\\FrankenPhpSymfony\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kévin Dunglas", + "email": "kevin@dunglas.dev" + } + ], + "description": "FrankenPHP runtime for Symfony", + "support": { + "issues": "https://github.com/php-runtime/frankenphp-symfony/issues", + "source": "https://github.com/php-runtime/frankenphp-symfony/tree/0.2.0" + }, + "funding": [ + { + "url": "https://github.com/nyholm", + "type": "github" + } + ], + "time": "2023-12-12T12:06:11+00:00" + }, { "name": "s9e/regexp-builder", "version": "1.4.6", diff --git a/config/packages/dama_doctrine_test_bundle.yaml b/config/packages/dama_doctrine_test_bundle.yaml new file mode 100644 index 00000000..3482cbae --- /dev/null +++ b/config/packages/dama_doctrine_test_bundle.yaml @@ -0,0 +1,5 @@ +when@test: + dama_doctrine_test: + enable_static_connection: true + enable_static_meta_data_cache: true + enable_static_query_cache: true diff --git a/src/Controller/ToolsController.php b/src/Controller/ToolsController.php index b3a4997d..984e50eb 100644 --- a/src/Controller/ToolsController.php +++ b/src/Controller/ToolsController.php @@ -82,6 +82,9 @@ class ToolsController extends AbstractController 'php_opcache_enabled' => ini_get('opcache.enable'), 'php_upload_max_filesize' => ini_get('upload_max_filesize'), 'php_post_max_size' => ini_get('post_max_size'), + 'kernel_runtime_environment' => $this->getParameter('kernel.runtime_environment'), + 'kernel_runtime_mode' => $this->getParameter('kernel.runtime_mode'), + 'kernel_runtime' => $_SERVER['APP_RUNTIME'] ?? $_ENV['APP_RUNTIME'] ?? 'Symfony\\Component\\Runtime\\SymfonyRuntime', //DB section 'db_type' => $DBInfoHelper->getDatabaseType() ?? 'Unknown', diff --git a/src/EventListener/ConsoleEnsureWebserverUserListener.php b/src/EventListener/ConsoleEnsureWebserverUserListener.php index dbd164c4..7c119304 100644 --- a/src/EventListener/ConsoleEnsureWebserverUserListener.php +++ b/src/EventListener/ConsoleEnsureWebserverUserListener.php @@ -55,6 +55,11 @@ class ConsoleEnsureWebserverUserListener //Check if we are trying to run as root if ($this->isRunningAsRoot()) { + //If the COMPOSER_ALLOW_SUPERUSER environment variable is set, we allow running as root + if ($_SERVER['COMPOSER_ALLOW_SUPERUSER'] ?? false) { + return; + } + $io->warning('You are running this command as root. This is not recommended, as it can cause permission problems. Please run this command as the webserver user "'. ($webserver_user ?? '??') . '" instead.'); $io->info('You might have already caused permission problems by running this command as wrong user. If you encounter issues with Part-DB, delete the var/cache directory completely and let it be recreated by Part-DB.'); if ($input->isInteractive() && !$io->confirm('Do you want to continue?', false)) { diff --git a/symfony.lock b/symfony.lock index 278cef71..1e04eedd 100644 --- a/symfony.lock +++ b/symfony.lock @@ -44,15 +44,15 @@ "version": "1.3.3" }, "dama/doctrine-test-bundle": { - "version": "7.2", + "version": "8.0", "recipe": { "repo": "github.com/symfony/recipes-contrib", "branch": "main", - "version": "4.0", - "ref": "2c920f73a217f30bd4a37833c91071f4d3dc1ecd" + "version": "7.2", + "ref": "896306d79d4ee143af9eadf9b09fd34a8c391b70" }, "files": [ - "config/packages/test/dama_doctrine_test_bundle.yaml" + "./config/packages/dama_doctrine_test_bundle.yaml" ] }, "dnoegel/php-xdg-base-dir": { @@ -92,12 +92,12 @@ "repo": "github.com/symfony/recipes", "branch": "main", "version": "2.10", - "ref": "0db4b12b5df45f5122213b4ecd18733ab7fa7d53" + "ref": "c170ded8fc587d6bd670550c43dafcf093762245" }, "files": [ - "config/packages/doctrine.yaml", - "src/Entity/.gitignore", - "src/Repository/.gitignore" + "./config/packages/doctrine.yaml", + "./src/Entity/.gitignore", + "./src/Repository/.gitignore" ] }, "doctrine/doctrine-fixtures-bundle": { @@ -174,7 +174,7 @@ "version": "3.5.0" }, "florianv/swap-bundle": { - "version": "5.0.0" + "version": "5.0.x-dev" }, "friendsofphp/proxy-manager-lts": { "version": "v1.0.5" @@ -183,16 +183,16 @@ "version": "v1.1.7" }, "gregwar/captcha-bundle": { - "version": "v2.0.6" + "version": "v2.2.0" }, "imagine/imagine": { "version": "1.2.2" }, "jbtronics/2fa-webauthn": { - "version": "dev-master" + "version": "v2.2.1" }, "jbtronics/dompdf-font-loader-bundle": { - "version": "dev-main" + "version": "v1.1.1" }, "knpuniversity/oauth2-client-bundle": { "version": "2.15", @@ -232,7 +232,7 @@ "version": "1.24.0" }, "nbgrp/onelogin-saml-bundle": { - "version": "v1.3.2" + "version": "v1.4.0" }, "nelmio/cors-bundle": { "version": "2.3", @@ -451,7 +451,7 @@ "version": "3.0.2" }, "shivas/versioning-bundle": { - "version": "3.1.3" + "version": "4.0.3" }, "symfony/apache-pack": { "version": "1.0", @@ -459,10 +459,10 @@ "repo": "github.com/symfony/recipes-contrib", "branch": "main", "version": "1.0", - "ref": "efb318193e48384eb5c5aadff15396ed698f8ffc" + "ref": "0f18b4decdf5695d692c1d0dfd65516a07a6adf1" }, "files": [ - "public/.htaccess" + "./public/.htaccess" ] }, "symfony/asset": { @@ -590,15 +590,15 @@ "version": "v4.2.3" }, "symfony/mailer": { - "version": "5.4", + "version": "6.4", "recipe": { "repo": "github.com/symfony/recipes", "branch": "main", "version": "4.3", - "ref": "2bf89438209656b85b9a49238c4467bff1b1f939" + "ref": "df66ee1f226c46f01e85c29c2f7acce0596ba35a" }, "files": [ - "config/packages/mailer.yaml" + "./config/packages/mailer.yaml" ] }, "symfony/maker-bundle": { @@ -617,12 +617,12 @@ "version": "v4.4.2" }, "symfony/monolog-bundle": { - "version": "3.7", + "version": "3.10", "recipe": { "repo": "github.com/symfony/recipes", - "branch": "master", + "branch": "main", "version": "3.7", - "ref": "213676c4ec929f046dfde5ea8e97625b81bc0578" + "ref": "aff23899c4440dd995907613c1dd709b6f59503f" }, "files": [ "./config/packages/monolog.yaml" @@ -640,13 +640,13 @@ "repo": "github.com/symfony/recipes", "branch": "main", "version": "6.3", - "ref": "1f5830c331065b6e4c9d5fa2105e322d29fcd573" + "ref": "a411a0480041243d97382cac7984f7dce7813c08" }, "files": [ - ".env.test", - "bin/phpunit", - "phpunit.xml.dist", - "tests/bootstrap.php" + "./.env.test", + "./bin/phpunit", + "./phpunit.xml.dist", + "./tests/bootstrap.php" ] }, "symfony/polyfill-ctype": { @@ -730,12 +730,12 @@ "version": "v1.1.5" }, "symfony/stimulus-bundle": { - "version": "2.9", + "version": "2.16", "recipe": { "repo": "github.com/symfony/recipes", "branch": "main", - "version": "2.9", - "ref": "05c45071c7ecacc1e48f94bc43c1f8d4405fb2b2" + "version": "2.13", + "ref": "6acd9ff4f7fd5626d2962109bd4ebab351d43c43" }, "files": [ "./assets/bootstrap.js", @@ -755,11 +755,11 @@ "repo": "github.com/symfony/recipes", "branch": "main", "version": "6.3", - "ref": "64fe617084223633e1dedf9112935d8c95410d3e" + "ref": "e28e27f53663cc34f0be2837aba18e3a1bef8e7b" }, "files": [ - "config/packages/translation.yaml", - "translations/.gitignore" + "./config/packages/translation.yaml", + "./translations/.gitignore" ] }, "symfony/translation-contracts": { @@ -769,16 +769,16 @@ "version": "v4.2.3" }, "symfony/twig-bundle": { - "version": "6.3", + "version": "6.4", "recipe": { "repo": "github.com/symfony/recipes", "branch": "main", - "version": "6.3", - "ref": "b7772eb20e92f3fb4d4fe756e7505b4ba2ca1a2c" + "version": "6.4", + "ref": "cab5fd2a13a45c266d45a7d9337e28dee6272877" }, "files": [ - "config/packages/twig.yaml", - "templates/base.html.twig" + "./config/packages/twig.yaml", + "./templates/base.html.twig" ] }, "symfony/uid": { @@ -809,7 +809,7 @@ ] }, "symfony/ux-turbo": { - "version": "v2.0.1" + "version": "v2.16.0" }, "symfony/validator": { "version": "5.4", @@ -880,7 +880,7 @@ "version": "v3.0.0" }, "twig/extra-bundle": { - "version": "v3.0.0" + "version": "v3.8.0" }, "twig/html-extra": { "version": "v3.0.3" diff --git a/templates/tools/server_infos/_php.html.twig b/templates/tools/server_infos/_php.html.twig index 0d9d252d..ea5a0b4c 100644 --- a/templates/tools/server_infos/_php.html.twig +++ b/templates/tools/server_infos/_php.html.twig @@ -31,5 +31,19 @@ Server time {{ "now" | format_datetime("long", "long") }} + + Symfony Kernel Runtime + {{ kernel_runtime }} + + + Symfony Kernel Runtime Environment + {{ kernel_runtime_environment }} + + + Symfony Kernel Runtime mode + {% for key, value in kernel_runtime_mode %} + {{ key }}: {{ value }}
+ {% endfor %} + \ No newline at end of file