Skip to content

Commit d01b89a

Browse files
committed
4268: Re-linted YAML files
1 parent bf0e1ac commit d01b89a

25 files changed

+1083
-835
lines changed

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ indent_size = 4
1212

1313
[*.{yml,yaml}]
1414
indent_size = 2
15+
16+
# Symfony uses 4 spaces for indent
17+
[config/**/*.{yml,yaml}]
18+
indent_size = 4

.github/workflows/yaml.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ jobs:
3030
docker network create frontend
3131
3232
- run: |
33-
docker compose run --rm prettier '.github/workflows/*.{yml,yaml}' 'config/**/*.{yml,yaml}' --check
33+
docker compose run --rm prettier '**/*.{yml,yaml}' --check

.prettierrc.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# https://prettier.io/docs/configuration
2+
overrides:
3+
# Symfony config
4+
- files:
5+
- "config/**/*.{yml,yaml}"
6+
options:
7+
tabWidth: 4
8+
singleQuote: true

.woodpecker/prod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ steps:
2121
from_secret: prod_path
2222
user:
2323
from_secret: user
24-
playbook: 'release'
24+
playbook: "release"
2525
pre_up:
2626
- itkdev-docker-compose-server run --rm phpfpm bin/console cache:clear

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ See [keep a changelog] for information about writing changes to this log.
88

99
## [Unreleased]
1010

11+
- [PR-23](https://github.com/itk-dev/event-database-api/pull/23)
12+
Re-lint YAML files
1113
- [PR-21](https://github.com/itk-dev/event-database-api/pull/21)
1214
Linted YAML
1315
- [PR-18](https://github.com/itk-dev/event-database-api/pull/18)

Taskfile.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ vars:
99
# https://taskfile.dev/reference/templating/
1010
DOCKER_COMPOSE: '{{.TASK_DOCKER_COMPOSE | default "docker compose"}}'
1111

12-
# We're not yet ready to normalize config files …
13-
YAML_FILES_GLOB: "'.github/workflows/*.{yml,yaml}' 'config/**/*.{yml,yaml}' Taskfile.yml phpstan.dist.neon"
14-
1512
tasks:
1613
site:update:
1714
desc: Update/install site
@@ -156,7 +153,7 @@ tasks:
156153
cmds:
157154
- task: compose
158155
vars:
159-
COMPOSE_ARGS: run --rm prettier --parser yaml {{.YAML_FILES_GLOB}} --write
156+
COMPOSE_ARGS: run --rm prettier '**/*.{yml,yaml}' --write
160157
silent: true
161158

162159
coding-standards:yaml:check:
@@ -165,7 +162,7 @@ tasks:
165162
- task: coding-standards:yaml:apply
166163
- task: compose
167164
vars:
168-
COMPOSE_ARGS: run --rm prettier --parser yaml {{.YAML_FILES_GLOB}} --check
165+
COMPOSE_ARGS: run --rm prettier '**/*.{yml,yaml}' --check
169166
silent: true
170167

171168
code-analysis:

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

0 commit comments

Comments
 (0)