Skip to content

Commit 9d82c88

Browse files
committed
4268: Linted YAML files
1 parent 6123fe9 commit 9d82c88

15 files changed

+190
-190
lines changed

Taskfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ vars:
1010
DOCKER_COMPOSE: '{{.TASK_DOCKER_COMPOSE | default "docker compose"}}'
1111

1212
# We're not yet ready to normalize config files …
13-
YAML_FILES_GLOB: "Taskfile.yml .github/workflows/**.{yml,yaml} phpstan.dist.neon"
13+
YAML_FILES_GLOB: ".github/workflows/*.{yml,yaml} config/**/*.yaml Taskfile.yml phpstan.dist.neon"
1414

1515
tasks:
1616
site:update:

config/packages/api_platform.yaml

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
11
api_platform:
2-
title: '%env(OPENAPI_TITLE)%'
3-
description: '%env(OPENAPI_DESCRIPTION)%'
4-
version: 2.0.0
5-
show_webby: false
6-
7-
openapi:
8-
contact:
9-
name: '%env(OPENAPI_CONTACT_NAME)%'
10-
url: '%env(OPENAPI_CONTACT_URL)%'
11-
email: '%env(OPENAPI_CONTACT_EMAIL)%'
12-
termsOfService: '%env(OPENAPI_TERMS_OF_SERVICE)%'
13-
14-
formats:
15-
jsonld: ['application/ld+json']
16-
17-
docs_formats:
18-
jsonld: ['application/ld+json']
19-
jsonopenapi: ['application/vnd.openapi+json']
20-
html: ['text/html']
21-
22-
mapping:
23-
paths:
24-
- '%kernel.project_dir%/src/Api/Dto'
25-
26-
doctrine:
27-
enabled: false
28-
29-
swagger:
30-
api_keys:
31-
ApiKeyAuth:
32-
name: 'X-Api-Key'
33-
type: header
34-
35-
elasticsearch:
36-
hosts: ['%env(INDEX_URL)%']
37-
38-
defaults:
39-
stateless: true
40-
pagination_items_per_page: '%env(int:PAGINATION_ITEMS_PER_PAGE)%'
41-
pagination_maximum_items_per_page: '%env(int:PAGINATION_MAXIMUM_ITEMS_PER_PAGE)%'
42-
cache_headers:
43-
max_age: 3600
44-
shared_max_age: 3600
45-
vary: ['Content-Type', 'Authorization', 'Origin']
46-
extra_properties:
47-
# Note: The api-platform/core 3.4 recipe sets `standard_put` eventhough
48-
# https://api-platform.com/docs/core/upgrade-guide/#api-platform-34
49-
# (probably) tells us to remove it
50-
# standard_put: true
51-
# https://api-platform.com/docs/core/upgrade-guide/#api-platform-34
52-
rfc_7807_compliant_errors: true
53-
# Note: The api-platform/core 3.4 recipe wants `use_symfony_listeners` to be true
54-
use_symfony_listeners: false
55-
56-
# https://api-platform.com/docs/core/upgrade-guide/#upgrade-guide
57-
serializer:
58-
hydra_prefix: true
2+
title: "%env(OPENAPI_TITLE)%"
3+
description: "%env(OPENAPI_DESCRIPTION)%"
4+
version: 2.0.0
5+
show_webby: false
6+
7+
openapi:
8+
contact:
9+
name: "%env(OPENAPI_CONTACT_NAME)%"
10+
url: "%env(OPENAPI_CONTACT_URL)%"
11+
email: "%env(OPENAPI_CONTACT_EMAIL)%"
12+
termsOfService: "%env(OPENAPI_TERMS_OF_SERVICE)%"
13+
14+
formats:
15+
jsonld: ["application/ld+json"]
16+
17+
docs_formats:
18+
jsonld: ["application/ld+json"]
19+
jsonopenapi: ["application/vnd.openapi+json"]
20+
html: ["text/html"]
21+
22+
mapping:
23+
paths:
24+
- "%kernel.project_dir%/src/Api/Dto"
25+
26+
doctrine:
27+
enabled: false
28+
29+
swagger:
30+
api_keys:
31+
ApiKeyAuth:
32+
name: "X-Api-Key"
33+
type: header
34+
35+
elasticsearch:
36+
hosts: ["%env(INDEX_URL)%"]
37+
38+
defaults:
39+
stateless: true
40+
pagination_items_per_page: "%env(int:PAGINATION_ITEMS_PER_PAGE)%"
41+
pagination_maximum_items_per_page: "%env(int:PAGINATION_MAXIMUM_ITEMS_PER_PAGE)%"
42+
cache_headers:
43+
max_age: 3600
44+
shared_max_age: 3600
45+
vary: ["Content-Type", "Authorization", "Origin"]
46+
extra_properties:
47+
# Note: The api-platform/core 3.4 recipe sets `standard_put` eventhough
48+
# https://api-platform.com/docs/core/upgrade-guide/#api-platform-34
49+
# (probably) tells us to remove it
50+
# standard_put: true
51+
# https://api-platform.com/docs/core/upgrade-guide/#api-platform-34
52+
rfc_7807_compliant_errors: true
53+
# Note: The api-platform/core 3.4 recipe wants `use_symfony_listeners` to be true
54+
use_symfony_listeners: false
55+
56+
# https://api-platform.com/docs/core/upgrade-guide/#upgrade-guide
57+
serializer:
58+
hydra_prefix: true

