Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

###> symfony/framework-bundle ###
APP_ENV=test
APP_SECRET=2edbe69f411744beb240bc58fff311bd
APP_SECRET='$ecretf0rt3st'
###< symfony/framework-bundle ###

###> symfony-flex-backend ###
Expand Down
Empty file modified bin/phpunit
100755 → 100644
Empty file.
11 changes: 11 additions & 0 deletions config/packages/csrf.yaml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions config/packages/property_info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
framework:
property_info:
with_constructor_extractor: true
2 changes: 1 addition & 1 deletion config/packages/routing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
18 changes: 9 additions & 9 deletions config/packages/translation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)%'
4 changes: 3 additions & 1 deletion config/packages/web_profiler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ when@dev:

when@test:
framework:
profiler: { collect: false }
profiler:
collect: false
collect_serializer_data: true
2 changes: 1 addition & 1 deletion config/routes/framework.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
4 changes: 2 additions & 2 deletions config/routes/web_profiler.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)%'
Expand Down
43 changes: 28 additions & 15 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@
>
<coverage>
<report>
<clover outputFile="build/logs/clover.xml"/>
<html outputDirectory="build/report" lowUpperBound="75" highLowerBound="95"/>
<text outputFile="php://stdout" showOnlySummary="true" showUncoveredFiles="true"/>
<clover outputFile="build/logs/clover.xml" />
<html outputDirectory="build/report" lowUpperBound="75" highLowerBound="95" />
<text outputFile="php://stdout" showOnlySummary="true" showUncoveredFiles="true" />
</report>
</coverage>

<php>
<ini name="error_reporting" value="-1"/>
<ini name="display_errors" value="On"/>
<ini name="display_startup_errors" value="On"/>
<ini name="date.timezone" value="UTC"/>
<env name="KERNEL_CLASS" value="App\Kernel"/>
<env name="SHELL_VERBOSITY" value="-1"/>
<env name="USE_ALL_USER_COMBINATIONS" value="no"/>
<env name="APP_ENV" value="test" force="true"/>
<env name="APP_DEBUG" value="false" force="true"/>
<env name="APP_SECRET" value="93b60d4136baea83cf3821ee6a0a2adb"/>
<ini name="error_reporting" value="-1" />
<ini name="display_errors" value="On" />
<ini name="display_startup_errors" value="On" />
<ini name="date.timezone" value="UTC" />
<env name="KERNEL_CLASS" value="App\Kernel" />
<env name="SHELL_VERBOSITY" value="-1" />
<env name="USE_ALL_USER_COMBINATIONS" value="no" />
<env name="APP_ENV" value="test" force="true" />
<env name="APP_DEBUG" value="false" force="true" />
<env name="APP_SECRET" value="93b60d4136baea83cf3821ee6a0a2adb" />
<!--
To make sure that application has no "direct" deprecations we use `max[direct]=0` as a default one
indirect deprecations are just shown on test output to help to track those.
Expand All @@ -45,9 +45,17 @@

https://symfony.com/doc/current/components/phpunit_bridge.html#direct-and-indirect-deprecations
-->
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=0"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=0" />
</php>

<extensions>
<bootstrap class="Symfony\Bridge\PhpUnit\SymfonyExtension">
<parameter name="clock-mock-namespaces" value="App" />
<parameter name="dns-mock-namespaces" value="App" />
</bootstrap>
</extensions>


<testsuites>
<testsuite name="Unit">
<directory>./tests/Unit/</directory>
Expand All @@ -67,7 +75,7 @@
</testsuites>

<logging>
<junit outputFile="build/logs/junit.xml"/>
<junit outputFile="build/logs/junit.xml" />
</logging>

<source
Expand All @@ -85,5 +93,10 @@
<directory>./src/Migrations</directory>
<file>./src/Kernel.php</file>
</exclude>

<deprecationTrigger>
<method>Doctrine\Deprecations\Deprecation::trigger</method>
<method>Doctrine\Deprecations\Deprecation::delegateTriggerToBackend</method>
</deprecationTrigger>
</source>
</phpunit>
1 change: 1 addition & 0 deletions secrets/application.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 1 addition & 0 deletions secrets/application_test.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
73 changes: 47 additions & 26 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"
]
},
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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"
Expand All @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
Loading