diff --git a/.editorconfig b/.editorconfig
index dd654ddb2..c7bb193ea 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -9,6 +9,7 @@ end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true
+trim_trailing_whitespace = true
[{composer.json,Makefile}]
indent_style = tab
diff --git a/.env.test b/.env.test
index ccecd22e4..75f2cda04 100644
--- a/.env.test
+++ b/.env.test
@@ -4,7 +4,7 @@
###> symfony/framework-bundle ###
APP_ENV=test
-APP_SECRET=2edbe69f411744beb240bc58fff311bd
+APP_SECRET='$ecretf0rt3st'
###< symfony/framework-bundle ###
###> symfony-flex-backend ###
diff --git a/bin/phpunit b/bin/phpunit
old mode 100755
new mode 100644
diff --git a/config/packages/csrf.yaml b/config/packages/csrf.yaml
new file mode 100644
index 000000000..40d40405e
--- /dev/null
+++ b/config/packages/csrf.yaml
@@ -0,0 +1,11 @@
+# Enable stateless CSRF protection for forms and logins/logouts
+framework:
+ form:
+ csrf_protection:
+ token_id: submit
+
+ csrf_protection:
+ stateless_token_ids:
+ - submit
+ - authenticate
+ - logout
diff --git a/config/packages/property_info.yaml b/config/packages/property_info.yaml
new file mode 100644
index 000000000..dd31b9da2
--- /dev/null
+++ b/config/packages/property_info.yaml
@@ -0,0 +1,3 @@
+framework:
+ property_info:
+ with_constructor_extractor: true
diff --git a/config/packages/routing.yaml b/config/packages/routing.yaml
index 8166181c6..77959d088 100644
--- a/config/packages/routing.yaml
+++ b/config/packages/routing.yaml
@@ -2,7 +2,7 @@ framework:
router:
# Configure how to generate URLs in non-HTTP contexts, such as CLI commands.
# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands
- #default_uri: http://localhost
+ default_uri: '%env(resolve:DEFAULT_URI)%'
when@prod:
framework:
diff --git a/config/packages/translation.yaml b/config/packages/translation.yaml
index b497be2e8..b58ce80b7 100644
--- a/config/packages/translation.yaml
+++ b/config/packages/translation.yaml
@@ -4,12 +4,12 @@ framework:
default_path: '%kernel.project_dir%/translations'
fallbacks:
- '%locale%'
-# providers:
-# crowdin:
-# dsn: '%env(CROWDIN_DSN)%'
-# loco:
-# dsn: '%env(LOCO_DSN)%'
-# lokalise:
-# dsn: '%env(LOKALISE_DSN)%'
-# phrase:
-# dsn: '%env(PHRASE_DSN)%'
+ providers:
+ #crowdin:
+ # dsn: '%env(CROWDIN_DSN)%'
+ #loco:
+ # dsn: '%env(LOCO_DSN)%'
+ #lokalise:
+ # dsn: '%env(LOKALISE_DSN)%'
+ #phrase:
+ # dsn: '%env(PHRASE_DSN)%'
diff --git a/config/packages/web_profiler.yaml b/config/packages/web_profiler.yaml
index 1e039b76d..0eac3c989 100644
--- a/config/packages/web_profiler.yaml
+++ b/config/packages/web_profiler.yaml
@@ -8,4 +8,6 @@ when@dev:
when@test:
framework:
- profiler: { collect: false }
+ profiler:
+ collect: false
+ collect_serializer_data: true
diff --git a/config/routes/framework.yaml b/config/routes/framework.yaml
index 61d04f9ca..e9be3bcdd 100644
--- a/config/routes/framework.yaml
+++ b/config/routes/framework.yaml
@@ -1,6 +1,6 @@
when@dev:
_errors:
- resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
+ resource: '@FrameworkBundle/Resources/config/routing/errors.php'
prefix: /_error
when@test:
diff --git a/config/routes/web_profiler.yaml b/config/routes/web_profiler.yaml
index 8d85319fd..b3b7b4b0e 100644
--- a/config/routes/web_profiler.yaml
+++ b/config/routes/web_profiler.yaml
@@ -1,8 +1,8 @@
when@dev:
web_profiler_wdt:
- resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
+ resource: '@WebProfilerBundle/Resources/config/routing/wdt.php'
prefix: /_wdt
web_profiler_profiler:
- resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
+ resource: '@WebProfilerBundle/Resources/config/routing/profiler.php'
prefix: /_profiler
diff --git a/config/services.yaml b/config/services.yaml
index adee5398e..e057334ae 100644
--- a/config/services.yaml
+++ b/config/services.yaml
@@ -7,6 +7,7 @@ parameters:
app.config: '%env(json:file:APPLICATION_CONFIG)%'
env(DATABASE_NAME): '%env(string:key:DATABASE_NAME:json:file:APPLICATION_CONFIG)%'
env(DATABASE_URL): '%env(string:key:DATABASE_URL:json:file:APPLICATION_CONFIG)%'
+ env(DEFAULT_URI): '%env(string:key:DEFAULT_URI:json:file:APPLICATION_CONFIG)%'
env(JWT_PASSPHRASE): '%env(string:key:JWT_PASSPHRASE:json:file:APPLICATION_CONFIG)%'
env(JWT_PRIVATE_KEY_PATH): '%env(string:key:JWT_SECRET_KEY:json:file:APPLICATION_CONFIG)%'
env(JWT_PUBLIC_KEY_PATH): '%env(string:key:JWT_PUBLIC_KEY:json:file:APPLICATION_CONFIG)%'
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index b343de03b..653660a29 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -19,23 +19,23 @@
>
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
./tests/Unit/
@@ -67,7 +75,7 @@
-
+
./src/Migrations
./src/Kernel.php
+
+
+ Doctrine\Deprecations\Deprecation::trigger
+ Doctrine\Deprecations\Deprecation::delegateTriggerToBackend
+
diff --git a/secrets/application.json b/secrets/application.json
index c8acde64b..a6983b74e 100644
--- a/secrets/application.json
+++ b/secrets/application.json
@@ -1,6 +1,7 @@
{
"DATABASE_NAME": "symfony-flex-backend",
"DATABASE_URL": "mysql://root:password@mariadb:3306/symfony-flex-backend?charset=utf8mb4&serverVersion=10.7.1-MariaDB",
+ "DEFAULT_URI": "https://localhost",
"JWT_SECRET_KEY": "config/jwt/private.pem",
"JWT_PUBLIC_KEY": "config/jwt/public.pem",
"JWT_PASSPHRASE": "5ba3c2f86ac44c31859a10204078ac96",
diff --git a/secrets/application_test.json b/secrets/application_test.json
index 3bc573be3..32f0f6a47 100644
--- a/secrets/application_test.json
+++ b/secrets/application_test.json
@@ -1,6 +1,7 @@
{
"DATABASE_NAME": "symfony-flex-backend-test",
"DATABASE_URL": "mysql://root:password@mariadb:3306/symfony-flex-backend-test?charset=utf8mb4&serverVersion=10.7.1-MariaDB",
+ "DEFAULT_URI": "https://localhost",
"JWT_SECRET_KEY": "config/jwt/private.pem",
"JWT_PUBLIC_KEY": "config/jwt/public.pem",
"JWT_PASSPHRASE": "5ba3c2f86ac44c31859a10204078ac96",
diff --git a/symfony.lock b/symfony.lock
index ac49cda50..273351ee8 100644
--- a/symfony.lock
+++ b/symfony.lock
@@ -21,7 +21,13 @@
"version": "v2.10.1"
},
"doctrine/deprecations": {
- "version": "v0.5.3"
+ "version": "1.1",
+ "recipe": {
+ "repo": "github.com/symfony/recipes",
+ "branch": "main",
+ "version": "1.0",
+ "ref": "87424683adc81d7dc305eefec1fced883084aab9"
+ }
},
"doctrine/doctrine-bundle": {
"version": "2.14",
@@ -168,16 +174,17 @@
"version": "1.0.1"
},
"phpunit/phpunit": {
- "version": "12.1",
+ "version": "12.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
- "version": "10.0",
- "ref": "bb22cf8d8c554a623b427d5f3416b538f5525233"
+ "version": "11.1",
+ "ref": "c6658a60fc9d594805370eacdf542c3d6b5c0869"
},
"files": [
".env.test",
- "phpunit.dist.xml",
+ "bin/phpunit",
+ "phpunit.xml.dist",
"tests/bootstrap.php"
]
},
@@ -300,17 +307,27 @@
]
},
"symfony/form": {
- "version": "v4.4.3"
+ "version": "7.3",
+ "recipe": {
+ "repo": "github.com/symfony/recipes",
+ "branch": "main",
+ "version": "7.2",
+ "ref": "7d86a6723f4a623f59e2bf966b6aad2fc461d36b"
+ },
+ "files": [
+ "config/packages/csrf.yaml"
+ ]
},
"symfony/framework-bundle": {
- "version": "7.2",
+ "version": "7.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
- "version": "7.2",
- "ref": "87bcf6f7c55201f345d8895deda46d2adbdbaa89"
+ "version": "7.3",
+ "ref": "5a1497d539f691b96afd45ae397ce5fe30beb4b9"
},
"files": [
+ ".editorconfig",
"config/packages/cache.yaml",
"config/packages/framework.yaml",
"config/preload.php",
@@ -358,19 +375,14 @@
"version": "v5.3.0"
},
"symfony/phpunit-bridge": {
- "version": "7.2",
+ "version": "7.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
- "version": "6.3",
- "ref": "a411a0480041243d97382cac7984f7dce7813c08"
+ "version": "7.3",
+ "ref": "dc13fec96bd527bd399c3c01f0aab915c67fd544"
},
- "files": [
- ".env.test",
- "bin/phpunit",
- "phpunit.xml.dist",
- "tests/bootstrap.php"
- ]
+ "files": []
},
"symfony/polyfill-intl-grapheme": {
"version": "v1.17.0"
@@ -388,7 +400,16 @@
"version": "v4.4.3"
},
"symfony/property-info": {
- "version": "v4.4.3"
+ "version": "7.3",
+ "recipe": {
+ "repo": "github.com/symfony/recipes",
+ "branch": "main",
+ "version": "7.3",
+ "ref": "dae70df71978ae9226ae915ffd5fad817f5ca1f7"
+ },
+ "files": [
+ "config/packages/property_info.yaml"
+ ]
},
"symfony/requirements-checker": {
"version": "2.0",
@@ -400,12 +421,12 @@
}
},
"symfony/routing": {
- "version": "7.2",
+ "version": "7.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "7.0",
- "ref": "21b72649d5622d8f7da329ffb5afb232a023619d"
+ "ref": "ab1e60e2afd5c6f4a6795908f646e235f2564eb2"
},
"files": [
"config/packages/routing.yaml",
@@ -450,12 +471,12 @@
"version": "v5.1.0"
},
"symfony/translation": {
- "version": "6.4",
+ "version": "7.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "6.3",
- "ref": "e28e27f53663cc34f0be2837aba18e3a1bef8e7b"
+ "ref": "620a1b84865ceb2ba304c8f8bf2a185fbf32a843"
},
"files": [
"config/packages/translation.yaml",
@@ -500,12 +521,12 @@
"version": "v4.4.3"
},
"symfony/web-profiler-bundle": {
- "version": "7.2",
+ "version": "7.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
- "version": "6.1",
- "ref": "8b51135b84f4266e3b4c8a6dc23c9d1e32e543b7"
+ "version": "7.3",
+ "ref": "a363460c1b0b4a4d0242f2ce1a843ca0f6ac9026"
},
"files": [
"config/packages/web_profiler.yaml",