config/packages/cache.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
framework:
2-
cache:
3-
# Unique name of your app: used to compute stable namespaces for cache keys.
4-
#prefix_seed: your_vendor_name/app_name
2+
cache:
3+
# Unique name of your app: used to compute stable namespaces for cache keys.
4+
#prefix_seed: your_vendor_name/app_name
55

6-
# The "app" cache stores to the filesystem by default.
7-
# The data in this cache should persist between deploys.
8-
# Other options include:
6+
# The "app" cache stores to the filesystem by default.
7+
# The data in this cache should persist between deploys.
8+
# Other options include:
99

10-
# Redis
11-
#app: cache.adapter.redis
12-
#default_redis_provider: redis://localhost
10+
# Redis
11+
#app: cache.adapter.redis
12+
#default_redis_provider: redis://localhost
1313

14-
# APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
15-
#app: cache.adapter.apcu
14+
# APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
15+
#app: cache.adapter.apcu
1616

17-
# Namespaced pools use the above "app" backend by default
18-
#pools:
19-
#my.dedicated.cache: null
17+
# Namespaced pools use the above "app" backend by default
18+
#pools:
19+
#my.dedicated.cache: null

config/packages/framework.yaml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
# see https://symfony.com/doc/current/reference/configuration/framework.html
22
framework:
3-
secret: '%env(APP_SECRET)%'
4-
annotations: false
5-
http_method_override: false
6-
handle_all_throwables: true
3+
secret: "%env(APP_SECRET)%"
4+
annotations: false
5+
http_method_override: false
6+
handle_all_throwables: true
77

8-
# Enables session support. Note that the session will ONLY be started if you read or write from it.
9-
# Remove or comment this section to explicitly disable session support.
10-
session:
11-
handler_id: null
12-
cookie_secure: auto
13-
cookie_samesite: lax
8+
# Enables session support. Note that the session will ONLY be started if you read or write from it.
9+
# Remove or comment this section to explicitly disable session support.
10+
session:
11+
handler_id: null
12+
cookie_secure: auto
13+
cookie_samesite: lax
1414

15-
#esi: true
16-
#fragments: true
17-
php_errors:
18-
log: true
15+
#esi: true
16+
#fragments: true
17+
php_errors:
18+
log: true
1919

20-
assets:
21-
base_path: '%env(APP_PATH_PREFIX)%'
20+
assets:
21+
base_path: "%env(APP_PATH_PREFIX)%"
2222

2323
when@test:
24-
framework:
25-
test: true
26-
session:
27-
storage_factory_id: session.storage.factory.mock_file
24+
framework:
25+
test: true
26+
session:
27+
storage_factory_id: session.storage.factory.mock_file

config/packages/http_discovery.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
services:
2-
Psr\Http\Message\RequestFactoryInterface: '@http_discovery.psr17_factory'
3-
Psr\Http\Message\ResponseFactoryInterface: '@http_discovery.psr17_factory'
4-
Psr\Http\Message\ServerRequestFactoryInterface: '@http_discovery.psr17_factory'
5-
Psr\Http\Message\StreamFactoryInterface: '@http_discovery.psr17_factory'
6-
Psr\Http\Message\UploadedFileFactoryInterface: '@http_discovery.psr17_factory'
7-
Psr\Http\Message\UriFactoryInterface: '@http_discovery.psr17_factory'
2+
Psr\Http\Message\RequestFactoryInterface: "@http_discovery.psr17_factory"
3+
Psr\Http\Message\ResponseFactoryInterface: "@http_discovery.psr17_factory"
4+
Psr\Http\Message\ServerRequestFactoryInterface: "@http_discovery.psr17_factory"
5+
Psr\Http\Message\StreamFactoryInterface: "@http_discovery.psr17_factory"
6+
Psr\Http\Message\UploadedFileFactoryInterface: "@http_discovery.psr17_factory"
7+
Psr\Http\Message\UriFactoryInterface: "@http_discovery.psr17_factory"
88

9-
http_discovery.psr17_factory:
10-
class: Http\Discovery\Psr17Factory
9+
http_discovery.psr17_factory:
10+
class: Http\Discovery\Psr17Factory

config/packages/nelmio_cors.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
nelmio_cors:
2-
defaults:
3-
origin_regex: true
4-
allow_origin: ['%env(CORS_ALLOW_ORIGIN)%']
5-
allow_methods: ['GET', 'OPTIONS']
6-
allow_headers: ['Content-Type', 'X-Api-Key']
7-
expose_headers: ['Link']
8-
max_age: 3600
9-
paths:
10-
'^/': null
2+
defaults:
3+
origin_regex: true
4+
allow_origin: ["%env(CORS_ALLOW_ORIGIN)%"]
5+
allow_methods: ["GET", "OPTIONS"]
6+
allow_headers: ["Content-Type", "X-Api-Key"]
7+
expose_headers: ["Link"]
8+
max_age: 3600
9+
paths:
10+
"^/": null

