From 97d3db3f5638eca6869e399e5310521df34be896 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Gangloff?= Date: Sun, 11 Aug 2024 15:43:30 +0200 Subject: [PATCH 1/6] feat: add docker support --- .env | 34 +-- Dockerfile | 94 +++++++ compose.override.yaml | 26 +- compose.prod.yaml | 10 + compose.yaml | 44 +++- frankenphp/Caddyfile | 47 ++++ frankenphp/conf.d/10-app.ini | 13 + frankenphp/conf.d/20-app.dev.ini | 5 + frankenphp/conf.d/20-app.prod.ini | 2 + frankenphp/docker-entrypoint.sh | 60 +++++ frankenphp/worker.Caddyfile | 4 + importmap.php | 28 --- package.json | 80 ++---- phpstan.dist.neon | 2 +- symfony.lock | 396 ------------------------------ webpack.config.js | 20 +- 16 files changed, 349 insertions(+), 516 deletions(-) create mode 100644 Dockerfile create mode 100644 compose.prod.yaml create mode 100644 frankenphp/Caddyfile create mode 100644 frankenphp/conf.d/10-app.ini create mode 100644 frankenphp/conf.d/20-app.dev.ini create mode 100644 frankenphp/conf.d/20-app.prod.ini create mode 100755 frankenphp/docker-entrypoint.sh create mode 100644 frankenphp/worker.Caddyfile delete mode 100644 importmap.php delete mode 100644 symfony.lock diff --git a/.env b/.env index 221b2c4..cc68264 100644 --- a/.env +++ b/.env @@ -16,7 +16,7 @@ ###> symfony/framework-bundle ### APP_ENV=dev -APP_SECRET=9bf13abc0017f7656f631c6ca2510e02 +APP_SECRET=cacb7ba341ce4afca66611c4956a4699 ###< symfony/framework-bundle ### ###> doctrine/doctrine-bundle ### @@ -29,33 +29,33 @@ APP_SECRET=9bf13abc0017f7656f631c6ca2510e02 DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8" ###< doctrine/doctrine-bundle ### -###> symfony/messenger ### -# Choose one of the transports below -# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages -# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages -MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0 -###< symfony/messenger ### - -###> symfony/mailer ### -# MAILER_DSN=null://null -###< symfony/mailer ### +###> lexik/jwt-authentication-bundle ### +JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem +JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem +JWT_PASSPHRASE=0456f23bb41aa797092f1422dc9295e9855c3518fa82969a10716bf09f99d24d +###< lexik/jwt-authentication-bundle ### ###> nelmio/cors-bundle ### CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$' ###< nelmio/cors-bundle ### -###> lexik/jwt-authentication-bundle ### -JWT_SECRET_KEY=%kernel.project_dir%/config/jwt/private.pem -JWT_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem -JWT_PASSPHRASE=827c9f8cce8bb82e75b2aec4a14a61f572ac28c7a8531f08dcdf1652573a7049 -###< lexik/jwt-authentication-bundle ### - ###> symfony/lock ### # Choose one of the stores below # postgresql+advisory://db_user:db_password@localhost/db_name LOCK_DSN=flock ###< symfony/lock ### +###> symfony/mailer ### +# MAILER_DSN=null://null +###< symfony/mailer ### + +###> symfony/messenger ### +# Choose one of the transports below +# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages +# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages +MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0 +###< symfony/messenger ### + MAILER_SENDER_NAME="Domain Watchdog" MAILER_SENDER_EMAIL=notifications@example.com diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..efeb744 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,94 @@ +#syntax=docker/dockerfile:1.4 + +# Versions +FROM dunglas/frankenphp:1-php8.3 AS frankenphp_upstream + +# The different stages of this Dockerfile are meant to be built into separate images +# https://docs.docker.com/develop/develop-images/multistage-build/#stop-at-a-specific-build-stage +# https://docs.docker.com/compose/compose-file/#target + + +# Base FrankenPHP image +FROM frankenphp_upstream AS frankenphp_base + +WORKDIR /app + +VOLUME /app/var/ + +# persistent / runtime deps +# hadolint ignore=DL3008 +RUN apt-get update && apt-get install -y --no-install-recommends \ + acl \ + file \ + gettext \ + git \ + && rm -rf /var/lib/apt/lists/* + +RUN set -eux; \ + install-php-extensions \ + @composer \ + apcu \ + intl \ + opcache \ + zip \ + ; + +# https://getcomposer.org/doc/03-cli.md#composer-allow-superuser +ENV COMPOSER_ALLOW_SUPERUSER=1 + +ENV PHP_INI_SCAN_DIR=":$PHP_INI_DIR/app.conf.d" + +###> recipes ### +###< recipes ### + +COPY --link frankenphp/conf.d/10-app.ini $PHP_INI_DIR/app.conf.d/ +COPY --link --chmod=755 frankenphp/docker-entrypoint.sh /usr/local/bin/docker-entrypoint +COPY --link frankenphp/Caddyfile /etc/caddy/Caddyfile + +ENTRYPOINT ["docker-entrypoint"] + +HEALTHCHECK --start-period=60s CMD curl -f http://localhost:2019/metrics || exit 1 +CMD [ "frankenphp", "run", "--config", "/etc/caddy/Caddyfile" ] + +# Dev FrankenPHP image +FROM frankenphp_base AS frankenphp_dev + +ENV APP_ENV=dev XDEBUG_MODE=off + +RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" + +RUN set -eux; \ + install-php-extensions \ + xdebug \ + ; + +COPY --link frankenphp/conf.d/20-app.dev.ini $PHP_INI_DIR/app.conf.d/ + +CMD [ "frankenphp", "run", "--config", "/etc/caddy/Caddyfile", "--watch" ] + +# Prod FrankenPHP image +FROM frankenphp_base AS frankenphp_prod + +ENV APP_ENV=prod +ENV FRANKENPHP_CONFIG="import worker.Caddyfile" + +RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" + +COPY --link frankenphp/conf.d/20-app.prod.ini $PHP_INI_DIR/app.conf.d/ +COPY --link frankenphp/worker.Caddyfile /etc/caddy/worker.Caddyfile + +# 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 . ./ +RUN rm -Rf frankenphp/ + +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; \ diff --git a/compose.override.yaml b/compose.override.yaml index 4ddb3ff..3821899 100644 --- a/compose.override.yaml +++ b/compose.override.yaml @@ -1,6 +1,28 @@ -version: '3' - +# Development environment override services: + php: + build: + context: . + target: frankenphp_dev + volumes: + - ./:/app + - ./frankenphp/Caddyfile:/etc/caddy/Caddyfile:ro + - ./frankenphp/conf.d/20-app.dev.ini:/usr/local/etc/php/app.conf.d/20-app.dev.ini:ro + # If you develop on Mac or Windows you can remove the vendor/ directory + # from the bind-mount for better performance by enabling the next line: + #- /app/vendor + environment: + MERCURE_EXTRA_DIRECTIVES: demo + # See https://xdebug.org/docs/all_settings#mode + XDEBUG_MODE: "${XDEBUG_MODE:-off}" + extra_hosts: + # Ensure that host.docker.internal is correctly defined on Linux + - host.docker.internal:host-gateway + tty: true + +###> symfony/mercure-bundle ### +###< symfony/mercure-bundle ### + ###> doctrine/doctrine-bundle ### database: ports: diff --git a/compose.prod.yaml b/compose.prod.yaml new file mode 100644 index 0000000..f0db05d --- /dev/null +++ b/compose.prod.yaml @@ -0,0 +1,10 @@ +# Production environment override +services: + php: + build: + context: . + target: frankenphp_prod + environment: + APP_SECRET: ${APP_SECRET} + MERCURE_PUBLISHER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET} + MERCURE_SUBSCRIBER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET} diff --git a/compose.yaml b/compose.yaml index d563bf9..f53e21f 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,6 +1,41 @@ -version: '3' - services: + php: + image: ${IMAGES_PREFIX:-}app-php + restart: unless-stopped + environment: + SERVER_NAME: ${SERVER_NAME:-localhost}, php:80 + MERCURE_PUBLISHER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!} + MERCURE_SUBSCRIBER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!} + # Run "composer require symfony/orm-pack" to install and configure Doctrine ORM + DATABASE_URL: postgresql://${POSTGRES_USER:-app}:${POSTGRES_PASSWORD:-!ChangeMe!}@database:5432/${POSTGRES_DB:-app}?serverVersion=${POSTGRES_VERSION:-15}&charset=${POSTGRES_CHARSET:-utf8} + # Run "composer require symfony/mercure-bundle" to install and configure the Mercure integration + MERCURE_URL: ${CADDY_MERCURE_URL:-http://php/.well-known/mercure} + MERCURE_PUBLIC_URL: ${CADDY_MERCURE_PUBLIC_URL:-https://${SERVER_NAME:-localhost}/.well-known/mercure} + MERCURE_JWT_SECRET: ${CADDY_MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!} + # The two next lines can be removed after initial installation + SYMFONY_VERSION: ${SYMFONY_VERSION:-} + STABILITY: ${STABILITY:-stable} + volumes: + - caddy_data:/data + - caddy_config:/config + ports: + # HTTP + - target: 80 + published: ${HTTP_PORT:-80} + protocol: tcp + # HTTPS + - target: 443 + published: ${HTTPS_PORT:-443} + protocol: tcp + # HTTP/3 + - target: 443 + published: ${HTTP3_PORT:-443} + protocol: udp + +# Mercure is installed as a Caddy module, prevent the Flex recipe from installing another service +###> symfony/mercure-bundle ### +###< symfony/mercure-bundle ### + ###> doctrine/doctrine-bundle ### database: image: postgres:${POSTGRES_VERSION:-16}-alpine @@ -21,6 +56,11 @@ services: ###< doctrine/doctrine-bundle ### volumes: + caddy_data: + caddy_config: +###> symfony/mercure-bundle ### +###< symfony/mercure-bundle ### + ###> doctrine/doctrine-bundle ### database_data: ###< doctrine/doctrine-bundle ### diff --git a/frankenphp/Caddyfile b/frankenphp/Caddyfile new file mode 100644 index 0000000..b8bb57d --- /dev/null +++ b/frankenphp/Caddyfile @@ -0,0 +1,47 @@ +{ + {$CADDY_GLOBAL_OPTIONS} + + frankenphp { + {$FRANKENPHP_CONFIG} + } +} + +{$CADDY_EXTRA_CONFIG} + +{$SERVER_NAME:localhost} { + log { + # Redact the authorization query parameter that can be set by Mercure + format filter { + request>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/frankenphp/conf.d/10-app.ini b/frankenphp/conf.d/10-app.ini new file mode 100644 index 0000000..79a17dd --- /dev/null +++ b/frankenphp/conf.d/10-app.ini @@ -0,0 +1,13 @@ +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 diff --git a/frankenphp/conf.d/20-app.dev.ini b/frankenphp/conf.d/20-app.dev.ini new file mode 100644 index 0000000..e50f43d --- /dev/null +++ b/frankenphp/conf.d/20-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/frankenphp/conf.d/20-app.prod.ini b/frankenphp/conf.d/20-app.prod.ini new file mode 100644 index 0000000..3bcaa71 --- /dev/null +++ b/frankenphp/conf.d/20-app.prod.ini @@ -0,0 +1,2 @@ +opcache.preload_user = root +opcache.preload = /app/config/preload.php diff --git a/frankenphp/docker-entrypoint.sh b/frankenphp/docker-entrypoint.sh new file mode 100755 index 0000000..9823560 --- /dev/null +++ b/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 --all-or-nothing + 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 "$@" diff --git a/frankenphp/worker.Caddyfile b/frankenphp/worker.Caddyfile new file mode 100644 index 0000000..d384ae4 --- /dev/null +++ b/frankenphp/worker.Caddyfile @@ -0,0 +1,4 @@ +worker { + file ./public/index.php + env APP_RUNTIME Runtime\FrankenPhpSymfony\Runtime +} diff --git a/importmap.php b/importmap.php deleted file mode 100644 index b73b323..0000000 --- a/importmap.php +++ /dev/null @@ -1,28 +0,0 @@ - [ - 'path' => './assets/app.js', - 'entrypoint' => true, - ], - '@hotwired/stimulus' => [ - 'version' => '3.2.2', - ], - '@symfony/stimulus-bundle' => [ - 'path' => './vendor/symfony/stimulus-bundle/assets/dist/loader.js', - ], - '@hotwired/turbo' => [ - 'version' => '7.3.0', - ], -]; diff --git a/package.json b/package.json index b4d3eed..b4ce2a6 100644 --- a/package.json +++ b/package.json @@ -1,64 +1,20 @@ { - "name": "domain-watchdog", - "author": { - "name": "Maël Gangloff", - "email": "contact@maelgangloff.fr" - }, - "homepage": "https://github.com/maelgangloff/domain-watchdog", - "readme": "https://github.com/maelgangloff/domain-watchdog", - "keywords": [ - "Domain", - "RDAP", - "WHOIS" - ], - "bugs": { - "url": "https://github.com/maelgangloff/domain-watchdog/issues" - }, - "devDependencies": { - "@babel/core": "^7.17.0", - "@babel/preset-env": "^7.16.0", - "@babel/preset-react": "^7.24.7", - "@fontsource/noto-color-emoji": "^5.0.27", - "@symfony/webpack-encore": "^4.0.0", - "@types/axios": "^0.14.0", - "@types/jsonld": "^1.5.15", - "@types/punycode": "^2.1.4", - "@types/react": "^18.3.3", - "@types/react-dom": "^18.3.0", - "@types/react-responsive": "^8.0.8", - "@types/vcf": "^2.0.7", - "antd": "^5.19.3", - "axios": "^1.7.2", - "core-js": "^3.23.0", - "html-loader": "^5.1.0", - "jsonld": "^8.3.2", - "punycode": "^2.3.1", - "react": "^18.3.1", - "react-dom": "^18.3.1", - "react-responsive": "^10.0.0", - "react-router-dom": "^6.25.1", - "regenerator-runtime": "^0.13.9", - "snarkdown": "^2.0.0", - "ts-loader": "^9.5.1", - "ttag": "^1.8.7", - "ttag-cli": "^1.10.12", - "typescript": "^5.5.3", - "vcf": "^2.1.2", - "webpack": "^5.74.0", - "webpack-cli": "^4.10.0", - "webpack-notifier": "^1.15.0" - }, - "license": "AGPL-3.0-or-later", - "private": true, - "scripts": { - "dev-server": "encore dev-server", - "dev": "encore dev", - "watch": "encore dev --watch", - "build": "encore production --progress", - "ttag:po2json": "cd translations; for i in $(find . -name \"*.po\"); do ttag po2json $i > ../public/locales/$i.json; done; cd ..", - "ttag:extract": "ttag extract $(find assets -name '*.ts' -or -name '*.tsx') -o translations/translations.pot" - }, - "dependencies": { - "remove": "^0.1.5" - } + "devDependencies": { + "@babel/core": "^7.17.0", + "@babel/preset-env": "^7.16.0", + "@symfony/webpack-encore": "^4.0.0", + "core-js": "^3.23.0", + "regenerator-runtime": "^0.13.9", + "webpack": "^5.74.0", + "webpack-cli": "^4.10.0", + "webpack-notifier": "^1.15.0" + }, + "license": "UNLICENSED", + "private": true, + "scripts": { + "dev-server": "encore dev-server", + "dev": "encore dev", + "watch": "encore dev --watch", + "build": "encore production --progress" + } } diff --git a/phpstan.dist.neon b/phpstan.dist.neon index 77a0da7..e0de575 100644 --- a/phpstan.dist.neon +++ b/phpstan.dist.neon @@ -1,5 +1,5 @@ parameters: - level: 5 + level: 6 paths: - bin/ - config/ diff --git a/symfony.lock b/symfony.lock deleted file mode 100644 index e266829..0000000 --- a/symfony.lock +++ /dev/null @@ -1,396 +0,0 @@ -{ - "api-platform/core": { - "version": "3.3", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "3.3", - "ref": "74b45ac570c57eb1fbe56c984091a9ff87e18bab" - }, - "files": [ - "config/packages/api_platform.yaml", - "config/routes/api_platform.yaml", - "src/ApiResource/.gitignore" - ] - }, - "doctrine/doctrine-bundle": { - "version": "2.12", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "2.12", - "ref": "7266981c201efbbe02ae53c87f8bb378e3f825ae" - }, - "files": [ - "config/packages/doctrine.yaml", - "src/Entity/.gitignore", - "src/Repository/.gitignore" - ] - }, - "doctrine/doctrine-migrations-bundle": { - "version": "3.3", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "3.1", - "ref": "1d01ec03c6ecbd67c3375c5478c9a423ae5d6a33" - }, - "files": [ - "config/packages/doctrine_migrations.yaml", - "migrations/.gitignore" - ] - }, - "friendsofphp/php-cs-fixer": { - "version": "3.61", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "3.0", - "ref": "be2103eb4a20942e28a6dd87736669b757132435" - }, - "files": [ - ".php-cs-fixer.dist.php" - ] - }, - "knpuniversity/oauth2-client-bundle": { - "version": "2.18", - "recipe": { - "repo": "github.com/symfony/recipes-contrib", - "branch": "main", - "version": "1.20", - "ref": "1ff300d8c030f55c99219cc55050b97a695af3f6" - }, - "files": [ - "config/packages/knpu_oauth2_client.yaml" - ] - }, - "lexik/jwt-authentication-bundle": { - "version": "3.1", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "2.5", - "ref": "e9481b233a11ef7e15fe055a2b21fd3ac1aa2bb7" - }, - "files": [ - "config/packages/lexik_jwt_authentication.yaml" - ] - }, - "nelmio/cors-bundle": { - "version": "2.5", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "1.5", - "ref": "6bea22e6c564fba3a1391615cada1437d0bde39c" - }, - "files": [ - "config/packages/nelmio_cors.yaml" - ] - }, - "phpstan/phpstan": { - "version": "1.11", - "recipe": { - "repo": "github.com/symfony/recipes-contrib", - "branch": "main", - "version": "1.0", - "ref": "5e490cc197fb6bb1ae22e5abbc531ddc633b6767" - }, - "files": [ - "phpstan.dist.neon" - ] - }, - "phpunit/phpunit": { - "version": "9.6", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "9.6", - "ref": "7364a21d87e658eb363c5020c072ecfdc12e2326" - }, - "files": [ - ".env.test", - "phpunit.xml.dist", - "tests/bootstrap.php" - ] - }, - "symfony/asset-mapper": { - "version": "7.1", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "6.4", - "ref": "6c28c471640cc2c6e60812ebcb961c526ef8997f" - }, - "files": [ - "assets/app.js", - "assets/styles/app.css", - "config/packages/asset_mapper.yaml", - "importmap.php" - ] - }, - "symfony/console": { - "version": "7.1", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "5.3", - "ref": "1781ff40d8a17d87cf53f8d4cf0c8346ed2bb461" - }, - "files": [ - "bin/console" - ] - }, - "symfony/debug-bundle": { - "version": "7.1", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "5.3", - "ref": "5aa8aa48234c8eb6dbdd7b3cd5d791485d2cec4b" - }, - "files": [ - "config/packages/debug.yaml" - ] - }, - "symfony/flex": { - "version": "2.4", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "1.0", - "ref": "146251ae39e06a95be0fe3d13c807bcf3938b172" - }, - "files": [ - ".env" - ] - }, - "symfony/framework-bundle": { - "version": "7.1", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "7.0", - "ref": "6356c19b9ae08e7763e4ba2d9ae63043efc75db5" - }, - "files": [ - "config/packages/cache.yaml", - "config/packages/framework.yaml", - "config/preload.php", - "config/routes/framework.yaml", - "config/services.yaml", - "public/index.php", - "src/Controller/.gitignore", - "src/Kernel.php" - ] - }, - "symfony/lock": { - "version": "7.1", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "5.2", - "ref": "8e937ff2b4735d110af1770f242c1107fdab4c8e" - }, - "files": [ - "config/packages/lock.yaml" - ] - }, - "symfony/mailer": { - "version": "7.1", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "4.3", - "ref": "df66ee1f226c46f01e85c29c2f7acce0596ba35a" - }, - "files": [ - "config/packages/mailer.yaml" - ] - }, - "symfony/maker-bundle": { - "version": "1.60", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "1.0", - "ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f" - } - }, - "symfony/messenger": { - "version": "7.1", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "6.0", - "ref": "ba1ac4e919baba5644d31b57a3284d6ba12d52ee" - }, - "files": [ - "config/packages/messenger.yaml" - ] - }, - "symfony/monolog-bundle": { - "version": "3.10", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "3.7", - "ref": "aff23899c4440dd995907613c1dd709b6f59503f" - }, - "files": [ - "config/packages/monolog.yaml" - ] - }, - "symfony/notifier": { - "version": "7.1", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "5.0", - "ref": "178877daf79d2dbd62129dd03612cb1a2cb407cc" - }, - "files": [ - "config/packages/notifier.yaml" - ] - }, - "symfony/phpunit-bridge": { - "version": "7.1", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "6.3", - "ref": "a411a0480041243d97382cac7984f7dce7813c08" - }, - "files": [ - ".env.test", - "bin/phpunit", - "phpunit.xml.dist", - "tests/bootstrap.php" - ] - }, - "symfony/routing": { - "version": "7.1", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "7.0", - "ref": "21b72649d5622d8f7da329ffb5afb232a023619d" - }, - "files": [ - "config/packages/routing.yaml", - "config/routes.yaml" - ] - }, - "symfony/security-bundle": { - "version": "7.1", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "6.4", - "ref": "2ae08430db28c8eb4476605894296c82a642028f" - }, - "files": [ - "config/packages/security.yaml", - "config/routes/security.yaml" - ] - }, - "symfony/stimulus-bundle": { - "version": "2.18", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "2.13", - "ref": "6acd9ff4f7fd5626d2962109bd4ebab351d43c43" - }, - "files": [ - "assets/bootstrap.js", - "assets/controllers.json", - "assets/controllers/hello_controller.js" - ] - }, - "symfony/translation": { - "version": "7.1", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "6.3", - "ref": "e28e27f53663cc34f0be2837aba18e3a1bef8e7b" - }, - "files": [ - "config/packages/translation.yaml", - "translations/.gitignore" - ] - }, - "symfony/twig-bundle": { - "version": "7.1", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "6.4", - "ref": "cab5fd2a13a45c266d45a7d9337e28dee6272877" - }, - "files": [ - "config/packages/twig.yaml", - "templates/base.html.twig" - ] - }, - "symfony/uid": { - "version": "7.1", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "7.0", - "ref": "0df5844274d871b37fc3816c57a768ffc60a43a5" - } - }, - "symfony/ux-turbo": { - "version": "v2.18.0" - }, - "symfony/validator": { - "version": "7.1", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "7.0", - "ref": "8c1c4e28d26a124b0bb273f537ca8ce443472bfd" - }, - "files": [ - "config/packages/validator.yaml" - ] - }, - "symfony/web-profiler-bundle": { - "version": "7.1", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "6.1", - "ref": "e42b3f0177df239add25373083a564e5ead4e13a" - }, - "files": [ - "config/packages/web_profiler.yaml", - "config/routes/web_profiler.yaml" - ] - }, - "symfony/webpack-encore-bundle": { - "version": "2.1", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "main", - "version": "2.0", - "ref": "082d754b3bd54b3fc669f278f1eea955cfd23cf5" - }, - "files": [ - "assets/app.js", - "assets/styles/app.css", - "config/packages/webpack_encore.yaml", - "package.json", - "webpack.config.js" - ] - }, - "symfonycasts/verify-email-bundle": { - "version": "v1.17.0" - }, - "twig/extra-bundle": { - "version": "v3.10.0" - } -} diff --git a/webpack.config.js b/webpack.config.js index e3d324f..eabdb81 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -20,11 +20,14 @@ Encore * Each entry will result in one JavaScript file (e.g. app.js) * and one CSS file (e.g. app.css) if your JavaScript imports CSS. */ - .addEntry('app', './assets/index.tsx') + .addEntry('app', './assets/app.js') // When enabled, Webpack "splits" your files into smaller pieces for greater optimization. .splitEntryChunks() + // enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js) + .enableStimulusBridge('./assets/controllers.json') + // will require an extra script tag for runtime.js // but, you probably want this, unless you're building a single-page app .enableSingleRuntimeChunk() @@ -57,16 +60,17 @@ Encore //.enableSassLoader() // uncomment if you use TypeScript - .enableTypeScriptLoader() + //.enableTypeScriptLoader() // uncomment if you use React - .enableReactPreset() -// uncomment to get integrity="..." attributes on your script & link tags -// requires WebpackEncoreBundle 1.4 or higher -//.enableIntegrityHashes(Encore.isProduction()) + //.enableReactPreset() -// uncomment if you're having problems with a jQuery plugin -//.autoProvidejQuery() + // uncomment to get integrity="..." attributes on your script & link tags + // requires WebpackEncoreBundle 1.4 or higher + //.enableIntegrityHashes(Encore.isProduction()) + + // uncomment if you're having problems with a jQuery plugin + //.autoProvidejQuery() ; module.exports = Encore.getWebpackConfig(); From afcf242f759180f6a787e99b4d62ca36b2ab092f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Gangloff?= Date: Sun, 11 Aug 2024 15:53:36 +0200 Subject: [PATCH 2/6] fix: remove Mercure server --- .dockerignore | 34 ++++++++++++++++++++++++++++++++++ compose.override.yaml | 4 ---- compose.prod.yaml | 2 -- compose.yaml | 13 ------------- frankenphp/Caddyfile | 24 ------------------------ 5 files changed, 34 insertions(+), 43 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..dc5a875 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,34 @@ +**/*.log +**/*.md +**/*.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/ +docs/ +public/bundles/ +tests/ +var/ +vendor/ +.editorconfig +.env.*.local +.env.local +.env.local.php +.env.test diff --git a/compose.override.yaml b/compose.override.yaml index 3821899..dca2286 100644 --- a/compose.override.yaml +++ b/compose.override.yaml @@ -12,7 +12,6 @@ services: # from the bind-mount for better performance by enabling the next line: #- /app/vendor environment: - MERCURE_EXTRA_DIRECTIVES: demo # See https://xdebug.org/docs/all_settings#mode XDEBUG_MODE: "${XDEBUG_MODE:-off}" extra_hosts: @@ -20,9 +19,6 @@ services: - host.docker.internal:host-gateway tty: true -###> symfony/mercure-bundle ### -###< symfony/mercure-bundle ### - ###> doctrine/doctrine-bundle ### database: ports: diff --git a/compose.prod.yaml b/compose.prod.yaml index f0db05d..d49a419 100644 --- a/compose.prod.yaml +++ b/compose.prod.yaml @@ -6,5 +6,3 @@ services: target: frankenphp_prod environment: APP_SECRET: ${APP_SECRET} - MERCURE_PUBLISHER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET} - MERCURE_SUBSCRIBER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET} diff --git a/compose.yaml b/compose.yaml index f53e21f..564654c 100644 --- a/compose.yaml +++ b/compose.yaml @@ -4,14 +4,8 @@ services: restart: unless-stopped environment: SERVER_NAME: ${SERVER_NAME:-localhost}, php:80 - MERCURE_PUBLISHER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!} - MERCURE_SUBSCRIBER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!} # Run "composer require symfony/orm-pack" to install and configure Doctrine ORM DATABASE_URL: postgresql://${POSTGRES_USER:-app}:${POSTGRES_PASSWORD:-!ChangeMe!}@database:5432/${POSTGRES_DB:-app}?serverVersion=${POSTGRES_VERSION:-15}&charset=${POSTGRES_CHARSET:-utf8} - # Run "composer require symfony/mercure-bundle" to install and configure the Mercure integration - MERCURE_URL: ${CADDY_MERCURE_URL:-http://php/.well-known/mercure} - MERCURE_PUBLIC_URL: ${CADDY_MERCURE_PUBLIC_URL:-https://${SERVER_NAME:-localhost}/.well-known/mercure} - MERCURE_JWT_SECRET: ${CADDY_MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!} # The two next lines can be removed after initial installation SYMFONY_VERSION: ${SYMFONY_VERSION:-} STABILITY: ${STABILITY:-stable} @@ -32,10 +26,6 @@ services: published: ${HTTP3_PORT:-443} protocol: udp -# Mercure is installed as a Caddy module, prevent the Flex recipe from installing another service -###> symfony/mercure-bundle ### -###< symfony/mercure-bundle ### - ###> doctrine/doctrine-bundle ### database: image: postgres:${POSTGRES_VERSION:-16}-alpine @@ -58,9 +48,6 @@ services: volumes: caddy_data: caddy_config: -###> symfony/mercure-bundle ### -###< symfony/mercure-bundle ### - ###> doctrine/doctrine-bundle ### database_data: ###< doctrine/doctrine-bundle ### diff --git a/frankenphp/Caddyfile b/frankenphp/Caddyfile index b8bb57d..9bbff76 100644 --- a/frankenphp/Caddyfile +++ b/frankenphp/Caddyfile @@ -9,33 +9,9 @@ {$CADDY_EXTRA_CONFIG} {$SERVER_NAME:localhost} { - log { - # Redact the authorization query parameter that can be set by Mercure - format filter { - request>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} From 8d0f2f6791830bfdfe5ce92f9aeb5a58f73965a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Gangloff?= Date: Sun, 11 Aug 2024 15:57:40 +0200 Subject: [PATCH 3/6] fix: do not modify webpack.config.js --- webpack.config.js | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index eabdb81..e3d324f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -20,14 +20,11 @@ Encore * Each entry will result in one JavaScript file (e.g. app.js) * and one CSS file (e.g. app.css) if your JavaScript imports CSS. */ - .addEntry('app', './assets/app.js') + .addEntry('app', './assets/index.tsx') // When enabled, Webpack "splits" your files into smaller pieces for greater optimization. .splitEntryChunks() - // enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js) - .enableStimulusBridge('./assets/controllers.json') - // will require an extra script tag for runtime.js // but, you probably want this, unless you're building a single-page app .enableSingleRuntimeChunk() @@ -60,17 +57,16 @@ Encore //.enableSassLoader() // uncomment if you use TypeScript - //.enableTypeScriptLoader() + .enableTypeScriptLoader() // uncomment if you use React - //.enableReactPreset() + .enableReactPreset() +// uncomment to get integrity="..." attributes on your script & link tags +// requires WebpackEncoreBundle 1.4 or higher +//.enableIntegrityHashes(Encore.isProduction()) - // uncomment to get integrity="..." attributes on your script & link tags - // requires WebpackEncoreBundle 1.4 or higher - //.enableIntegrityHashes(Encore.isProduction()) - - // uncomment if you're having problems with a jQuery plugin - //.autoProvidejQuery() +// uncomment if you're having problems with a jQuery plugin +//.autoProvidejQuery() ; module.exports = Encore.getWebpackConfig(); From e916ce37bde2fbd221be791f503dd4a2d7c7301f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Gangloff?= Date: Sun, 11 Aug 2024 15:58:51 +0200 Subject: [PATCH 4/6] fix: do not modify package.json --- package.json | 80 ++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 62 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index b4ce2a6..b4d3eed 100644 --- a/package.json +++ b/package.json @@ -1,20 +1,64 @@ { - "devDependencies": { - "@babel/core": "^7.17.0", - "@babel/preset-env": "^7.16.0", - "@symfony/webpack-encore": "^4.0.0", - "core-js": "^3.23.0", - "regenerator-runtime": "^0.13.9", - "webpack": "^5.74.0", - "webpack-cli": "^4.10.0", - "webpack-notifier": "^1.15.0" - }, - "license": "UNLICENSED", - "private": true, - "scripts": { - "dev-server": "encore dev-server", - "dev": "encore dev", - "watch": "encore dev --watch", - "build": "encore production --progress" - } + "name": "domain-watchdog", + "author": { + "name": "Maël Gangloff", + "email": "contact@maelgangloff.fr" + }, + "homepage": "https://github.com/maelgangloff/domain-watchdog", + "readme": "https://github.com/maelgangloff/domain-watchdog", + "keywords": [ + "Domain", + "RDAP", + "WHOIS" + ], + "bugs": { + "url": "https://github.com/maelgangloff/domain-watchdog/issues" + }, + "devDependencies": { + "@babel/core": "^7.17.0", + "@babel/preset-env": "^7.16.0", + "@babel/preset-react": "^7.24.7", + "@fontsource/noto-color-emoji": "^5.0.27", + "@symfony/webpack-encore": "^4.0.0", + "@types/axios": "^0.14.0", + "@types/jsonld": "^1.5.15", + "@types/punycode": "^2.1.4", + "@types/react": "^18.3.3", + "@types/react-dom": "^18.3.0", + "@types/react-responsive": "^8.0.8", + "@types/vcf": "^2.0.7", + "antd": "^5.19.3", + "axios": "^1.7.2", + "core-js": "^3.23.0", + "html-loader": "^5.1.0", + "jsonld": "^8.3.2", + "punycode": "^2.3.1", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "react-responsive": "^10.0.0", + "react-router-dom": "^6.25.1", + "regenerator-runtime": "^0.13.9", + "snarkdown": "^2.0.0", + "ts-loader": "^9.5.1", + "ttag": "^1.8.7", + "ttag-cli": "^1.10.12", + "typescript": "^5.5.3", + "vcf": "^2.1.2", + "webpack": "^5.74.0", + "webpack-cli": "^4.10.0", + "webpack-notifier": "^1.15.0" + }, + "license": "AGPL-3.0-or-later", + "private": true, + "scripts": { + "dev-server": "encore dev-server", + "dev": "encore dev", + "watch": "encore dev --watch", + "build": "encore production --progress", + "ttag:po2json": "cd translations; for i in $(find . -name \"*.po\"); do ttag po2json $i > ../public/locales/$i.json; done; cd ..", + "ttag:extract": "ttag extract $(find assets -name '*.ts' -or -name '*.tsx') -o translations/translations.pot" + }, + "dependencies": { + "remove": "^0.1.5" + } } From 1e2062205243dda9650ec4963202f845a71fc6ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Gangloff?= Date: Sun, 11 Aug 2024 15:59:44 +0200 Subject: [PATCH 5/6] fix: do not modify phpstan.dist.neon --- phpstan.dist.neon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpstan.dist.neon b/phpstan.dist.neon index e0de575..77a0da7 100644 --- a/phpstan.dist.neon +++ b/phpstan.dist.neon @@ -1,5 +1,5 @@ parameters: - level: 6 + level: 5 paths: - bin/ - config/ From 1ef446e38b5e01325457ae7dd9bacc6b5de2b8b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Gangloff?= Date: Sun, 11 Aug 2024 16:11:20 +0200 Subject: [PATCH 6/6] feat: docker support --- Dockerfile | 3 + compose.yaml | 3 + composer.json | 1 + composer.lock | 54 ++++++- symfony.lock | 396 ++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 456 insertions(+), 1 deletion(-) create mode 100644 symfony.lock diff --git a/Dockerfile b/Dockerfile index efeb744..caf94af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,6 +39,9 @@ ENV COMPOSER_ALLOW_SUPERUSER=1 ENV PHP_INI_SCAN_DIR=":$PHP_INI_DIR/app.conf.d" ###> recipes ### +###> doctrine/doctrine-bundle ### +RUN install-php-extensions pdo_pgsql +###< doctrine/doctrine-bundle ### ###< recipes ### COPY --link frankenphp/conf.d/10-app.ini $PHP_INI_DIR/app.conf.d/ diff --git a/compose.yaml b/compose.yaml index 564654c..2fef85a 100644 --- a/compose.yaml +++ b/compose.yaml @@ -51,3 +51,6 @@ volumes: ###> doctrine/doctrine-bundle ### database_data: ###< doctrine/doctrine-bundle ### + +networks: + dw-net: \ No newline at end of file diff --git a/composer.json b/composer.json index 6a8c06f..930771c 100644 --- a/composer.json +++ b/composer.json @@ -37,6 +37,7 @@ "phpstan/phpdoc-parser": "^1.29", "protonlabs/vobject": "^4.31", "psr/http-client": "^1.0", + "runtime/frankenphp-symfony": "^0.2.0", "symfony/asset": "7.1.*", "symfony/asset-mapper": "7.1.*", "symfony/console": "7.1.*", diff --git a/composer.lock b/composer.lock index a35c991..46447c6 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": "69d672f9e5a01b48f871fa5c81714f8d", + "content-hash": "bab584811b8175e404608e6738549f52", "packages": [ { "name": "api-platform/core", @@ -3434,6 +3434,58 @@ }, "time": "2019-03-08T08:55:37+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": "sabre/uri", "version": "3.0.1", diff --git a/symfony.lock b/symfony.lock new file mode 100644 index 0000000..e266829 --- /dev/null +++ b/symfony.lock @@ -0,0 +1,396 @@ +{ + "api-platform/core": { + "version": "3.3", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "3.3", + "ref": "74b45ac570c57eb1fbe56c984091a9ff87e18bab" + }, + "files": [ + "config/packages/api_platform.yaml", + "config/routes/api_platform.yaml", + "src/ApiResource/.gitignore" + ] + }, + "doctrine/doctrine-bundle": { + "version": "2.12", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "2.12", + "ref": "7266981c201efbbe02ae53c87f8bb378e3f825ae" + }, + "files": [ + "config/packages/doctrine.yaml", + "src/Entity/.gitignore", + "src/Repository/.gitignore" + ] + }, + "doctrine/doctrine-migrations-bundle": { + "version": "3.3", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "3.1", + "ref": "1d01ec03c6ecbd67c3375c5478c9a423ae5d6a33" + }, + "files": [ + "config/packages/doctrine_migrations.yaml", + "migrations/.gitignore" + ] + }, + "friendsofphp/php-cs-fixer": { + "version": "3.61", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "3.0", + "ref": "be2103eb4a20942e28a6dd87736669b757132435" + }, + "files": [ + ".php-cs-fixer.dist.php" + ] + }, + "knpuniversity/oauth2-client-bundle": { + "version": "2.18", + "recipe": { + "repo": "github.com/symfony/recipes-contrib", + "branch": "main", + "version": "1.20", + "ref": "1ff300d8c030f55c99219cc55050b97a695af3f6" + }, + "files": [ + "config/packages/knpu_oauth2_client.yaml" + ] + }, + "lexik/jwt-authentication-bundle": { + "version": "3.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "2.5", + "ref": "e9481b233a11ef7e15fe055a2b21fd3ac1aa2bb7" + }, + "files": [ + "config/packages/lexik_jwt_authentication.yaml" + ] + }, + "nelmio/cors-bundle": { + "version": "2.5", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "1.5", + "ref": "6bea22e6c564fba3a1391615cada1437d0bde39c" + }, + "files": [ + "config/packages/nelmio_cors.yaml" + ] + }, + "phpstan/phpstan": { + "version": "1.11", + "recipe": { + "repo": "github.com/symfony/recipes-contrib", + "branch": "main", + "version": "1.0", + "ref": "5e490cc197fb6bb1ae22e5abbc531ddc633b6767" + }, + "files": [ + "phpstan.dist.neon" + ] + }, + "phpunit/phpunit": { + "version": "9.6", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "9.6", + "ref": "7364a21d87e658eb363c5020c072ecfdc12e2326" + }, + "files": [ + ".env.test", + "phpunit.xml.dist", + "tests/bootstrap.php" + ] + }, + "symfony/asset-mapper": { + "version": "7.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "6.4", + "ref": "6c28c471640cc2c6e60812ebcb961c526ef8997f" + }, + "files": [ + "assets/app.js", + "assets/styles/app.css", + "config/packages/asset_mapper.yaml", + "importmap.php" + ] + }, + "symfony/console": { + "version": "7.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "5.3", + "ref": "1781ff40d8a17d87cf53f8d4cf0c8346ed2bb461" + }, + "files": [ + "bin/console" + ] + }, + "symfony/debug-bundle": { + "version": "7.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "5.3", + "ref": "5aa8aa48234c8eb6dbdd7b3cd5d791485d2cec4b" + }, + "files": [ + "config/packages/debug.yaml" + ] + }, + "symfony/flex": { + "version": "2.4", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "1.0", + "ref": "146251ae39e06a95be0fe3d13c807bcf3938b172" + }, + "files": [ + ".env" + ] + }, + "symfony/framework-bundle": { + "version": "7.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "7.0", + "ref": "6356c19b9ae08e7763e4ba2d9ae63043efc75db5" + }, + "files": [ + "config/packages/cache.yaml", + "config/packages/framework.yaml", + "config/preload.php", + "config/routes/framework.yaml", + "config/services.yaml", + "public/index.php", + "src/Controller/.gitignore", + "src/Kernel.php" + ] + }, + "symfony/lock": { + "version": "7.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "5.2", + "ref": "8e937ff2b4735d110af1770f242c1107fdab4c8e" + }, + "files": [ + "config/packages/lock.yaml" + ] + }, + "symfony/mailer": { + "version": "7.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "4.3", + "ref": "df66ee1f226c46f01e85c29c2f7acce0596ba35a" + }, + "files": [ + "config/packages/mailer.yaml" + ] + }, + "symfony/maker-bundle": { + "version": "1.60", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "1.0", + "ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f" + } + }, + "symfony/messenger": { + "version": "7.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "6.0", + "ref": "ba1ac4e919baba5644d31b57a3284d6ba12d52ee" + }, + "files": [ + "config/packages/messenger.yaml" + ] + }, + "symfony/monolog-bundle": { + "version": "3.10", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "3.7", + "ref": "aff23899c4440dd995907613c1dd709b6f59503f" + }, + "files": [ + "config/packages/monolog.yaml" + ] + }, + "symfony/notifier": { + "version": "7.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "5.0", + "ref": "178877daf79d2dbd62129dd03612cb1a2cb407cc" + }, + "files": [ + "config/packages/notifier.yaml" + ] + }, + "symfony/phpunit-bridge": { + "version": "7.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "6.3", + "ref": "a411a0480041243d97382cac7984f7dce7813c08" + }, + "files": [ + ".env.test", + "bin/phpunit", + "phpunit.xml.dist", + "tests/bootstrap.php" + ] + }, + "symfony/routing": { + "version": "7.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "7.0", + "ref": "21b72649d5622d8f7da329ffb5afb232a023619d" + }, + "files": [ + "config/packages/routing.yaml", + "config/routes.yaml" + ] + }, + "symfony/security-bundle": { + "version": "7.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "6.4", + "ref": "2ae08430db28c8eb4476605894296c82a642028f" + }, + "files": [ + "config/packages/security.yaml", + "config/routes/security.yaml" + ] + }, + "symfony/stimulus-bundle": { + "version": "2.18", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "2.13", + "ref": "6acd9ff4f7fd5626d2962109bd4ebab351d43c43" + }, + "files": [ + "assets/bootstrap.js", + "assets/controllers.json", + "assets/controllers/hello_controller.js" + ] + }, + "symfony/translation": { + "version": "7.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "6.3", + "ref": "e28e27f53663cc34f0be2837aba18e3a1bef8e7b" + }, + "files": [ + "config/packages/translation.yaml", + "translations/.gitignore" + ] + }, + "symfony/twig-bundle": { + "version": "7.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "6.4", + "ref": "cab5fd2a13a45c266d45a7d9337e28dee6272877" + }, + "files": [ + "config/packages/twig.yaml", + "templates/base.html.twig" + ] + }, + "symfony/uid": { + "version": "7.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "7.0", + "ref": "0df5844274d871b37fc3816c57a768ffc60a43a5" + } + }, + "symfony/ux-turbo": { + "version": "v2.18.0" + }, + "symfony/validator": { + "version": "7.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "7.0", + "ref": "8c1c4e28d26a124b0bb273f537ca8ce443472bfd" + }, + "files": [ + "config/packages/validator.yaml" + ] + }, + "symfony/web-profiler-bundle": { + "version": "7.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "6.1", + "ref": "e42b3f0177df239add25373083a564e5ead4e13a" + }, + "files": [ + "config/packages/web_profiler.yaml", + "config/routes/web_profiler.yaml" + ] + }, + "symfony/webpack-encore-bundle": { + "version": "2.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "2.0", + "ref": "082d754b3bd54b3fc669f278f1eea955cfd23cf5" + }, + "files": [ + "assets/app.js", + "assets/styles/app.css", + "config/packages/webpack_encore.yaml", + "package.json", + "webpack.config.js" + ] + }, + "symfonycasts/verify-email-bundle": { + "version": "v1.17.0" + }, + "twig/extra-bundle": { + "version": "v3.10.0" + } +}