Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
bbf9139
Merge pull request #16 from itk-dev/release/1.1.0
turegjorup Mar 24, 2025
00acc42
Merge tag '1.1.0' into develop
turegjorup Mar 24, 2025
1d86d4a
Merge pull request #17 from itk-dev/hotfix/1.1.1
turegjorup Mar 28, 2025
1226b9f
Merge tag '1.1.1' into develop
turegjorup Mar 28, 2025
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
eefacb5
Merge pull request #18 from itk-dev/feature/4268-api-platform-v4
rimi-itk Aug 27, 2025
17ab71d
5282: Updated docker compose setup
rimi-itk Aug 27, 2025
46fb7ad
5282: Updated to PHP 7.4
rimi-itk Aug 27, 2025
4b53ce9
5282: Updated project template
rimi-itk Aug 27, 2025
afe0dba
5282: Upgraded to Symfony 7.3
rimi-itk Aug 27, 2025
f48e89e
5282: Resolved some deprecations
rimi-itk Aug 27, 2025
6b05f98
5282: Updated PHPUnit
rimi-itk Aug 27, 2025
c4771ac
5282: Updated API spec
rimi-itk Aug 27, 2025
4534616
5282: Cleaned up link text
rimi-itk Aug 27, 2025
b0c1054
5282: Cleaned up composer.json
rimi-itk Aug 27, 2025
5592541
5282: Updated changelog
rimi-itk Aug 27, 2025
21db0ca
5282: Updated symfony/framework-bundle recipe
rimi-itk Aug 27, 2025
84d7136
5282: Updated symfony/routing recipe
rimi-itk Aug 27, 2025
caf8285
5282: Updated symfony/validator recipe
rimi-itk Aug 27, 2025
86fd29b
5282: Updated symfony/web-profiler-bundle recipe
rimi-itk Aug 27, 2025
3a78c3b
5282: Restored assets base path
rimi-itk Aug 27, 2025
65ea162
5282: Restored some docker compose stuff
rimi-itk Aug 28, 2025
f3e3d1c
5282: Updated composer packages
rimi-itk Aug 28, 2025
f30d6e7
Merge pull request #24 from itk-dev/feature/symfony-7-php-8.4
rimi-itk Sep 2, 2025
ddae1c9
Release 1.2.0
rimi-itk Sep 2, 2025
bfacc3b
4881: Update dependencies
turegjorup Oct 1, 2025
9731fdb
4881: Update comments og traefik labels for shared hosting
turegjorup Oct 2, 2025
fff3f93
4881: Update github actions to latest versions
turegjorup Oct 2, 2025
3104316
4881: Add API spec check
turegjorup Oct 2, 2025
15990e5
4881: Add github action to check and validate API changes
turegjorup Oct 6, 2025
ffeac7a
4881: Lock api-platform to 4.1.* to avoid breaking API changes
turegjorup Oct 6, 2025
483d28b
4881: Updated Changelog
turegjorup Oct 6, 2025
bf0922f
5210: Add better error messages for api responses
turegjorup Oct 6, 2025
2c027e1
4881: Update traefik label explanation
turegjorup Oct 6, 2025
fb435d6
4881: Update api spec with new comments
turegjorup Oct 7, 2025
ba5ffc0
4881: Code style fixes
turegjorup Oct 7, 2025
85c5772
4881: Updated Changelog
turegjorup Oct 7, 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
3 changes: 1 addition & 2 deletions .docker/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ events {
worker_connections 1024;
}


