Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 10 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,18 +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

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
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

# Symfony uses 4 spaces for indent
[config/**/*.{yml,yaml}]
indent_size = 4
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ 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 ###
18 changes: 15 additions & 3 deletions .github/workflows/composer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v4
- run: |

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

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

composer-normalized:
Expand All @@ -52,8 +56,12 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v4
- run: |

- 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

Expand All @@ -63,6 +71,10 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v4
- run: |

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

- run: |
docker compose run --rm phpfpm composer audit
3 changes: 2 additions & 1 deletion .github/workflows/markdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

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

- run: |
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/php.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |

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

- run: |
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
5 changes: 4 additions & 1 deletion .github/workflows/twig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

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

- run: |
docker compose run --rm phpfpm composer install
docker compose run --rm phpfpm vendor/bin/twig-cs-fixer lint
16 changes: 12 additions & 4 deletions .github/workflows/yaml.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
# Do not edit this file! Make a pull request on changing
# github/workflows/symfony/yaml.yaml in
# github/workflows/yaml.yaml in
# https://github.com/itk-dev/devops_itkdev-docker if need be.

### ### Symfony YAML
### ### YAML
###
### Validates Symfony YAML files.
### Validates YAML files.
###
### #### Assumptions
###
### 1. A docker compose service named `prettier` for running
### [Prettier](https://prettier.io/) exists.
###
### #### Symfony YAML
###
### Symfony's YAML config files use 4 spaces for indentation and single quotes.
### Therefore we use a [Prettier configuration
### file](https://prettier.io/docs/configuration), `.prettierrc.yaml`, to make
### Prettier format YAML files in the `config/` folder like Symfony expects.

name: YAML

Expand All @@ -26,7 +33,8 @@ jobs:
steps:
- uses: actions/checkout@v4

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

- run: |
Expand Down
3 changes: 3 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file is copied from config/symfony/yaml/.prettierrc.yaml 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.

# https://prettier.io/docs/configuration
overrides:
# Symfony config
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ See [keep a changelog] for information about writing changes to this log.

## [Unreleased]

- [PR-24](https://github.com/itk-dev/event-database-api/pull/24)
Symfony 7.3 and PHP 8.4
- [PR-23](https://github.com/itk-dev/event-database-api/pull/23)
Re-lint YAML files
- [PR-21](https://github.com/itk-dev/event-database-api/pull/21)
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
This is the next iteration of [the event database](https://github.com/itk-event-database/event-database-api) used by the
municipality of Aarhus.

This repository contains the frontend API, if you are looking for the event imports, the code is located
[here](https://github.com/itk-dev/event-database-imports).
This repository contains the frontend API, if you are looking for the event imports, the code is located at
<https://github.com/itk-dev/event-database-imports>.

The event database is an API platform for event aggregation from the public vendors throughout the cites. It gets data
mainly from feeds (JSON/XML) or APIs provided by the vendors. It is highly configurable in doing custom feed mappings
Expand All @@ -33,6 +33,7 @@ in this repository.
## Installation

```shell
docker compose pull
docker compose up --detach
docker compose exec phpfpm composer install
```
Expand Down
46 changes: 23 additions & 23 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,35 @@
"api-platform/core": "^4.1",
"elasticsearch/elasticsearch": "^8.13",
"nelmio/cors-bundle": "^2.4",
"phpdocumentor/reflection-docblock": "^5.3",
"phpstan/phpdoc-parser": "^1.24",
"symfony/asset": "~6.4.0",
"symfony/console": "~6.4.0",
"symfony/dotenv": "~6.4.0",
"symfony/expression-language": "~6.4.0",
"phpdocumentor/reflection-docblock": "^5.6",
"phpstan/phpdoc-parser": "^2.2",
"symfony/asset": "~7.3.0",
"symfony/console": "~7.3.0",
"symfony/dotenv": "~7.3.0",
"symfony/expression-language": "~7.3.0",
"symfony/flex": "^2",
"symfony/framework-bundle": "~6.4.0",
"symfony/http-client": "~6.4.0",
"symfony/property-access": "~6.4.0",
"symfony/property-info": "~6.4.0",
"symfony/runtime": "~6.4.0",
"symfony/security-bundle": "~6.4.0",
"symfony/serializer": "~6.4.0",
"symfony/twig-bundle": "~6.4.0",
"symfony/validator": "~6.4.0",
"symfony/yaml": "~6.4.0"
"symfony/framework-bundle": "~7.3.0",
"symfony/http-client": "~7.3.0",
"symfony/property-access": "~7.3.0",
"symfony/property-info": "~7.3.0",
"symfony/runtime": "~7.3.0",
"symfony/security-bundle": "~7.3.0",
"symfony/serializer": "~7.3.0",
"symfony/twig-bundle": "~7.3.0",
"symfony/validator": "~7.3.0",
"symfony/yaml": "~7.3.0"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.47",
"friendsofphp/php-cs-fixer": "^3.40",
"friendsofphp/php-cs-fixer": "^3.86",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan-symfony": "^2.0",
"phpunit/phpunit": "^10.5",
"symfony/browser-kit": "~6.4.0",
"phpunit/phpunit": "^12.3",
"symfony/browser-kit": "~7.3.0",
"symfony/css-selector": "~7.3.0",
"symfony/maker-bundle": "^1.52",
"symfony/phpunit-bridge": "^7.3",
"symfony/stopwatch": "~6.4.0",
"symfony/web-profiler-bundle": "~6.4.0",
"symfony/stopwatch": "~7.3.0",
"symfony/web-profiler-bundle": "~7.3.0",
"vincentlanglet/twig-cs-fixer": "^3.7"
},
"replace": {
Expand Down Expand Up @@ -78,7 +78,7 @@
"extra": {
"symfony": {
"allow-contrib": true,
"require": "6.4.*"
"require": "7.3.*"
}
},
"scripts": {
Expand Down
Loading