Skip to content

Commit eefacb5

Browse files
authored
Merge pull request #18 from itk-dev/feature/4268-api-platform-v4
4268: API Platform v4
2 parents 1226b9f + 8f956ba commit eefacb5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+4014
-2313
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# EditorConfig is awesome: https://editorconfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
end_of_line = lf
8+
insert_final_newline = true
9+
charset = utf-8
10+
indent_style = space
11+
indent_size = 4
12+
13+
[*.{yml,yaml}]
14+
indent_size = 2
15+
16+
# Symfony uses 4 spaces for indent
17+
[config/**/*.{yml,yaml}]
18+
indent_size = 4

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
COMPOSE_PROJECT_NAME=event-database-api-2
1818
COMPOSE_DOMAIN=event-database-api.local.itkdev.dk
19+
ITKDEV_TEMPLATE=symfony-6
1920

2021
###> symfony/framework-bundle ###
2122
APP_ENV=dev

.env.dev

Whitespace-only changes.

.env.test

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ APP_SECRET='$ecretf0rt3st'
44
SYMFONY_DEPRECATIONS_HELPER=999999
55
PANTHER_APP_ENV=panther
66
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
7+
8+
APP_API_KEYS='[
9+
{"username": "test_user", "apikey": "test_api_key"}
10+
]'

.github/workflows/build_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
on:
22
push:
33
tags:
4-
- '*.*.*'
4+
- "*.*.*"
55

66
name: Create Github Release
77

.github/workflows/changelog.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Do not edit this file! Make a pull request on changing
2+
# github/workflows/changelog.yaml in
3+
# https://github.com/itk-dev/devops_itkdev-docker if need be.
4+
5+
### ### Changelog
6+
###
7+
### Checks that changelog has been updated
8+
9+
name: Changelog
10+
11+
on:
12+
pull_request:
13+
14+
jobs:
15+
changelog:
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 2
24+
25+
- name: Git fetch
26+
run: git fetch
27+
28+
- name: Check that changelog has been updated.
29+
run: git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md && exit 1 || exit 0

.github/workflows/composer.yaml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Do not edit this file! Make a pull request on changing
2+
# github/workflows/composer.yaml in
3+
# https://github.com/itk-dev/devops_itkdev-docker if need be.
4+
5+
### ### Composer
6+
###
7+
### Validates composer.json and checks that it's normalized.
8+
###
9+
### #### Assumptions
10+
###
11+
### 1. A docker compose service named `phpfpm` can be run and `composer` can be
12+
### run inside the `phpfpm` service.
13+
### 2. [ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize)
14+
### is a dev requirement in `composer.json`:
15+
###
16+
### ``` shell
17+
### docker compose run --rm phpfpm composer require --dev ergebnis/composer-normalize
18+
### ```
19+
###
20+
### Normalize `composer.json` by running
21+
###
22+
### ``` shell
23+
### docker compose run --rm phpfpm composer normalize
24+
### ```
25+
26+
name: Composer
27+
28+
env:
29+
COMPOSE_USER: root
30+
31+
on:
32+
pull_request:
33+
push:
34+
branches:
35+
- main
36+
- develop
37+
38+
jobs:
39+
composer-validate:
40+
runs-on: ubuntu-latest
41+
strategy:
42+
fail-fast: false
43+
steps:
44+
- uses: actions/checkout@v4
45+
- run: |
46+
docker network create frontend
47+
docker compose run --rm phpfpm composer validate --strict
48+
49+
composer-normalized:
50+
runs-on: ubuntu-latest
51+
strategy:
52+
fail-fast: false
53+
steps:
54+
- uses: actions/checkout@v4
55+
- run: |
56+
docker network create frontend
57+
docker compose run --rm phpfpm composer install
58+
docker compose run --rm phpfpm composer normalize --dry-run
59+
60+
composer-audit:
61+
runs-on: ubuntu-latest
62+
strategy:
63+
fail-fast: false
64+
steps:
65+
- uses: actions/checkout@v4
66+
- run: |
67+
docker network create frontend
68+
docker compose run --rm phpfpm composer audit

.github/workflows/markdown.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Do not edit this file! Make a pull request on changing
2+
# github/workflows/markdown.yaml in
3+
# https://github.com/itk-dev/devops_itkdev-docker if need be.
4+
5+
### ### Markdown
6+
###
7+
### Lints Markdown files (`**/*.md`) in the project.
8+
###
9+
### [markdownlint-cli configuration
10+
### files](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration),
11+
### `.markdownlint.jsonc` and `.markdownlintignore`, control what is actually
12+
### linted and how.
13+
###
14+
### #### Assumptions
15+
###
16+
### 1. A docker compose service named `markdownlint` for running `markdownlint`
17+
### (from
18+
### [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli))
19+
### exists.
20+
21+
name: Markdown
22+
23+
on:
24+
pull_request:
25+
push:
26+
branches:
27+
- main
28+
- develop
29+
30+
jobs:
31+
markdown-lint:
32+
runs-on: ubuntu-latest
33+
strategy:
34+
fail-fast: false
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
39+
- run: |
40+
docker network create frontend
41+
42+
- run: |
43+
docker compose run --rm markdownlint markdownlint '**/*.md'

.github/workflows/php.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Do not edit this file! Make a pull request on changing
2+
# github/workflows/symfony/php.yaml in
3+
# https://github.com/itk-dev/devops_itkdev-docker if need be.
4+
5+
### ### Symfony PHP
6+
###
7+
### Checks that PHP code adheres to the [Symfony coding
8+
### standards](https://symfony.com/doc/current/contributing/code/standards.html).
9+
###
10+
### #### Assumptions
11+
###
12+
### 1. A docker compose service named `phpfpm` can be run and `composer` can be
13+
### run inside the `phpfpm` service. 2.
14+
### [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer)
15+
### is a dev requirement in `composer.json`:
16+
###
17+
### ``` shell
18+
### docker compose run --rm phpfpm composer require --dev friendsofphp/php-cs-fixer
19+
### ```
20+
###
21+
### Clean up and check code by running
22+
###
23+
### ``` shell
24+
### docker compose run --rm phpfpm vendor/bin/php-cs-fixer fix
25+
### docker compose run --rm phpfpm vendor/bin/php-cs-fixer fix --dry-run --diff
26+
### ```
27+
###
28+
### > [!NOTE] The template adds `.php-cs-fixer.dist.php` as [a configuration
29+
### > file for PHP CS
30+
### > Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/config.rst)
31+
### > and this makes it possible to override the actual configuration used in a
32+
### > project by adding a more important configuration file, `.php-cs-fixer.php`.
33+
34+
name: Symfony PHP
35+
36+
env:
37+
COMPOSE_USER: root
38+
39+
on:
40+
pull_request:
41+
push:
42+
branches:
43+
- main
44+
- develop
45+
46+
jobs:
47+
coding-standards:
48+
name: PHP - Check Coding Standards
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v4
52+
- run: |
53+
docker network create frontend
54+
docker compose run --rm phpfpm composer install
55+
# https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/usage.rst#the-check-command
56+
docker compose run --rm phpfpm vendor/bin/php-cs-fixer fix --dry-run --diff

0 commit comments

Comments
 (0)