Skip to content

4268: API Platform v4 #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 38 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
ca9759c
4268: Updated docker compose setup
rimi-itk Jun 2, 2025
d38efb9
# This is a combination of 2 commits.
rimi-itk Jun 2, 2025
67e9822
4268: Updated fixture loader to delete index before creating it
rimi-itk Jun 2, 2025
6ecf3b4
4268: Added healthcheck to elasticsearch service
rimi-itk Jun 2, 2025
4ce09d1
4268: Updated fixture loader to allow loading from local files
rimi-itk Jun 2, 2025
c09b61c
4268: Added and used local resources for testing
rimi-itk Jun 2, 2025
be5923d
4268: Improved test setup
rimi-itk Jun 4, 2025
3e5f758
4268: Cleaned up
rimi-itk Jun 4, 2025
f1675a7
4268: Used tasks (and docker compose) in actions (and fixed some typos)
rimi-itk Jun 4, 2025
56c129f
4268: Upgraded to API Platform 3.4 (for real)
rimi-itk Jun 4, 2025
0569611
4268: Updated API tests
rimi-itk Jun 4, 2025
19278eb
4268: Upgraded to API Platform 4.1
rimi-itk Jun 4, 2025
1d42d36
4268: Updated composer packages
rimi-itk Jun 4, 2025
f213189
4268: Updated phpunit/phpunit recipe
rimi-itk Jun 4, 2025
a6bef83
4268: Updated symfony/console recipe
rimi-itk Jun 4, 2025
fac42b2
4268: Updated symfony/flex recipe
rimi-itk Jun 4, 2025
ffdb85f
4268: Updated symfony/framework-bundle recipe
rimi-itk Jun 4, 2025
3c0070f
4268: Updated symfony/twig-bundle recipe
rimi-itk Jun 4, 2025
0162387
4268: Updated symfony/web-profiler-bundle recipe
rimi-itk Jun 4, 2025
b6cb8be
4268: Updated symfony/phpunit-bridge
rimi-itk Jun 4, 2025
5be4382
4268: Updated comments to remove unused imports (!)
rimi-itk Jun 4, 2025
84ac2c3
4268: Replaced Psaml with PHPStan
rimi-itk Jun 4, 2025
263c400
4268: Updated PHPStan config
rimi-itk Jun 4, 2025
248ea02
4268: Updated "openid" parameters
rimi-itk Jun 4, 2025
81dc01a
4268: Fixed return type
rimi-itk Jun 4, 2025
582854f
4268: Updated PHPStan config
rimi-itk Jun 4, 2025
d081e6c
4268: Added function parameter types
rimi-itk Jun 4, 2025
f3569d4
4268: Cleaned up API user provider
rimi-itk Jun 4, 2025
8957545
4268: Updated PHPStan config
rimi-itk Jun 4, 2025
6df3792
4268: Removed superfluous property
rimi-itk Jun 4, 2025
6eae19e
Merge pull request #19 from itk-dev/feature/4268-api-platform-v4-phpstan
rimi-itk Jun 10, 2025
ceaa324
4268: Added more event filter tests
rimi-itk Jun 10, 2025
db7ea74
4268: Cleaned up task file
rimi-itk Jun 10, 2025
6123fe9
4268: Moved YAML action to separate workflow file
rimi-itk Jun 11, 2025
81cdc2d
4268: Linted YAML files
rimi-itk Jun 11, 2025
bf0e1ac
Merge pull request #21 from itk-dev/feature/4268-api-platform-v4-yaml…
rimi-itk Jun 11, 2025
8f7f777
4268: Re-linted YAML files
rimi-itk Jun 12, 2025
8f956ba
Merge pull request #23 from itk-dev/feature/4268-api-platform-v4-yaml…
rimi-itk Jun 12, 2025
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
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# EditorConfig is awesome: https://editorconfig.org

# top-most EditorConfig file
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4

[*.{yml,yaml}]
indent_size = 2

# Symfony uses 4 spaces for indent
[config/**/*.{yml,yaml}]
indent_size = 4
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

COMPOSE_PROJECT_NAME=event-database-api-2
COMPOSE_DOMAIN=event-database-api.local.itkdev.dk
ITKDEV_TEMPLATE=symfony-6

###> symfony/framework-bundle ###
APP_ENV=dev
Expand Down
Empty file added .env.dev
Empty file.
4 changes: 4 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ APP_SECRET='$ecretf0rt3st'
SYMFONY_DEPRECATIONS_HELPER=999999
PANTHER_APP_ENV=panther
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots

APP_API_KEYS='[
{"username": "test_user", "apikey": "test_api_key"}
]'
2 changes: 1 addition & 1 deletion .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
tags:
- '*.*.*'
- "*.*.*"

name: Create Github Release

Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Do not edit this file! Make a pull request on changing
# github/workflows/changelog.yaml in
# https://github.com/itk-dev/devops_itkdev-docker if need be.

### ### Changelog
###
### Checks that changelog has been updated

name: Changelog

on:
pull_request:

jobs:
changelog:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Git fetch
run: git fetch

- name: Check that changelog has been updated.
run: git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md && exit 1 || exit 0
68 changes: 68 additions & 0 deletions .github/workflows/composer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Do not edit this file! Make a pull request on changing
# github/workflows/composer.yaml in
# https://github.com/itk-dev/devops_itkdev-docker if need be.

### ### Composer
###
### Validates composer.json and checks that it's normalized.
###
### #### Assumptions
###
### 1. A docker compose service named `phpfpm` can be run and `composer` can be
### run inside the `phpfpm` service.
### 2. [ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize)
### is a dev requirement in `composer.json`:
###
### ``` shell
### docker compose run --rm phpfpm composer require --dev ergebnis/composer-normalize
### ```
###
### Normalize `composer.json` by running
###
### ``` shell
### docker compose run --rm phpfpm composer normalize
### ```

name: Composer

env:
COMPOSE_USER: root

on:
pull_request:
push:
branches:
- main
- develop

jobs:
composer-validate:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- run: |
docker network create frontend
docker compose run --rm phpfpm composer validate --strict

composer-normalized:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- run: |
docker network create frontend
docker compose run --rm phpfpm composer install
docker compose run --rm phpfpm composer normalize --dry-run

composer-audit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- run: |
docker network create frontend
docker compose run --rm phpfpm composer audit
43 changes: 43 additions & 0 deletions .github/workflows/markdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Do not edit this file! Make a pull request on changing
# github/workflows/markdown.yaml in
# https://github.com/itk-dev/devops_itkdev-docker if need be.

### ### Markdown
###
### Lints Markdown files (`**/*.md`) in the project.
###
### [markdownlint-cli configuration
### files](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration),
### `.markdownlint.jsonc` and `.markdownlintignore`, control what is actually
### linted and how.
###
### #### Assumptions
###
### 1. A docker compose service named `markdownlint` for running `markdownlint`
### (from
### [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli))
### exists.

name: Markdown

on:
pull_request:
push:
branches:
- main
- develop

jobs:
markdown-lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4

- run: |
docker network create frontend

- run: |
docker compose run --rm markdownlint markdownlint '**/*.md'
56 changes: 56 additions & 0 deletions .github/workflows/php.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Do not edit this file! Make a pull request on changing
# github/workflows/symfony/php.yaml in
# https://github.com/itk-dev/devops_itkdev-docker if need be.

### ### Symfony PHP
###
### Checks that PHP code adheres to the [Symfony coding
### standards](https://symfony.com/doc/current/contributing/code/standards.html).
###
### #### Assumptions
###
### 1. A docker compose service named `phpfpm` can be run and `composer` can be
### run inside the `phpfpm` service. 2.
### [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer)
### is a dev requirement in `composer.json`:
###
### ``` shell
### docker compose run --rm phpfpm composer require --dev friendsofphp/php-cs-fixer
### ```
###
### Clean up and check code by running
###
### ``` shell
### docker compose run --rm phpfpm vendor/bin/php-cs-fixer fix
### docker compose run --rm phpfpm vendor/bin/php-cs-fixer fix --dry-run --diff
### ```
###
### > [!NOTE] The template adds `.php-cs-fixer.dist.php` as [a configuration
### > file for PHP CS
### > Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/config.rst)
### > and this makes it possible to override the actual configuration used in a
### > project by adding a more important configuration file, `.php-cs-fixer.php`.

name: Symfony PHP

env:
COMPOSE_USER: root

on:
pull_request:
push:
branches:
- main
- develop

jobs:
coding-standards:
name: PHP - Check Coding Standards
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
docker network create frontend
docker compose run --rm phpfpm composer install
# https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/usage.rst#the-check-command
docker compose run --rm phpfpm vendor/bin/php-cs-fixer fix --dry-run --diff
Loading