config/packages/routing.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
framework:
2-
router:
3-
utf8: true
2+
router:
3+
utf8: true
44

5-
# Configure how to generate URLs in non-HTTP contexts, such as CLI commands.
6-
# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands
7-
#default_uri: http://localhost
5+
# Configure how to generate URLs in non-HTTP contexts, such as CLI commands.
6+
# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands
7+
#default_uri: http://localhost
88

99
when@prod:
10-
framework:
11-
router:
12-
strict_requirements: null
10+
framework:
11+
router:
12+
strict_requirements: null

config/packages/security.yaml

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
security:
2-
# https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
3-
password_hashers:
4-
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
5-
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
6-
providers:
7-
users_in_memory: { memory: null }
8-
api_user_provider:
9-
id: App\Security\ApiUserProvider
10-
firewalls:
11-
dev:
12-
pattern: ^/(_(profiler|wdt)|css|images|js)/
13-
security: false
14-
main:
15-
stateless: true
16-
custom_authenticators:
17-
- App\Security\ApiKeyAuthenticator
18-
provider: api_user_provider
2+
# https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
3+
password_hashers:
4+
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: "auto"
5+
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
6+
providers:
7+
users_in_memory: { memory: null }
8+
api_user_provider:
9+
id: App\Security\ApiUserProvider
10+
firewalls:
11+
dev:
12+
pattern: ^/(_(profiler|wdt)|css|images|js)/
13+
security: false
14+
main:
15+
stateless: true
16+
custom_authenticators:
17+
- App\Security\ApiKeyAuthenticator
18+
provider: api_user_provider
1919

20-
# activate different ways to authenticate
21-
# https://symfony.com/doc/current/security.html#the-firewall
20+
# activate different ways to authenticate
21+
# https://symfony.com/doc/current/security.html#the-firewall
2222

23-
# https://symfony.com/doc/current/security/impersonating_user.html
24-
# switch_user: true
23+
# https://symfony.com/doc/current/security/impersonating_user.html
24+
# switch_user: true
2525

26-
# Easy way to control access for large sections of your site
27-
# Note: Only the *first* access control that matches will be used
28-
access_control:
29-
- { path: ^/api/v2/docs, roles: PUBLIC_ACCESS }
30-
- { path: ^/api, roles: IS_AUTHENTICATED_FULLY }
31-
# - { path: ^/profile, roles: ROLE_USER }
26+
# Easy way to control access for large sections of your site
27+
# Note: Only the *first* access control that matches will be used
28+
access_control:
29+
- { path: ^/api/v2/docs, roles: PUBLIC_ACCESS }
30+
- { path: ^/api, roles: IS_AUTHENTICATED_FULLY }
31+
# - { path: ^/profile, roles: ROLE_USER }
3232

3333
when@test:
34-
security:
35-
password_hashers:
36-
# By default, password hashers are resource intensive and take time. This is
37-
# important to generate secure password hashes. In tests however, secure hashes
38-
# are not important, waste resources and increase test times. The following
39-
# reduces the work factor to the lowest possible values.
40-
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
41-
algorithm: auto
42-
cost: 4 # Lowest possible value for bcrypt
43-
time_cost: 3 # Lowest possible value for argon
44-
memory_cost: 10 # Lowest possible value for argon
34+
security:
35+
password_hashers:
36+
# By default, password hashers are resource intensive and take time. This is
37+
# important to generate secure password hashes. In tests however, secure hashes
38+
# are not important, waste resources and increase test times. The following
39+
# reduces the work factor to the lowest possible values.
40+
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
41+
algorithm: auto
42+
cost: 4 # Lowest possible value for bcrypt
43+
time_cost: 3 # Lowest possible value for argon
44+
memory_cost: 10 # Lowest possible value for argon

config/packages/twig.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
twig:
2-
file_name_pattern: '*.twig'
2+
file_name_pattern: "*.twig"
33

4-
globals:
5-
app_project_uri: '%env(APP_PROJECT_URI)%'
4+
globals:
5+
app_project_uri: "%env(APP_PROJECT_URI)%"
66

77
when@test:
8-
twig:
9-
strict_variables: true
8+
twig:
9+
strict_variables: true

config/packages/validator.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
framework:
2-
validation:
3-
email_validation_mode: html5
2+
validation:
3+
email_validation_mode: html5
44

5-
# Enables validator auto-mapping support.
6-
# For instance, basic validation constraints will be inferred from Doctrine's metadata.
7-
#auto_mapping:
8-
# App\Entity\: []
5+
# Enables validator auto-mapping support.
6+
# For instance, basic validation constraints will be inferred from Doctrine's metadata.
7+
#auto_mapping:
8+
# App\Entity\: []
99

1010
when@test:
11-
framework:
12-
validation:
13-
not_compromised_password: false
11+
framework:
12+
validation:
13+
not_compromised_password: false

0 commit comments

Comments
 (0)