http {
proxy_temp_path /tmp/proxy_temp;
client_body_temp_path /tmp/client_temp;
Expand All @@ -18,7 +17,7 @@ http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

set_real_ip_from 172.16.0.0/8;
set_real_ip_from 172.16.0.0/16;
real_ip_recursive on;
real_ip_header X-Forwarded-For;

Expand Down
7 changes: 7 additions & 0 deletions .docker/templates/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ server {

root ${NGINX_WEB_ROOT};

client_max_body_size ${NGINX_MAX_BODY_SIZE};

# This also needs to be set in the single server tag and not only in http.
set_real_ip_from 172.16.0.0/16;
real_ip_recursive on;
real_ip_header X-Forwarded-For;

location / {
# We are co-hosting with the legacy EventDB, so this app is hosted under '/api/v2/' (.env::APP_PATH_PREFIX)
# This is configured for Symfony in both 'api_platform.prefix' and 'framework.assets.base_path'. However
Expand Down
24 changes: 24 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This file is copied from config/symfony/.editorconfig in https://github.com/itk-dev/devops_itkdev-docker.
# Feel free to edit the file, but consider making a pull request if you find a general issue with the file.

# EditorConfig is awesome: https://editorconfig.org

# top-most EditorConfig file
root = true

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

[*.{js,css,scss}]
indent_size = 2

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

[config/**/*.{yml,yaml}]
indent_size = 4
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@

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
APP_SECRET=01324d73757787ffeba5f2f76cec1a28
APP_SECRET=
###< symfony/framework-bundle ###

###> app ###
Expand Down
4 changes: 4 additions & 0 deletions .env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

###> symfony/framework-bundle ###
APP_SECRET=4610ac31018b4685674121ea39d8a4c8
###< symfony/framework-bundle ###
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"}
]'
114 changes: 114 additions & 0 deletions .github/workflows/api-spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
on:
pull_request:

name: API Spec review

env:
COMPOSE_USER: root

jobs:
api-spec:
runs-on: ubuntu-latest
name: Ensure committed API specification is up to date
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 2

# https://taskfile.dev/installation/#github-actions
- uses: go-task/setup-task@v1

- run: |
docker network create frontend
task --yes site:update

- name: Export API specification
run: |
task --yes api:spec:export

- name: Check for changes in specification
id: git-diff-spec
continue-on-error: true
run: git diff --diff-filter=ACMRT --exit-code public/spec.yaml

- name: Comment PR
if: steps.git-diff-spec.outcome == 'failure'
env:
GH_TOKEN: ${{ github.token }}
run: |
echo '## 🛑 Exported API specification file not up to date' > var/comment.md
echo '' >> var/comment.md
echo 'Please run `task api:spec:export` to export the API specification. Then commit and push the changes.' >> var/comment.md
gh pr comment ${{ github.event.pull_request.number }} --body-file var/comment.md --create-if-none --edit-last

- name: Fail job api spec is not up to date
if: steps.git-diff-spec.outcome == 'failure'
run: |
exit 1

detect-breaking-changes:
name: Detect breaking changes in API specification
runs-on: ubuntu-latest
needs: [api-spec]
steps:
- name: Check out BASE rev
uses: actions/checkout@v5
with:
ref: ${{ github.base_ref }}
path: base

- name: Check out HEAD rev
uses: actions/checkout@v5
with:
ref: ${{ github.head_ref }}
path: head

- name: Run OpenAPI Changed (from HEAD rev)
id: api-changed
continue-on-error: true
uses: docker://openapitools/openapi-diff:latest
with:
args: --fail-on-changed base/public/spec.yaml head/public/spec.yaml --markdown api-spec-changed.md

- name: Run OpenAPI Incompatible (from HEAD rev)
id: api-incompatible
continue-on-error: true
uses: docker://openapitools/openapi-diff:latest
with:
args: --fail-on-incompatible base/public/spec.yaml head/public/spec.yaml --markdown api-spec-incompatible.md

- name: Comment PR with no changes
if: steps.api-changed.outcome == 'success' && steps.api-incompatible.outcome == 'success'
working-directory: head
env:
GH_TOKEN: ${{ github.token }}
run: |
gh pr comment ${{ github.event.pull_request.number }} --body "✅ **No changes detected in API specification**" --create-if-none --edit-last

- name: Comment PR with non-breaking changes
if: steps.api-changed.outcome == 'failure' && steps.api-incompatible.outcome == 'success'
working-directory: head
env:
GH_TOKEN: ${{ github.token }}
run: |
echo "## ⚠️ Non-Breaking changes detected in API specification" > ../comment.md
echo "" >> ../comment.md
cat ../api-spec-changed.md >> ../comment.md
gh pr comment ${{ github.event.pull_request.number }} --body-file ../comment.md --create-if-none --edit-last

- name: Comment PR with breaking changes
if: steps.api-incompatible.outcome == 'failure'
working-directory: head
env:
GH_TOKEN: ${{ github.token }}
run: |
echo "## 🛑 Breaking changes detected in API specification" > ../comment.md
echo "" >> ../comment.md
cat ../api-spec-incompatible.md >> ../comment.md
gh pr comment ${{ github.event.pull_request.number }} --body-file ../comment.md --create-if-none --edit-last

- name: Fail if breaking changes detected
if: steps.api-incompatible.outcome == 'failure'
run: |
exit 1
4 changes: 2 additions & 2 deletions .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 All @@ -16,7 +16,7 @@ jobs:
APP_ENV: prod
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Composer install
run: |
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@v5
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
80 changes: 80 additions & 0 deletions .github/workflows/composer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# 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@v5

- name: Create docker network
run: |
docker network create frontend

- run: |
docker compose run --rm phpfpm composer validate --strict

composer-normalized:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v5

- name: Create docker network
run: |
docker network create frontend

- run: |
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@v5

- name: Create docker network
run: |
docker network create frontend

- run: |
docker compose run --rm phpfpm composer audit
44 changes: 44 additions & 0 deletions .github/workflows/markdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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@v5

- name: Create docker network
run: |
docker network create frontend

- run: |
docker compose run --rm markdownlint markdownlint '**/*.md'
Loading