From ca9759c385e7e05447cc55406c72b7efd298dfa9 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Mon, 2 Jun 2025 13:21:58 +0200 Subject: [PATCH 01/35] 4268: Updated docker compose setup --- .env | 1 + .github/workflows/changelog.yaml | 29 + .github/workflows/composer.yaml | 68 ++ .github/workflows/markdown.yaml | 43 ++ .github/workflows/php.yaml | 56 ++ .github/workflows/pr.yaml | 111 --- .github/workflows/twig.yaml | 48 ++ .gitignore | 4 +- .markdownlint.json | 11 - .markdownlint.jsonc | 22 + .markdownlintignore | 12 + .php-cs-fixer.dist.php | 31 +- .twig-cs-fixer.dist.php | 16 + CHANGELOG.md | 5 +- composer.json | 115 +-- composer.lock | 730 +++++++++++++++++- docker-compose.dev.yml | 3 +- docker-compose.override.yml | 7 + docker-compose.redirect.yml | 3 +- docker-compose.server.yml | 5 +- docker-compose.yml | 15 +- package-lock.json | 689 ----------------- package.json | 14 - symfony.lock | 24 +- .../SwaggerUi/index.html.twig | 4 +- 25 files changed, 1154 insertions(+), 912 deletions(-) create mode 100644 .github/workflows/changelog.yaml create mode 100644 .github/workflows/composer.yaml create mode 100644 .github/workflows/markdown.yaml create mode 100644 .github/workflows/php.yaml create mode 100644 .github/workflows/twig.yaml delete mode 100644 .markdownlint.json create mode 100644 .markdownlint.jsonc create mode 100644 .markdownlintignore create mode 100644 .twig-cs-fixer.dist.php delete mode 100644 package-lock.json delete mode 100644 package.json diff --git a/.env b/.env index db6a908..5353049 100644 --- a/.env +++ b/.env @@ -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 diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml new file mode 100644 index 0000000..483da6e --- /dev/null +++ b/.github/workflows/changelog.yaml @@ -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 diff --git a/.github/workflows/composer.yaml b/.github/workflows/composer.yaml new file mode 100644 index 0000000..fe13351 --- /dev/null +++ b/.github/workflows/composer.yaml @@ -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 diff --git a/.github/workflows/markdown.yaml b/.github/workflows/markdown.yaml new file mode 100644 index 0000000..60fc0ee --- /dev/null +++ b/.github/workflows/markdown.yaml @@ -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' diff --git a/.github/workflows/php.yaml b/.github/workflows/php.yaml new file mode 100644 index 0000000..60fb70e --- /dev/null +++ b/.github/workflows/php.yaml @@ -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 diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 85b8a8c..c87a601 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -1,42 +1,6 @@ on: pull_request name: Review jobs: - test-composer-install: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php: [ '8.3' ] - name: Validate composer (${{ matrix.php}}) - steps: - - uses: actions/checkout@v4 - - - name: Setup PHP, with composer and extensions - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php}} - extensions: http, ctype, iconv - coverage: none - - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Cache dependencies - uses: actions/cache@v4 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.dependency-version }}- - restore-keys: ${{ runner.os }}-composer-${{ matrix.dependency-version }}- - - - name: Validate composer files - run: composer validate composer.json --strict - - - name: Composer install with exported .env variables - run: | - set -a && source .env && set +a - APP_ENV=prod composer install --no-dev -o - test-suite: name: Test suite (${{ matrix.php }}) runs-on: ubuntu-latest @@ -77,41 +41,6 @@ jobs: files: ./coverage/unit.xml flags: unittests, ${{ matrix.php }} - php-cs-fixer: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php: ["8.3"] - name: PHP Coding Standards Fixer (PHP ${{ matrix.php }}) - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup PHP, with composer and extensions - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php}} - extensions: http, ctype, iconv - coverage: none - - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - - name: Cache composer dependencies - uses: actions/cache@v4 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ matrix.php }}-composer- - - - name: Install Dependencies - run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist - - - name: php-cs-fixer - run: phpdbg -qrr ./vendor/bin/php-cs-fixer fix --dry-run - psalm: runs-on: ubuntu-latest strategy: @@ -147,31 +76,6 @@ jobs: - name: Psalm run: ./vendor/bin/psalm --no-cache - markdownlint: - name: Markdown Lint - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: Cache yarn packages - uses: actions/cache@v4 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - name: Yarn install - uses: actions/setup-node@v2 - with: - node-version: '22' - - run: yarn install - - name: markdownlint - run: yarn run coding-standards-check - apispec: runs-on: ubuntu-latest name: API Specification validation @@ -211,18 +115,3 @@ jobs: - name: Check for changes in specifications run: git diff --diff-filter=ACMRT --exit-code public/spec.yaml - - changelog: - runs-on: ubuntu-latest - name: Changelog should be updated - 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 diff --git a/.github/workflows/twig.yaml b/.github/workflows/twig.yaml new file mode 100644 index 0000000..9b0e343 --- /dev/null +++ b/.github/workflows/twig.yaml @@ -0,0 +1,48 @@ +# Do not edit this file! Make a pull request on changing +# github/workflows/twig.yaml in +# https://github.com/itk-dev/devops_itkdev-docker if need be. + +### ### Twig +### +### Validates Twig files +### +### #### Assumptions +### +### 1. A docker compose service named `phpfpm` can be run and `composer` can be +### run inside the `phpfpm` service. +### 2. [vincentlanglet/twig-cs-fixer](https://github.com/VincentLanglet/Twig-CS-Fixer) +### is a dev requirement in `composer.json`: +### +### ``` shell +### docker compose run --rm phpfpm composer require --dev vincentlanglet/twig-cs-fixer +### ``` +### +### 3. A [Configuration +### file](https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/docs/configuration.md#configuration-file) +### in the root of the project defines which files to check and rules to use. + +name: Twig + +env: + COMPOSE_USER: root + +on: + pull_request: + push: + branches: + - main + - develop + +jobs: + twig-lint: + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - name: Checkout + uses: actions/checkout@v4 + + - run: | + docker network create frontend + docker compose run --rm phpfpm composer install + docker compose run --rm phpfpm vendor/bin/twig-cs-fixer lint diff --git a/.gitignore b/.gitignore index 0b92446..a3de25b 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,6 @@ /phpunit.xml ###< symfony/phpunit-bridge ### -node_modules/ +###> vincentlanglet/twig-cs-fixer ### +/.twig-cs-fixer.cache +###< vincentlanglet/twig-cs-fixer ### diff --git a/.markdownlint.json b/.markdownlint.json deleted file mode 100644 index 85d45c0..0000000 --- a/.markdownlint.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "default": true, - "MD013": { - "line_length": 120, - "ignore_code_blocks": true, - "tables": false - }, - "no-duplicate-heading": { - "siblings_only": true - } -} diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc new file mode 100644 index 0000000..0253096 --- /dev/null +++ b/.markdownlint.jsonc @@ -0,0 +1,22 @@ +// This file is copied from config/markdown/.markdownlint.jsonc 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. + +// markdownlint-cli configuration file (cf. https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration) +{ + "default": true, + // https://github.com/DavidAnson/markdownlint/blob/main/doc/md013.md + "line-length": { + "line_length": 120, + "code_blocks": false, + "tables": false + }, + // https://github.com/DavidAnson/markdownlint/blob/main/doc/md024.md + "no-duplicate-heading": { + "siblings_only": true + }, + // https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections#creating-a-collapsed-section + // https://github.com/DavidAnson/markdownlint/blob/main/doc/md033.md + "no-inline-html": { + "allowed_elements": ["details", "summary"] + } +} diff --git a/.markdownlintignore b/.markdownlintignore new file mode 100644 index 0000000..d143ace --- /dev/null +++ b/.markdownlintignore @@ -0,0 +1,12 @@ +# This file is copied from config/markdown/.markdownlintignore 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://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#ignoring-files +vendor/ +node_modules/ +LICENSE.md +# Drupal +web/*.md +web/core/ +web/libraries/ +web/*/contrib/ diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 50e228b..782123f 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -1,14 +1,21 @@ in(__DIR__) - ->exclude('var') -; - -return (new PhpCsFixer\Config()) - ->setRules([ - '@Symfony' => true, - 'phpdoc_align' => false, - ]) - ->setFinder($finder) -; +// https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/config.rst + +$finder = new PhpCsFixer\Finder(); +// Check all files … +$finder->in(__DIR__); +// … that are not ignored by VCS +$finder->ignoreVCSIgnored(true); + +$config = new PhpCsFixer\Config(); +$config->setFinder($finder); + +$config->setRules([ + '@Symfony' => true, + 'phpdoc_align' => false, +]); + +return $config; diff --git a/.twig-cs-fixer.dist.php b/.twig-cs-fixer.dist.php new file mode 100644 index 0000000..8242555 --- /dev/null +++ b/.twig-cs-fixer.dist.php @@ -0,0 +1,16 @@ +in(__DIR__); +// … that are not ignored by VCS +$finder->ignoreVCSIgnored(true); + +$config = new TwigCsFixer\Config\Config(); +$config->setFinder($finder); + +return $config; diff --git a/CHANGELOG.md b/CHANGELOG.md index 18c41a8..1f34b7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ See [keep a changelog] for information about writing changes to this log. ## [Unreleased] +- [PR-18](https://github.com/itk-dev/event-database-api/pull/18) + Updated docker compose setup + ## [1.1.1] - 2025-03-28 - Fix date range filter error for updated field @@ -16,7 +19,7 @@ See [keep a changelog] for information about writing changes to this log. ### Added -- Implemented and switched to date range filter, compatible with deprecated date filter +- Implemented and switched to date range filter, compatible with deprecated date filter ### Changed diff --git a/composer.json b/composer.json index fb9bc92..9b9ae00 100644 --- a/composer.json +++ b/composer.json @@ -1,10 +1,8 @@ { "name": "itkdev/event-database-api", "description": "API front-end for the event database", - "type": "project", "license": "proprietary", - "minimum-stability": "stable", - "prefer-stable": true, + "type": "project", "require": { "php": ">=8.3", "ext-ctype": "*", @@ -14,30 +12,49 @@ "nelmio/cors-bundle": "^2.4", "phpdocumentor/reflection-docblock": "^5.3", "phpstan/phpdoc-parser": "^1.24", - "symfony/asset": "6.4.*", - "symfony/console": "6.4.*", - "symfony/dotenv": "6.4.*", - "symfony/expression-language": "6.4.*", + "symfony/asset": "~6.4.0", + "symfony/console": "~6.4.0", + "symfony/dotenv": "~6.4.0", + "symfony/expression-language": "~6.4.0", "symfony/flex": "^2", - "symfony/framework-bundle": "6.4.*", - "symfony/http-client": "6.4.*", - "symfony/property-access": "6.4.*", - "symfony/property-info": "6.4.*", - "symfony/runtime": "6.4.*", - "symfony/security-bundle": "6.4.*", - "symfony/serializer": "6.4.*", - "symfony/twig-bundle": "6.4.*", - "symfony/validator": "6.4.*", - "symfony/yaml": "6.4.*" + "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" }, - "config": { - "allow-plugins": { - "php-http/discovery": true, - "symfony/flex": true, - "symfony/runtime": true - }, - "sort-packages": true + "require-dev": { + "ergebnis/composer-normalize": "^2.47", + "friendsofphp/php-cs-fixer": "^3.40", + "phpunit/phpunit": "^10.5", + "psalm/plugin-symfony": "^5.1", + "symfony/maker-bundle": "^1.52", + "symfony/phpunit-bridge": "^7.0", + "symfony/stopwatch": "~6.4.0", + "symfony/web-profiler-bundle": "~6.4.0", + "vimeo/psalm": "^5.16", + "vincentlanglet/twig-cs-fixer": "^3.7", + "weirdan/doctrine-psalm-plugin": "^2.9" + }, + "replace": { + "symfony/polyfill-ctype": "*", + "symfony/polyfill-iconv": "*", + "symfony/polyfill-php72": "*", + "symfony/polyfill-php73": "*", + "symfony/polyfill-php74": "*", + "symfony/polyfill-php80": "*", + "symfony/polyfill-php81": "*" + }, + "conflict": { + "symfony/symfony": "*" }, + "minimum-stability": "stable", + "prefer-stable": true, "autoload": { "psr-4": { "App\\": "src/" @@ -48,20 +65,22 @@ "App\\Tests\\": "tests/" } }, - "replace": { - "symfony/polyfill-ctype": "*", - "symfony/polyfill-iconv": "*", - "symfony/polyfill-php72": "*", - "symfony/polyfill-php73": "*", - "symfony/polyfill-php74": "*", - "symfony/polyfill-php80": "*", - "symfony/polyfill-php81": "*" + "config": { + "allow-plugins": { + "ergebnis/composer-normalize": true, + "php-http/discovery": true, + "symfony/flex": true, + "symfony/runtime": true + }, + "sort-packages": true + }, + "extra": { + "symfony": { + "allow-contrib": false, + "require": "6.4.*" + } }, "scripts": { - "auto-scripts": { - "cache:clear": "symfony-cmd", - "assets:install %PUBLIC_DIR%": "symfony-cmd" - }, "post-install-cmd": [ "@auto-scripts" ], @@ -71,6 +90,10 @@ "api-spec-export": [ "bin/console api:openapi:export --yaml --output public/spec.yaml" ], + "auto-scripts": { + "cache:clear": "symfony-cmd", + "assets:install %PUBLIC_DIR%": "symfony-cmd" + }, "coding-standards-apply": [ "PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix" ], @@ -80,25 +103,5 @@ "psalm": [ "./vendor/bin/psalm --no-cache" ] - }, - "conflict": { - "symfony/symfony": "*" - }, - "extra": { - "symfony": { - "allow-contrib": false, - "require": "6.4.*" - } - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.40", - "phpunit/phpunit": "^10.5", - "psalm/plugin-symfony": "^5.1", - "symfony/maker-bundle": "^1.52", - "symfony/phpunit-bridge": "^7.0", - "symfony/stopwatch": "6.4.*", - "symfony/web-profiler-bundle": "6.4.*", - "vimeo/psalm": "^5.16", - "weirdan/doctrine-psalm-plugin": "^2.9" } } diff --git a/composer.lock b/composer.lock index 0a626e2..e427b9a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "bfe60d6b53e560fcce0fad379919ceae", + "content-hash": "2bd3172c32014989dae947b977a543d0", "packages": [ { "name": "api-platform/core", @@ -6402,6 +6402,454 @@ }, "time": "2019-12-04T15:06:13+00:00" }, + { + "name": "ergebnis/composer-normalize", + "version": "2.47.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/composer-normalize.git", + "reference": "ed24b9f8901f8fbafeca98f662eaca39427f0544" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/ed24b9f8901f8fbafeca98f662eaca39427f0544", + "reference": "ed24b9f8901f8fbafeca98f662eaca39427f0544", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.0.0", + "ergebnis/json": "^1.4.0", + "ergebnis/json-normalizer": "^4.9.0", + "ergebnis/json-printer": "^3.7.0", + "ext-json": "*", + "justinrainbow/json-schema": "^5.2.12 || ^6.0.0", + "localheinz/diff": "^1.2.0", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" + }, + "require-dev": { + "composer/composer": "^2.8.3", + "ergebnis/license": "^2.6.0", + "ergebnis/php-cs-fixer-config": "^6.46.0", + "ergebnis/phpunit-slow-test-detector": "^2.19.1", + "fakerphp/faker": "^1.24.1", + "infection/infection": "~0.26.6", + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^2.1.11", + "phpstan/phpstan-deprecation-rules": "^2.0.1", + "phpstan/phpstan-phpunit": "^2.0.6", + "phpstan/phpstan-strict-rules": "^2.0.4", + "phpunit/phpunit": "^9.6.20", + "rector/rector": "^2.0.11", + "symfony/filesystem": "^5.4.41" + }, + "type": "composer-plugin", + "extra": { + "class": "Ergebnis\\Composer\\Normalize\\NormalizePlugin", + "branch-alias": { + "dev-main": "2.44-dev" + }, + "plugin-optional": true, + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\Composer\\Normalize\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" + } + ], + "description": "Provides a composer plugin for normalizing composer.json.", + "homepage": "https://github.com/ergebnis/composer-normalize", + "keywords": [ + "composer", + "normalize", + "normalizer", + "plugin" + ], + "support": { + "issues": "https://github.com/ergebnis/composer-normalize/issues", + "security": "https://github.com/ergebnis/composer-normalize/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/composer-normalize" + }, + "time": "2025-04-15T11:09:27+00:00" + }, + { + "name": "ergebnis/json", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json.git", + "reference": "7656ac2aa6c2ca4408f96f599e9a17a22c464f69" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json/zipball/7656ac2aa6c2ca4408f96f599e9a17a22c464f69", + "reference": "7656ac2aa6c2ca4408f96f599e9a17a22c464f69", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" + }, + "require-dev": { + "ergebnis/data-provider": "^3.3.0", + "ergebnis/license": "^2.5.0", + "ergebnis/php-cs-fixer-config": "^6.37.0", + "ergebnis/phpunit-slow-test-detector": "^2.16.1", + "fakerphp/faker": "^1.24.0", + "infection/infection": "~0.26.6", + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.10", + "phpstan/phpstan-deprecation-rules": "^1.2.1", + "phpstan/phpstan-phpunit": "^1.4.0", + "phpstan/phpstan-strict-rules": "^1.6.1", + "phpunit/phpunit": "^9.6.18", + "rector/rector": "^1.2.10" + }, + "type": "library", + "extra": { + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\Json\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" + } + ], + "description": "Provides a Json value object for representing a valid JSON string.", + "homepage": "https://github.com/ergebnis/json", + "keywords": [ + "json" + ], + "support": { + "issues": "https://github.com/ergebnis/json/issues", + "security": "https://github.com/ergebnis/json/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/json" + }, + "time": "2024-11-17T11:51:22+00:00" + }, + { + "name": "ergebnis/json-normalizer", + "version": "4.9.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-normalizer.git", + "reference": "cc4dcf3890448572a2d9bea97133c4d860e59fb1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/cc4dcf3890448572a2d9bea97133c4d860e59fb1", + "reference": "cc4dcf3890448572a2d9bea97133c4d860e59fb1", + "shasum": "" + }, + "require": { + "ergebnis/json": "^1.2.0", + "ergebnis/json-pointer": "^3.4.0", + "ergebnis/json-printer": "^3.5.0", + "ergebnis/json-schema-validator": "^4.2.0", + "ext-json": "*", + "justinrainbow/json-schema": "^5.2.12 || ^6.0.0", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" + }, + "require-dev": { + "composer/semver": "^3.4.3", + "ergebnis/composer-normalize": "^2.44.0", + "ergebnis/data-provider": "^3.3.0", + "ergebnis/license": "^2.5.0", + "ergebnis/php-cs-fixer-config": "^6.37.0", + "ergebnis/phpunit-slow-test-detector": "^2.16.1", + "fakerphp/faker": "^1.24.0", + "infection/infection": "~0.26.6", + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.10", + "phpstan/phpstan-deprecation-rules": "^1.2.1", + "phpstan/phpstan-phpunit": "^1.4.0", + "phpstan/phpstan-strict-rules": "^1.6.1", + "phpunit/phpunit": "^9.6.19", + "rector/rector": "^1.2.10" + }, + "suggest": { + "composer/semver": "If you want to use ComposerJsonNormalizer or VersionConstraintNormalizer" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.8-dev" + }, + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\Json\\Normalizer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" + } + ], + "description": "Provides generic and vendor-specific normalizers for normalizing JSON documents.", + "homepage": "https://github.com/ergebnis/json-normalizer", + "keywords": [ + "json", + "normalizer" + ], + "support": { + "issues": "https://github.com/ergebnis/json-normalizer/issues", + "security": "https://github.com/ergebnis/json-normalizer/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/json-normalizer" + }, + "time": "2025-04-10T13:13:04+00:00" + }, + { + "name": "ergebnis/json-pointer", + "version": "3.6.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-pointer.git", + "reference": "4fc85d8edb74466d282119d8d9541ec7cffc0798" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-pointer/zipball/4fc85d8edb74466d282119d8d9541ec7cffc0798", + "reference": "4fc85d8edb74466d282119d8d9541ec7cffc0798", + "shasum": "" + }, + "require": { + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.43.0", + "ergebnis/data-provider": "^3.2.0", + "ergebnis/license": "^2.4.0", + "ergebnis/php-cs-fixer-config": "^6.32.0", + "ergebnis/phpunit-slow-test-detector": "^2.15.0", + "fakerphp/faker": "^1.23.1", + "infection/infection": "~0.26.6", + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.10", + "phpstan/phpstan-deprecation-rules": "^1.2.1", + "phpstan/phpstan-phpunit": "^1.4.0", + "phpstan/phpstan-strict-rules": "^1.6.1", + "phpunit/phpunit": "^9.6.19", + "rector/rector": "^1.2.10" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.6-dev" + }, + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\Json\\Pointer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" + } + ], + "description": "Provides an abstraction of a JSON pointer.", + "homepage": "https://github.com/ergebnis/json-pointer", + "keywords": [ + "RFC6901", + "json", + "pointer" + ], + "support": { + "issues": "https://github.com/ergebnis/json-pointer/issues", + "security": "https://github.com/ergebnis/json-pointer/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/json-pointer" + }, + "time": "2024-11-17T12:37:06+00:00" + }, + { + "name": "ergebnis/json-printer", + "version": "3.7.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-printer.git", + "reference": "ced41fce7854152f0e8f38793c2ffe59513cdd82" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-printer/zipball/ced41fce7854152f0e8f38793c2ffe59513cdd82", + "reference": "ced41fce7854152f0e8f38793c2ffe59513cdd82", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" + }, + "require-dev": { + "ergebnis/data-provider": "^3.3.0", + "ergebnis/license": "^2.5.0", + "ergebnis/php-cs-fixer-config": "^6.37.0", + "ergebnis/phpunit-slow-test-detector": "^2.16.1", + "fakerphp/faker": "^1.24.0", + "infection/infection": "~0.26.6", + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.10", + "phpstan/phpstan-deprecation-rules": "^1.2.1", + "phpstan/phpstan-phpunit": "^1.4.1", + "phpstan/phpstan-strict-rules": "^1.6.1", + "phpunit/phpunit": "^9.6.21", + "rector/rector": "^1.2.10" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ergebnis\\Json\\Printer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" + } + ], + "description": "Provides a JSON printer, allowing for flexible indentation.", + "homepage": "https://github.com/ergebnis/json-printer", + "keywords": [ + "formatter", + "json", + "printer" + ], + "support": { + "issues": "https://github.com/ergebnis/json-printer/issues", + "security": "https://github.com/ergebnis/json-printer/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/json-printer" + }, + "time": "2024-11-17T11:20:51+00:00" + }, + { + "name": "ergebnis/json-schema-validator", + "version": "4.4.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-schema-validator.git", + "reference": "85f90c81f718aebba1d738800af83eeb447dc7ec" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-schema-validator/zipball/85f90c81f718aebba1d738800af83eeb447dc7ec", + "reference": "85f90c81f718aebba1d738800af83eeb447dc7ec", + "shasum": "" + }, + "require": { + "ergebnis/json": "^1.2.0", + "ergebnis/json-pointer": "^3.4.0", + "ext-json": "*", + "justinrainbow/json-schema": "^5.2.12 || ^6.0.0", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.44.0", + "ergebnis/data-provider": "^3.3.0", + "ergebnis/license": "^2.5.0", + "ergebnis/php-cs-fixer-config": "^6.37.0", + "ergebnis/phpunit-slow-test-detector": "^2.16.1", + "fakerphp/faker": "^1.24.0", + "infection/infection": "~0.26.6", + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.10", + "phpstan/phpstan-deprecation-rules": "^1.2.1", + "phpstan/phpstan-phpunit": "^1.4.0", + "phpstan/phpstan-strict-rules": "^1.6.1", + "phpunit/phpunit": "^9.6.20", + "rector/rector": "^1.2.10" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.4-dev" + }, + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\Json\\SchemaValidator\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" + } + ], + "description": "Provides a JSON schema validator, building on top of justinrainbow/json-schema.", + "homepage": "https://github.com/ergebnis/json-schema-validator", + "keywords": [ + "json", + "schema", + "validator" + ], + "support": { + "issues": "https://github.com/ergebnis/json-schema-validator/issues", + "security": "https://github.com/ergebnis/json-schema-validator/blob/main/.github/SECURITY.md", + "source": "https://github.com/ergebnis/json-schema-validator" + }, + "time": "2024-11-18T06:32:28+00:00" + }, { "name": "evenement/evenement", "version": "v3.0.2", @@ -6714,6 +7162,209 @@ ], "time": "2024-11-25T00:39:24+00:00" }, + { + "name": "justinrainbow/json-schema", + "version": "6.4.1", + "source": { + "type": "git", + "url": "https://github.com/jsonrainbow/json-schema.git", + "reference": "35d262c94959571e8736db1e5c9bc36ab94ae900" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/35d262c94959571e8736db1e5c9bc36ab94ae900", + "reference": "35d262c94959571e8736db1e5c9bc36ab94ae900", + "shasum": "" + }, + "require": { + "ext-json": "*", + "marc-mabe/php-enum": "^4.0", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "3.3.0", + "json-schema/json-schema-test-suite": "1.2.0", + "marc-mabe/php-enum-phpstan": "^2.0", + "phpspec/prophecy": "^1.19", + "phpstan/phpstan": "^1.12", + "phpunit/phpunit": "^8.5" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/jsonrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "support": { + "issues": "https://github.com/jsonrainbow/json-schema/issues", + "source": "https://github.com/jsonrainbow/json-schema/tree/6.4.1" + }, + "time": "2025-04-04T13:08:07+00:00" + }, + { + "name": "localheinz/diff", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/localheinz/diff.git", + "reference": "ec413943c2b518464865673fd5b38f7df867a010" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/localheinz/diff/zipball/ec413943c2b518464865673fd5b38f7df867a010", + "reference": "ec413943c2b518464865673fd5b38f7df867a010", + "shasum": "" + }, + "require": { + "php": "~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.5.0 || ^8.5.23", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Fork of sebastian/diff for use with ergebnis/composer-normalize", + "homepage": "https://github.com/localheinz/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/localheinz/diff/issues", + "source": "https://github.com/localheinz/diff/tree/1.2.0" + }, + "time": "2024-12-04T14:16:01+00:00" + }, + { + "name": "marc-mabe/php-enum", + "version": "v4.7.1", + "source": { + "type": "git", + "url": "https://github.com/marc-mabe/php-enum.git", + "reference": "7159809e5cfa041dca28e61f7f7ae58063aae8ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/marc-mabe/php-enum/zipball/7159809e5cfa041dca28e61f7f7ae58063aae8ed", + "reference": "7159809e5cfa041dca28e61f7f7ae58063aae8ed", + "shasum": "" + }, + "require": { + "ext-reflection": "*", + "php": "^7.1 | ^8.0" + }, + "require-dev": { + "phpbench/phpbench": "^0.16.10 || ^1.0.4", + "phpstan/phpstan": "^1.3.1", + "phpunit/phpunit": "^7.5.20 | ^8.5.22 | ^9.5.11", + "vimeo/psalm": "^4.17.0 | ^5.26.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-3.x": "3.2-dev", + "dev-master": "4.7-dev" + } + }, + "autoload": { + "psr-4": { + "MabeEnum\\": "src/" + }, + "classmap": [ + "stubs/Stringable.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Marc Bennewitz", + "email": "dev@mabe.berlin", + "homepage": "https://mabe.berlin/", + "role": "Lead" + } + ], + "description": "Simple and fast implementation of enumerations with native PHP", + "homepage": "https://github.com/marc-mabe/php-enum", + "keywords": [ + "enum", + "enum-map", + "enum-set", + "enumeration", + "enumerator", + "enummap", + "enumset", + "map", + "set", + "type", + "type-hint", + "typehint" + ], + "support": { + "issues": "https://github.com/marc-mabe/php-enum/issues", + "source": "https://github.com/marc-mabe/php-enum/tree/v4.7.1" + }, + "time": "2024-11-28T04:54:44+00:00" + }, { "name": "myclabs/deep-copy", "version": "1.12.1", @@ -9606,6 +10257,83 @@ }, "time": "2024-09-08T18:53:08+00:00" }, + { + "name": "vincentlanglet/twig-cs-fixer", + "version": "3.7.1", + "source": { + "type": "git", + "url": "https://github.com/VincentLanglet/Twig-CS-Fixer.git", + "reference": "d216db67b63d78cfdefca6a9a7acef4fd0d304bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/VincentLanglet/Twig-CS-Fixer/zipball/d216db67b63d78cfdefca6a9a7acef4fd0d304bb", + "reference": "d216db67b63d78cfdefca6a9a7acef4fd0d304bb", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2.0.0", + "ext-ctype": "*", + "ext-json": "*", + "php": ">=8.0", + "symfony/console": "^5.4.9 || ^6.4 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.4 || ^7.0", + "symfony/finder": "^5.4 || ^6.4 || ^7.0", + "symfony/string": "^5.4.42 || ^6.4.10 || ~7.0.10 || ^7.1.3", + "twig/twig": "^3.4", + "webmozart/assert": "^1.10" + }, + "require-dev": { + "composer/semver": "^3.2.0", + "dereuromark/composer-prefer-lowest": "^0.1.10", + "ergebnis/composer-normalize": "^2.29", + "friendsofphp/php-cs-fixer": "^3.13.0", + "infection/infection": "^0.26.16 || ^0.29.14", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpstan/phpstan-symfony": "^2.0", + "phpstan/phpstan-webmozart-assert": "^2.0", + "phpunit/phpunit": "^9.5.26 || ^11.5.18 || ^12.1.3", + "rector/rector": "^2.0.0", + "shipmonk/composer-dependency-analyser": "^1.6", + "symfony/process": "^5.4 || ^6.4 || ^7.0", + "symfony/twig-bridge": "^5.4 || ^6.4 || ^7.0", + "symfony/ux-twig-component": "^2.2.0", + "twig/cache-extra": "^3.2" + }, + "bin": [ + "bin/twig-cs-fixer" + ], + "type": "coding-standard", + "autoload": { + "psr-4": { + "TwigCsFixer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Vincent Langlet" + } + ], + "description": "A tool to automatically fix Twig code style", + "homepage": "https://github.com/VincentLanglet/Twig-CS-Fixer", + "support": { + "issues": "https://github.com/VincentLanglet/Twig-CS-Fixer/issues", + "source": "https://github.com/VincentLanglet/Twig-CS-Fixer/tree/3.7.1" + }, + "funding": [ + { + "url": "https://github.com/VincentLanglet", + "type": "github" + } + ], + "time": "2025-05-19T12:24:50+00:00" + }, { "name": "weirdan/doctrine-psalm-plugin", "version": "v2.9.0", diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index a4eeba0..c75114e 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,5 +1,4 @@ -# itk-version: 3.2.0 - +# itk-version: 3.2.3 services: phpfpm: environment: diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 4afdff9..7d0ef0f 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -44,3 +44,10 @@ services: environment: - discovery.type=single-node - xpack.security.enabled=false + + markdownlint: + image: itkdev/markdownlint + profiles: + - dev + volumes: + - ./:/md diff --git a/docker-compose.redirect.yml b/docker-compose.redirect.yml index 3b33b5a..844b3e6 100644 --- a/docker-compose.redirect.yml +++ b/docker-compose.redirect.yml @@ -1,5 +1,4 @@ -# itk-version: 3.2.0 - +# itk-version: 3.2.3 services: nginx: labels: diff --git a/docker-compose.server.yml b/docker-compose.server.yml index a61a973..614d67b 100644 --- a/docker-compose.server.yml +++ b/docker-compose.server.yml @@ -1,5 +1,4 @@ -# itk-version: 3.2.0 - +# itk-version: 3.2.3 networks: frontend: external: true @@ -18,7 +17,6 @@ services: environment: - PHP_MAX_EXECUTION_TIME=30 - PHP_MEMORY_LIMIT=128M - - COMPOSER_VERSION=2 volumes: - .:/app @@ -38,6 +36,7 @@ services: NGINX_FPM_SERVICE: ${COMPOSE_PROJECT_NAME}-phpfpm-1:9000 NGINX_WEB_ROOT: /app/public NGINX_PORT: 8080 + NGINX_MAX_BODY_SIZE: 5M labels: - "traefik.enable=true" - "traefik.docker.network=frontend" diff --git a/docker-compose.yml b/docker-compose.yml index 4ba4c09..6edca92 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,4 @@ -# itk-version: 3.2.0 - +# itk-version: 3.2.3 networks: frontend: external: true @@ -14,6 +13,12 @@ services: - app ports: - '3306' + healthcheck: + test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ] + start_period: 10s + interval: 10s + timeout: 5s + retries: 3 environment: - MYSQL_ROOT_PASSWORD=password - MYSQL_USER=db @@ -23,6 +28,7 @@ services: phpfpm: image: itkdev/php8.3-fpm:latest + user: ${COMPOSE_USER:-deploy} networks: - app extra_hosts: @@ -34,10 +40,10 @@ services: # Depending on the setup, you may have to remove --read-envelope-from from msmtp (cf. https://marlam.de/msmtp/msmtp.html) or use SMTP to send mail - PHP_SENDMAIL_PATH=/usr/bin/msmtp --host=mail --port=1025 --read-recipients --read-envelope-from - DOCKER_HOST_DOMAIN=${COMPOSE_DOMAIN} - - COMPOSER_VERSION=2 - PHP_IDE_CONFIG=serverName=localhost depends_on: - - mariadb + mariadb: + condition: service_healthy volumes: - .:/app @@ -57,6 +63,7 @@ services: NGINX_FPM_SERVICE: ${COMPOSE_PROJECT_NAME}-phpfpm-1:9000 NGINX_WEB_ROOT: /app/public NGINX_PORT: 8080 + NGINX_MAX_BODY_SIZE: 5M labels: - "traefik.enable=true" - "traefik.docker.network=frontend" diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 9d05156..0000000 --- a/package-lock.json +++ /dev/null @@ -1,689 +0,0 @@ -{ - "name": "app", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "license": "UNLICENSED", - "devDependencies": { - "markdownlint-cli": "^0.35.0" - } - }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "optional": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/commander": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-11.0.0.tgz", - "integrity": "sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==", - "dev": true, - "engines": { - "node": ">=16" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, - "node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "node_modules/entities": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", - "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", - "dev": true, - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/get-stdin": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz", - "integrity": "sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/glob": { - "version": "10.2.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.2.7.tgz", - "integrity": "sha512-jTKehsravOJo8IJxUGfZILnkvVJM/MOfHRs8QcXolVef2zNI9Tqyy5+SeuOAZd3upViEZQLyFpQhYiHLrMUNmA==", - "dev": true, - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.0.3", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2", - "path-scurry": "^1.7.0" - }, - "bin": { - "glob": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/ini": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ini/-/ini-3.0.1.tgz", - "integrity": "sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==", - "dev": true, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/jackspeak": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.2.1.tgz", - "integrity": "sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==", - "dev": true, - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsonc-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", - "dev": true - }, - "node_modules/linkify-it": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-4.0.1.tgz", - "integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==", - "dev": true, - "dependencies": { - "uc.micro": "^1.0.1" - } - }, - "node_modules/lru-cache": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.0.tgz", - "integrity": "sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==", - "dev": true, - "engines": { - "node": "14 || >=16.14" - } - }, - "node_modules/markdown-it": { - "version": "13.0.1", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-13.0.1.tgz", - "integrity": "sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1", - "entities": "~3.0.1", - "linkify-it": "^4.0.1", - "mdurl": "^1.0.1", - "uc.micro": "^1.0.5" - }, - "bin": { - "markdown-it": "bin/markdown-it.js" - } - }, - "node_modules/markdownlint": { - "version": "0.29.0", - "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.29.0.tgz", - "integrity": "sha512-ASAzqpODstu/Qsk0xW5BPgWnK/qjpBQ4e7IpsSvvFXcfYIjanLTdwFRJK1SIEEh0fGSMKXcJf/qhaZYHyME0wA==", - "dev": true, - "dependencies": { - "markdown-it": "13.0.1", - "markdownlint-micromark": "0.1.5" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/markdownlint-cli": { - "version": "0.35.0", - "resolved": "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.35.0.tgz", - "integrity": "sha512-lVIIIV1MrUtjoocgDqXLxUCxlRbn7Ve8rsWppfwciUNwLlNS28AhNiyQ3PU7jjj4Qvj+rWTTvwkqg7AcdG988g==", - "dev": true, - "dependencies": { - "commander": "~11.0.0", - "get-stdin": "~9.0.0", - "glob": "~10.2.7", - "ignore": "~5.2.4", - "js-yaml": "^4.1.0", - "jsonc-parser": "~3.2.0", - "markdownlint": "~0.29.0", - "minimatch": "~9.0.1", - "run-con": "~1.2.11" - }, - "bin": { - "markdownlint": "markdownlint.js" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/markdownlint-micromark": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/markdownlint-micromark/-/markdownlint-micromark-0.1.5.tgz", - "integrity": "sha512-HvofNU4QCvfUCWnocQP1IAWaqop5wpWrB0mKB6SSh0fcpV0PdmQNS6tdUuFew1utpYlUvYYzz84oDkrD76GB9A==", - "dev": true, - "engines": { - "node": ">=16" - } - }, - "node_modules/mdurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", - "dev": true - }, - "node_modules/minimatch": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.2.tgz", - "integrity": "sha512-PZOT9g5v2ojiTL7r1xF6plNHLtOeTpSlDI007As2NlA2aYBMfVom17yqa6QzhmDP8QOhn7LjHTg7DFCVSSa6yg==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/minipass": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-6.0.2.tgz", - "integrity": "sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==", - "dev": true, - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-scurry": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.0.tgz", - "integrity": "sha512-tZFEaRQbMLjwrsmidsGJ6wDMv0iazJWk6SfIKnY4Xru8auXgmJkOBa5DUbYFcFD2Rzk2+KDlIiF0GVXNCbgC7g==", - "dev": true, - "dependencies": { - "lru-cache": "^9.1.1 || ^10.0.0", - "minipass": "^5.0.0 || ^6.0.2" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/run-con": { - "version": "1.2.12", - "resolved": "https://registry.npmjs.org/run-con/-/run-con-1.2.12.tgz", - "integrity": "sha512-5257ILMYIF4RztL9uoZ7V9Q97zHtNHn5bN3NobeAnzB1P3ASLgg8qocM2u+R18ttp+VEM78N2LK8XcNVtnSRrg==", - "dev": true, - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~3.0.0", - "minimist": "^1.2.8", - "strip-json-comments": "~3.1.1" - }, - "bin": { - "run-con": "cli.js" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/signal-exit": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.0.2.tgz", - "integrity": "sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/string-width-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/uc.micro": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", - "dev": true - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index 2a82596..0000000 --- a/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "license": "UNLICENSED", - "private": true, - "description": "Tooling setup for linting", - "devDependencies": { - "markdownlint-cli": "^0.35.0" - }, - "scripts": { - "coding-standards-check/markdownlint": "markdownlint --ignore 'node_modules' --ignore 'vendor' README.md CHANGELOG.md 'docs/**/*.md'", - "coding-standards-check": "yarn coding-standards-check/markdownlint", - "coding-standards-apply/markdownlint": "markdownlint --fix README.md CHANGELOG.md docs/*.md docs/**/*.md", - "coding-standards-apply": "yarn coding-standards-apply/markdownlint" - } -} diff --git a/symfony.lock b/symfony.lock index 7b693ea..d8149ad 100644 --- a/symfony.lock +++ b/symfony.lock @@ -1,11 +1,11 @@ { "api-platform/core": { - "version": "3.2", + "version": "4.1", "recipe": { "repo": "github.com/symfony/recipes", "branch": "main", - "version": "3.2", - "ref": "696d44adc3c0d4f5d25a2f1c4f3700dd8a5c6db9" + "version": "4.0", + "ref": "cb9e6b8ceb9b62f32d41fc8ad72a25d5bd674c6d" }, "files": [ "config/packages/api_platform.yaml", @@ -13,6 +13,15 @@ "src/ApiResource/.gitignore" ] }, + "doctrine/deprecations": { + "version": "1.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "1.0", + "ref": "87424683adc81d7dc305eefec1fced883084aab9" + } + }, "friendsofphp/php-cs-fixer": { "version": "3.40", "recipe": { @@ -193,5 +202,14 @@ "config/packages/web_profiler.yaml", "config/routes/web_profiler.yaml" ] + }, + "vincentlanglet/twig-cs-fixer": { + "version": "3.7", + "recipe": { + "repo": "github.com/symfony/recipes-contrib", + "branch": "main", + "version": "3.0", + "ref": "d42582ae1bce86fd43491d6264c738b0867f8ffe" + } } } diff --git a/templates/bundles/ApiPlatformBundle/SwaggerUi/index.html.twig b/templates/bundles/ApiPlatformBundle/SwaggerUi/index.html.twig index 14d442f..47ca71d 100644 --- a/templates/bundles/ApiPlatformBundle/SwaggerUi/index.html.twig +++ b/templates/bundles/ApiPlatformBundle/SwaggerUi/index.html.twig @@ -1,4 +1,4 @@ -{% extends "@!ApiPlatform/SwaggerUi/index.html.twig" %} +{% extends '@!ApiPlatform/SwaggerUi/index.html.twig' %} {% block stylesheet %} {{ parent() }} @@ -12,4 +12,4 @@ API Platform -{% endblock %} \ No newline at end of file +{% endblock %} From d38efb9793f623c820559c8bbf6fafb67497314e Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Mon, 2 Jun 2025 15:54:47 +0200 Subject: [PATCH 02/35] # This is a combination of 2 commits. # This is the 1st commit message: 4268: Added API tests # The commit message #2 will be skipped: # 4268: Added API tests --- .editorconfig | 14 ++ .env.test | 4 + .github/workflows/build_release.yml | 2 +- .github/workflows/pr.yaml | 73 ++++---- .gitignore | 3 +- CHANGELOG.md | 3 +- README.md | 43 ++++- Taskfile.yml | 156 +++++++++++++++++ composer.json | 1 + composer.lock | 204 +++++++++++++++++++++- config/packages/api_platform.yaml | 8 +- config/packages/security.yaml | 1 + docker-compose.override.yml | 9 + phpunit.xml.dist | 2 +- src/Api/Dto/Event.php | 1 - tests/ApiPlatform/AbstractApiTestCase.php | 19 ++ tests/ApiPlatform/ApiTest.php | 13 ++ tests/ApiPlatform/EventsTest.php | 27 +++ 18 files changed, 539 insertions(+), 44 deletions(-) create mode 100644 .editorconfig create mode 100644 Taskfile.yml create mode 100644 tests/ApiPlatform/AbstractApiTestCase.php create mode 100644 tests/ApiPlatform/ApiTest.php create mode 100644 tests/ApiPlatform/EventsTest.php diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..a337c28 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +# 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 diff --git a/.env.test b/.env.test index 9e7162f..73e2fe7 100644 --- a/.env.test +++ b/.env.test @@ -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"} +]' diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index caba82e..d35c097 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -1,7 +1,7 @@ on: push: tags: - - '*.*.*' + - "*.*.*" name: Create Github Release diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index c87a601..d261cda 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -1,52 +1,59 @@ -on: pull_request +on: + pull_request: + name: Review + +env: + COMPOSE_USER: root + jobs: - test-suite: - name: Test suite (${{ matrix.php }}) + api-test: + name: API test runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php: [ '8.3' ] steps: - uses: actions/checkout@v4 - - name: Setup PHP, with composer and extensions - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php}} - extensions: http, ctype, iconv - coverage: xdebug + # https://taskfile.dev/installation/#github-actions + - uses: arduino/setup-task@v2 - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + - name: Start docker compose setup and install site + run: | + docker network create frontend + task --yes site:update - - name: Cache dependencies - uses: actions/cache@v4 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.dependency-version }}- - restore-keys: ${{ runner.os }}-composer-${{ matrix.dependency-version }}- + - name: Load fixtures + run: | + task --yes fixtures:load - - name: Install Dependencies - run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist + - name: Run API tests + run: | + task --yes api:test - - name: Test suite - run: ./vendor/bin/phpunit --coverage-clover=coverage/unit.xml + coding-standards-yaml: + name: Coding standards YAML + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 - - name: Upload coverage to Codecov test - uses: codecov/codecov-action@v2 - with: - files: ./coverage/unit.xml - flags: unittests, ${{ matrix.php }} + # https://taskfile.dev/installation/#github-actions + - uses: arduino/setup-task@v2 + + - run: | + docker network create frontend + + - name: Load fixtures + run: | + task --yes coding-standards:yaml:check + + - name: Check that nothing has changed + run: git diff --exit-code psalm: runs-on: ubuntu-latest strategy: fail-fast: false matrix: - php: ['8.3'] + php: ["8.3"] name: Psalm static analysis (${{ matrix.php}}) steps: - uses: actions/checkout@v4 @@ -82,7 +89,7 @@ jobs: strategy: fail-fast: false matrix: - php: [ '8.3' ] + php: ["8.3"] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.gitignore b/.gitignore index a3de25b..a68256d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ - ###> symfony/framework-bundle ### /.env.local /.env.local.php @@ -27,3 +26,5 @@ ###> vincentlanglet/twig-cs-fixer ### /.twig-cs-fixer.cache ###< vincentlanglet/twig-cs-fixer ### + +.phpunit.cache diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f34b7e..42c7260 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,8 @@ See [keep a changelog] for information about writing changes to this log. ## [Unreleased] - [PR-18](https://github.com/itk-dev/event-database-api/pull/18) - Updated docker compose setup + - Updated docker compose setup + - Added simple API tests and resolved some deprecations ## [1.1.1] - 2025-03-28 diff --git a/README.md b/README.md index 901c85a..17c709a 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ in this repository. ## Installation ```shell -docker compose up -d +docker compose up --detach docker compose exec phpfpm composer install ``` @@ -43,15 +43,36 @@ The project comes with doctrine fixtures to help development on local machines. doctrine fixture load command: ```shell -docker compose exec phpfpm bin/console app:fixtures:load +docker compose exec phpfpm bin/console app:fixtures:load ``` +`` must be one of `events`, `organizations`, `occurrences`, `daily_occurrences`, `tags`, `vocabularies` or +`locations` (cf. [`src/Model/IndexName.php`](src/Model/IndexName.php)). + The fixtures are related to the backend where the fixtures are generated by using the `app:index:dump` command. The load above command downloads the fixtures from [GitHub](https://github.com/itk-dev/event-database-imports/tree/develop/src/DataFixtures/indexes) and loads them into ElasticSearch. -### Production +## Accessing the API + +To access the API, a valid API key must be presented in the `X-Api-Key` header, e.g. + +``` shell +curl --header "X-Api-Key: api_key_1" "http://$(docker compose port nginx 8080)/api/v2/events" +``` + +Valid API keys are defined via the `APP_API_KEYS` environment variable: + +``` shell +# .env.local +APP_API_KEYS='[ + {"username": "user_1", "apikey": "api_key_1"}, + {"username": "user_2", "apikey": "api_key_2"} +]' +``` + +## Production When installing composer and Symfony based application in production, you should not install development packages, hence use this command: @@ -59,3 +80,19 @@ hence use this command: ```shell docker compose exec phpfpm composer install --no-dev --optimize-autoloader ``` + +## API request examples + +Get events with(out) public access: + +``` shell +curl --silent --header "X-Api-Key: api_key_1" "http://$(docker compose port nginx 8080)/api/v2/events?publicAccess=true" | docker run --rm --interactive ghcr.io/jqlang/jq:latest '.["hydra:member"]|length' +curl --silent --header "X-Api-Key: api_key_1" "http://$(docker compose port nginx 8080)/api/v2/events?publicAccess=false" | docker run --rm --interactive ghcr.io/jqlang/jq:latest '.["hydra:member"]|length' +``` + +## Test + +``` shell +task fixtures:load --yes +task api:test --yes +``` diff --git a/Taskfile.yml b/Taskfile.yml new file mode 100644 index 0000000..035c500 --- /dev/null +++ b/Taskfile.yml @@ -0,0 +1,156 @@ +# https://taskfile.dev + +version: "3" + +# https://taskfile.dev/usage/#env-files +dotenv: [".env.local", ".env"] + +vars: + # https://taskfile.dev/reference/templating/ + DOCKER_COMPOSE: '{{.TASK_DOCKER_COMPOSE | default "docker compose"}}' + + # We're not yet ready to normalize config files … + YAML_FILES_GLOB: "Taskfile.yml .github/workflows/**.{yml,yaml}" + +tasks: + site:update: + desc: Update/install site + cmds: + - task: compose + vars: + COMPOSE_ARGS: pull + - task: compose + vars: + COMPOSE_ARGS: up --detach --wait + - task: composer + vars: + COMPOSER_ARGS: install + + fixtures:load: + desc: Load all fixtures + prompt: Really load all fixtures? + cmds: + - for: + - events + - organizations + - occurrences + - daily_occurrences + - tags + - vocabularies + - locations + task: compose + vars: + COMPOSE_ARGS: exec phpfpm bin/console app:fixtures:load {{.ITEM}} + # Loading some fixtures generates an 'Warning: Undefined array key "entityId"' error. + ignore_error: true + silent: true + + api:test: + desc: Run API tests + prompt: Make sure to load fixtures before running tests (`task fixtures:load`) + cmds: + - task: compose + vars: + COMPOSE_ARGS: exec phpfpm bin/phpunit + + composer: + desc: "Run `composer` command. Example: task composer -- normalize" + cmds: + - task: compose + vars: + COMPOSE_ARGS: exec phpfpm composer {{.COMPOSER_ARGS}} + + compose: + desc: "Run `docker compose` command. Example: task compose -- ps" + cmds: + # Run docker compose with both arguments passed via var plus any cli args. + - "{{.DOCKER_COMPOSE}} {{.COMPOSE_ARGS}} {{.CLI_ARGS}}" + + coding-standards:apply: + desc: "Apply coding standards" + cmds: + - task: coding-standards:markdown:apply + - task: coding-standards:php:apply + - task: coding-standards:twig:apply + - task: coding-standards:yaml:apply + silent: true + + coding-standards:check: + desc: "Apply coding standards" + cmds: + - task: coding-standards:markdown:check + - task: coding-standards:php:check + - task: coding-standards:twig:check + - task: coding-standards:yaml:check + silent: true + + coding-standards:markdown:apply: + desc: "Apply coding standards for Markdown" + cmds: + - task: compose + vars: + COMPOSE_ARGS: run --rm markdownlint markdownlint '**/*.md' --fix + + coding-standards:markdown:check: + desc: "Apply and check coding standards for Markdown" + cmds: + - task: coding-standards:markdown:apply + - task: compose + vars: + COMPOSE_ARGS: run --rm markdownlint markdownlint '**/*.md' + + coding-standards:php:apply: + desc: "Apply coding standards for PHP" + cmds: + - task: compose + vars: + COMPOSE_ARGS: exec phpfpm vendor/bin/php-cs-fixer fix + silent: true + + coding-standards:php:check: + desc: "Apply and check coding standards for PHP" + cmds: + - task: coding-standards:php:apply + - task: compose + vars: + COMPOSE_ARGS: exec phpfpm vendor/bin/php-cs-fixer check + silent: true + + coding-standards:twig:apply: + desc: "Apply coding standards for Twig" + cmds: + - task: compose + vars: + COMPOSE_ARGS: exec phpfpm vendor/bin/php-cs-fixer fix --dry-run --diff + silent: true + + coding-standards:twig:check: + desc: "Apply and check coding standards for Twig" + cmds: + - task: coding-standards:twig:apply + - task: compose + vars: + COMPOSE_ARGS: exec phpfpm vendor/bin/twig-cs-fixer lint + silent: true + + coding-standards:yaml:apply: + desc: "Apply coding standards for YAML" + cmds: + - task: compose + vars: + COMPOSE_ARGS: run --rm prettier {{.YAML_FILES_GLOB}} --write + silent: true + + coding-standards:yaml:check: + desc: "Apply and check coding standards for YAML" + cmds: + - task: coding-standards:yaml:apply + - task: compose + vars: + COMPOSE_ARGS: run --rm prettier {{.YAML_FILES_GLOB}} --check + silent: true + + default: + cmds: + - task --list + silent: true diff --git a/composer.json b/composer.json index 9b9ae00..ee2d5c5 100644 --- a/composer.json +++ b/composer.json @@ -33,6 +33,7 @@ "friendsofphp/php-cs-fixer": "^3.40", "phpunit/phpunit": "^10.5", "psalm/plugin-symfony": "^5.1", + "symfony/browser-kit": "~6.4.0", "symfony/maker-bundle": "^1.52", "symfony/phpunit-bridge": "^7.0", "symfony/stopwatch": "~6.4.0", diff --git a/composer.lock b/composer.lock index e427b9a..c87a925 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2bd3172c32014989dae947b977a543d0", + "content-hash": "25af8701eebf448a4e169485fe79ddc0", "packages": [ { "name": "api-platform/core", @@ -7365,6 +7365,73 @@ }, "time": "2024-11-28T04:54:44+00:00" }, + { + "name": "masterminds/html5", + "version": "2.9.0", + "source": { + "type": "git", + "url": "https://github.com/Masterminds/html5-php.git", + "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f5ac2c0b0a2eefca70b2ce32a5809992227e75a6", + "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Masterminds\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matt Butcher", + "email": "technosophos@gmail.com" + }, + { + "name": "Matt Farina", + "email": "matt@mattfarina.com" + }, + { + "name": "Asmir Mustafic", + "email": "goetas@gmail.com" + } + ], + "description": "An HTML5 parser and serializer.", + "homepage": "http://masterminds.github.io/html5-php", + "keywords": [ + "HTML5", + "dom", + "html", + "parser", + "querypath", + "serializer", + "xml" + ], + "support": { + "issues": "https://github.com/Masterminds/html5-php/issues", + "source": "https://github.com/Masterminds/html5-php/tree/2.9.0" + }, + "time": "2024-03-31T07:05:07+00:00" + }, { "name": "myclabs/deep-copy", "version": "1.12.1", @@ -9651,6 +9718,141 @@ ], "time": "2024-05-01T10:20:27+00:00" }, + { + "name": "symfony/browser-kit", + "version": "v6.4.19", + "source": { + "type": "git", + "url": "https://github.com/symfony/browser-kit.git", + "reference": "ce95f3e3239159e7fa3be7690c6ce95a4714637f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/ce95f3e3239159e7fa3be7690c6ce95a4714637f", + "reference": "ce95f3e3239159e7fa3be7690c6ce95a4714637f", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/dom-crawler": "^5.4|^6.0|^7.0" + }, + "require-dev": { + "symfony/css-selector": "^5.4|^6.0|^7.0", + "symfony/http-client": "^5.4|^6.0|^7.0", + "symfony/mime": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\BrowserKit\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/browser-kit/tree/v6.4.19" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-02-14T11:23:16+00:00" + }, + { + "name": "symfony/dom-crawler", + "version": "v6.4.19", + "source": { + "type": "git", + "url": "https://github.com/symfony/dom-crawler.git", + "reference": "19073e3e0bb50cbc1cb286077069b3107085206f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/19073e3e0bb50cbc1cb286077069b3107085206f", + "reference": "19073e3e0bb50cbc1cb286077069b3107085206f", + "shasum": "" + }, + "require": { + "masterminds/html5": "^2.6", + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "symfony/css-selector": "^5.4|^6.0|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\DomCrawler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases DOM navigation for HTML and XML documents", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dom-crawler/tree/v6.4.19" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-02-14T17:58:34+00:00" + }, { "name": "symfony/maker-bundle", "version": "v1.61.0", diff --git a/config/packages/api_platform.yaml b/config/packages/api_platform.yaml index dc10040..11940d6 100644 --- a/config/packages/api_platform.yaml +++ b/config/packages/api_platform.yaml @@ -43,7 +43,11 @@ api_platform: shared_max_age: 3600 vary: ['Content-Type', 'Authorization', 'Origin'] extra_properties: - standard_put: true + # https://api-platform.com/docs/core/upgrade-guide/#api-platform-34 rfc_7807_compliant_errors: true - event_listeners_backward_compatibility_layer: false keep_legacy_inflector: false + use_symfony_listeners: false + + # https://api-platform.com/docs/core/upgrade-guide/#upgrade-guide + serializer: + hydra_prefix: true diff --git a/config/packages/security.yaml b/config/packages/security.yaml index e5cc524..0d1e5f5 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -15,6 +15,7 @@ security: stateless: true custom_authenticators: - App\Security\ApiKeyAuthenticator + provider: api_user_provider # activate different ways to authenticate # https://symfony.com/doc/current/security.html#the-firewall diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 7d0ef0f..4cab99a 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -51,3 +51,12 @@ services: - dev volumes: - ./:/md + + prettier: + # Prettier does not (yet, cf. https://github.com/prettier/prettier/issues/15206) have an official docker image. + # https://hub.docker.com/r/jauderho/prettier is good candidate (cf. https://hub.docker.com/search?q=prettier&sort=updated_at&order=desc) + image: jauderho/prettier + profiles: + - dev + volumes: + - ./:/work diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 9ee3065..a3d31d7 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -6,7 +6,7 @@ colors="true" cacheDirectory=".phpunit.cache" bootstrap="tests/bootstrap.php" - requireCoverageMetadata="true" + requireCoverageMetadata="false" beStrictAboutCoverageMetadata="true" beStrictAboutOutputDuringTests="true" > diff --git a/src/Api/Dto/Event.php b/src/Api/Dto/Event.php index 9adb062..e3edc53 100644 --- a/src/Api/Dto/Event.php +++ b/src/Api/Dto/Event.php @@ -11,7 +11,6 @@ use ApiPlatform\OpenApi\Model\Parameter; use ApiPlatform\OpenApi\Model\Response; use App\Api\Filter\ElasticSearch\BooleanFilter; -use App\Api\Filter\ElasticSearch\DateFilter; use App\Api\Filter\ElasticSearch\DateRangeFilter; use App\Api\Filter\ElasticSearch\IdFilter; use App\Api\Filter\ElasticSearch\MatchFilter; diff --git a/tests/ApiPlatform/AbstractApiTestCase.php b/tests/ApiPlatform/AbstractApiTestCase.php new file mode 100644 index 0000000..135a369 --- /dev/null +++ b/tests/ApiPlatform/AbstractApiTestCase.php @@ -0,0 +1,19 @@ + [ + 'accept' => ['application/ld+json'], + 'x-api-key' => 'test_api_key', + ], + ]); + } +} diff --git a/tests/ApiPlatform/ApiTest.php b/tests/ApiPlatform/ApiTest.php new file mode 100644 index 0000000..dccfa9e --- /dev/null +++ b/tests/ApiPlatform/ApiTest.php @@ -0,0 +1,13 @@ +request('GET', '/'); + + $this->assertResponseRedirects('/api/v2/docs'); + } +} diff --git a/tests/ApiPlatform/EventsTest.php b/tests/ApiPlatform/EventsTest.php new file mode 100644 index 0000000..dde0ef4 --- /dev/null +++ b/tests/ApiPlatform/EventsTest.php @@ -0,0 +1,27 @@ +request('GET', '/api/v2/events'); + + $this->assertResponseStatusCodeSame(Response::HTTP_UNAUTHORIZED); + + $response = static::createAuthenticatedClient() + ->request('GET', '/api/v2/events'); + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + $this->assertResponseHeaderSame('content-type', 'application/ld+json; charset=utf-8'); + $this->assertJson($response->getContent()); + + $data = $response->toArray(); + $this->assertArrayHasKey('hydra:member', $data); + $this->assertCount(2, $data['hydra:member']); + } +} From 67e98221005d43e23800c01f632f6365259751ea Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Mon, 2 Jun 2025 22:38:08 +0200 Subject: [PATCH 03/35] 4268: Updated fixture loader to delete index before creating it --- README.md | 3 +++ src/Fixtures/FixtureLoader.php | 25 +++++++++++++++++++ .../ElasticSearch/ElasticSearchIndex.php | 4 +-- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 17c709a..bc04bc3 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,9 @@ above command downloads the fixtures from [GitHub](https://github.com/itk-dev/event-database-imports/tree/develop/src/DataFixtures/indexes) and loads them into ElasticSearch. +> [!TIP] +> Use `task fixtures:load` to load all fixtures into Elasticsearch. + ## Accessing the API To access the API, a valid API key must be presented in the `X-Api-Key` header, e.g. diff --git a/src/Fixtures/FixtureLoader.php b/src/Fixtures/FixtureLoader.php index 1b18d25..941c5c3 100644 --- a/src/Fixtures/FixtureLoader.php +++ b/src/Fixtures/FixtureLoader.php @@ -39,6 +39,7 @@ public function process(string $indexName, string $url): void { $items = $this->download($url); + $this->deleteIndex($indexName); $this->createIndex($indexName); $this->indexItems($indexName, $items); } @@ -131,4 +132,28 @@ private function createIndex(string $indexName): void ]); } } + + /** + * Deletes an index with the given name if it exists. + * + * @param string $indexName + * The name of the index + * + * @throws ClientResponseException + * If an error occurs during the Elasticsearch client request + * @throws MissingParameterException + * If the required parameter is missing + * @throws ServerResponseException + * If the server returns an error during the Elasticsearch request + */ + private function deleteIndex(string $indexName): void + { + if ($this->index->indexExists($indexName)) { + // This creation of the index is not in den index service as this is the only place it should be used. In + // production and in many cases, you should connect to the index managed by the backend (imports). + $this->client->indices()->delete([ + 'index' => $indexName, + ]); + } + } } diff --git a/src/Service/ElasticSearch/ElasticSearchIndex.php b/src/Service/ElasticSearch/ElasticSearchIndex.php index 17f50d1..ed1bb27 100644 --- a/src/Service/ElasticSearch/ElasticSearchIndex.php +++ b/src/Service/ElasticSearch/ElasticSearchIndex.php @@ -21,11 +21,11 @@ public function __construct( ) { } - public function indexExists($indexName): bool + public function indexExists(string $indexName): bool { try { /** @var Elasticsearch $response */ - $response = $this->client->indices()->getAlias(['name' => $indexName]); + $response = $this->client->indices()->get(['index' => $indexName]); return Response::HTTP_OK === $response->getStatusCode(); } catch (ClientResponseException|ServerResponseException $e) { From 6ecf3b471160132369207e40b29608728a4d10b4 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Mon, 2 Jun 2025 22:44:04 +0200 Subject: [PATCH 04/35] 4268: Added healthcheck to elasticsearch service --- README.md | 19 +++++++++++++++++++ docker-compose.override.yml | 8 ++++++++ 2 files changed, 27 insertions(+) diff --git a/README.md b/README.md index bc04bc3..64e7a45 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,25 @@ ElasticSearch. > [!TIP] > Use `task fixtures:load` to load all fixtures into Elasticsearch. +> [!CAUTION] +> If the `task fixtures:load` command (or any `bin/console app:fixtures:load` incantation) fails with an error like +> +> ``` shell +> No alive nodes. All the 1 nodes seem to be down. +> ``` +> +> you must reset the Elasticsearch service to be ready for requests, e.g. by running +> +> ``` shell +> docker compose exec elasticsearch curl 'http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=5s' --verbose +> ``` +> +> until it returns `HTTP/1.1 200 OK` (cf. [How to Implement Elasticsearch Health Check in Docker +> Compose](https://www.baeldung.com/ops/elasticsearch-docker-compose)). +> +> Alternatively, you can run `docker compose up --detach --wait` to recreate all services and +> (automatically) wait for Elasticsearch to be ready – it takes a while … + ## Accessing the API To access the API, a valid API key must be presented in the `X-Api-Key` header, e.g. diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 4cab99a..6e07ff8 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -44,6 +44,14 @@ services: environment: - discovery.type=single-node - xpack.security.enabled=false + # We need to be able to wait for Elasticsearch to be ready for requests + # https://www.baeldung.com/ops/elasticsearch-docker-compose + healthcheck: + test: ["CMD-SHELL", "curl -fs 'http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=5s' || exit 1"] + interval: 10s + timeout: 5s + retries: 5 + start_period: 20s markdownlint: image: itkdev/markdownlint From 4ce09d152d799de19f62d3e19883d1264b8dab75 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Mon, 2 Jun 2025 22:45:06 +0200 Subject: [PATCH 05/35] 4268: Updated fixture loader to allow loading from local files --- README.md | 3 +++ src/Fixtures/FixtureLoader.php | 20 ++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 64e7a45..07f974d 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,9 @@ ElasticSearch. > [!TIP] > Use `task fixtures:load` to load all fixtures into Elasticsearch. + + > [!CAUTION] > If the `task fixtures:load` command (or any `bin/console app:fixtures:load` incantation) fails with an error like > diff --git a/src/Fixtures/FixtureLoader.php b/src/Fixtures/FixtureLoader.php index 941c5c3..e11e764 100644 --- a/src/Fixtures/FixtureLoader.php +++ b/src/Fixtures/FixtureLoader.php @@ -8,6 +8,8 @@ use Elastic\Elasticsearch\Exception\MissingParameterException; use Elastic\Elasticsearch\Exception\ServerResponseException; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Exception\HttpException; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface; use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface; use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface; @@ -58,14 +60,28 @@ public function process(string $indexName, string $url): void * @throws RedirectionExceptionInterface * @throws ServerExceptionInterface * @throws TransportExceptionInterface - * @throws \HttpException + * @throws HttpException */ private function download(string $url): array { + // Load from local file if using "file" URL scheme. + if (preg_match('~^file://(?/.+)$~', $url, $matches)) { + $path = $matches['path']; + if (!is_readable($path)) { + throw new NotFoundHttpException('Unable to download fixture data'); + } + $data = json_decode(file_get_contents($path), true); + if (empty($data)) { + throw new NotFoundHttpException('Unable to download fixture data'); + } + + return $data; + } + $response = $this->httpClient->request('GET', $url); if (Response::HTTP_OK !== $response->getStatusCode()) { - throw new \HttpException('Unable to download fixture data'); + throw new NotFoundHttpException('Unable to download fixture data'); } return $response->toArray(); From c09b61c702104de33ff1867718a7b138f418241b Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Mon, 2 Jun 2025 23:20:33 +0200 Subject: [PATCH 06/35] 4268: Added and used local resources for testing --- Taskfile.yml | 16 +- tests/ApiPlatform/EventsTest.php | 22 ++ tests/resources/daily_occurrences.json | 276 +++++++++++++++++++++++++ tests/resources/events.json | 169 +++++++++++++++ tests/resources/locations.json | 19 ++ tests/resources/occurrences.json | 276 +++++++++++++++++++++++++ tests/resources/organizations.json | 22 ++ tests/resources/tags.json | 26 +++ tests/resources/vocabularies.json | 15 ++ 9 files changed, 840 insertions(+), 1 deletion(-) create mode 100644 tests/resources/daily_occurrences.json create mode 100644 tests/resources/events.json create mode 100644 tests/resources/locations.json create mode 100644 tests/resources/occurrences.json create mode 100644 tests/resources/organizations.json create mode 100644 tests/resources/tags.json create mode 100644 tests/resources/vocabularies.json diff --git a/Taskfile.yml b/Taskfile.yml index 035c500..822afb9 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -47,11 +47,25 @@ tasks: api:test: desc: Run API tests - prompt: Make sure to load fixtures before running tests (`task fixtures:load`) + prompt: This will reset your local data. Continue? cmds: + # Load local fixtures. + - for: + - events + - organizations + - occurrences + - daily_occurrences + - tags + - vocabularies + - locations + task: compose + vars: + COMPOSE_ARGS: exec phpfpm bin/console app:fixtures:load {{.ITEM}} --url=file:///app/tests/resources/{{.ITEM}}.json - task: compose vars: COMPOSE_ARGS: exec phpfpm bin/phpunit + # Loading some fixtures generates an 'Warning: Undefined array key "entityId"' error. + ignore_error: true composer: desc: "Run `composer` command. Example: task composer -- normalize" diff --git a/tests/ApiPlatform/EventsTest.php b/tests/ApiPlatform/EventsTest.php index dde0ef4..cb4f32b 100644 --- a/tests/ApiPlatform/EventsTest.php +++ b/tests/ApiPlatform/EventsTest.php @@ -23,5 +23,27 @@ public function testGetEvents(): void $data = $response->toArray(); $this->assertArrayHasKey('hydra:member', $data); $this->assertCount(2, $data['hydra:member']); + + $response = static::createAuthenticatedClient() + ->request('GET', '/api/v2/events?'.http_build_query(['publicAccess' => 'true'])); + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + $this->assertResponseHeaderSame('content-type', 'application/ld+json; charset=utf-8'); + $this->assertJson($response->getContent()); + + $data = $response->toArray(); + $this->assertArrayHasKey('hydra:member', $data); + $this->assertCount(1, $data['hydra:member']); + + $response = static::createAuthenticatedClient() + ->request('GET', '/api/v2/events?'.http_build_query(['publicAccess' => 'false'])); + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + $this->assertResponseHeaderSame('content-type', 'application/ld+json; charset=utf-8'); + $this->assertJson($response->getContent()); + + $data = $response->toArray(); + $this->assertArrayHasKey('hydra:member', $data); + $this->assertCount(1, $data['hydra:member']); } } diff --git a/tests/resources/daily_occurrences.json b/tests/resources/daily_occurrences.json new file mode 100644 index 0000000..adf2541 --- /dev/null +++ b/tests/resources/daily_occurrences.json @@ -0,0 +1,276 @@ +[{ + "entityId": 11, + "start": "2024-11-08T10:30:00+01:00", + "end": "2024-11-08T16:30:00+01:00", + "ticketPriceRange": "Free or 100", + "room": "M2-6", + "status": null, + "event": { + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00", + "entityId": 8, + "title": "ITKDev test event 2", + "excerpt": "Quis vel eros donec ac odio tempor orci dapibus ultrices. Velit dignissim sodales ut eu sem integer. Massa tincidunt dui ut ornare lectus sit amet est placerat.", + "description": "

Quam vulputate dignissim suspendisse in est ante. Libero enim sed faucibus turpis in eu mi bibendum. Gravida rutrum quisque non tellus orci. Eget nunc lobortis mattis aliquam faucibus purus in massa. Tortor posuere ac ut consequat semper viverra nam. Sapien et ligula ullamcorper malesuada. Et molestie ac feugiat sed lectus vestibulum mattis ullamcorper. At consectetur lorem donec massa sapien faucibus et. Ut consequat semper viverra nam libero. Hendrerit gravida rutrum quisque non tellus orci ac.<\/p>", + "url": "https:\/\/itk.aarhus.dk\/nyheder\/", + "ticketUrl": "https:\/\/www.aakb.dk\/arrangementer\/born\/kreavaerksted-monsterboger-0", + "publicAccess": true, + "organizer": { + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00", + "entityId": 9, + "name": "ITKDev", + "email": "info@itkdev.dk", + "url": "https:\/\/github.com\/itk-dev" + }, + "partners": [], + "occurrences": [ + { + "entityId": 10, + "start": "2024-12-07T14:30:00+01:00", + "end": "2024-12-07T15:30:00+01:00", + "ticketPriceRange": "10.000 Kr.", + "room": "M2-5", + "status": null + }, + { + "entityId": 11, + "start": "2024-11-08T10:30:00+01:00", + "end": "2024-11-08T16:30:00+01:00", + "ticketPriceRange": "Free or 100", + "room": "M2-6", + "status": null + } + ], + "dailyOccurrences": [ + { + "entityId": 10, + "start": "2024-12-07T14:30:00+01:00", + "end": "2024-12-07T15:30:00+01:00", + "ticketPriceRange": "10.000 Kr.", + "room": "M2-5", + "status": null + }, + { + "entityId": 11, + "start": "2024-11-08T10:30:00+01:00", + "end": "2024-11-08T16:30:00+01:00", + "ticketPriceRange": "Free or 100", + "room": "M2-6", + "status": null + } + ], + "tags": [ + "aros", + "Koncert" + ], + "imageUrls": { + "small": "media\/cache\/resolve\/small\/438d0b1f\/50856725020664f9161133a2396cfddacd9aec930c259e4403837f55f4cb3cab.png", + "medium": "media\/cache\/resolve\/medium\/438d0b1f\/50856725020664f9161133a2396cfddacd9aec930c259e4403837f55f4cb3cab.png", + "large": "media\/cache\/resolve\/large\/438d0b1f\/50856725020664f9161133a2396cfddacd9aec930c259e4403837f55f4cb3cab.png" + }, + "location": { + "entityId": 4, + "name": "ITK Development", + "image": null, + "url": "https:\/\/itk.aarhus.dk\/om-itk\/afdelinger\/development\/", + "telephone": null, + "disabilityAccess": true, + "mail": "itkdev@mkb.aarhus.dk", + "street": "Hack Kampmanns Plads 2", + "suite": "2.2", + "region": "Jylland", + "city": "Aarhus", + "country": "Danmark", + "postalCode": "8000", + "coordinates": [ + 56.1507645, + 10.2112699 + ] + } + } +},{ + "entityId": 10, + "start": "2024-12-07T14:30:00+01:00", + "end": "2024-12-07T15:30:00+01:00", + "ticketPriceRange": "10.000 Kr.", + "room": "M2-5", + "status": null, + "event": { + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00", + "entityId": 8, + "title": "ITKDev test event 2", + "excerpt": "Quis vel eros donec ac odio tempor orci dapibus ultrices. Velit dignissim sodales ut eu sem integer. Massa tincidunt dui ut ornare lectus sit amet est placerat.", + "description": "

Quam vulputate dignissim suspendisse in est ante. Libero enim sed faucibus turpis in eu mi bibendum. Gravida rutrum quisque non tellus orci. Eget nunc lobortis mattis aliquam faucibus purus in massa. Tortor posuere ac ut consequat semper viverra nam. Sapien et ligula ullamcorper malesuada. Et molestie ac feugiat sed lectus vestibulum mattis ullamcorper. At consectetur lorem donec massa sapien faucibus et. Ut consequat semper viverra nam libero. Hendrerit gravida rutrum quisque non tellus orci ac.<\/p>", + "url": "https:\/\/itk.aarhus.dk\/nyheder\/", + "ticketUrl": "https:\/\/www.aakb.dk\/arrangementer\/born\/kreavaerksted-monsterboger-0", + "publicAccess": true, + "organizer": { + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00", + "entityId": 9, + "name": "ITKDev", + "email": "info@itkdev.dk", + "url": "https:\/\/github.com\/itk-dev" + }, + "partners": [], + "occurrences": [ + { + "entityId": 10, + "start": "2024-12-07T14:30:00+01:00", + "end": "2024-12-07T15:30:00+01:00", + "ticketPriceRange": "10.000 Kr.", + "room": "M2-5", + "status": null + }, + { + "entityId": 11, + "start": "2024-11-08T10:30:00+01:00", + "end": "2024-11-08T16:30:00+01:00", + "ticketPriceRange": "Free or 100", + "room": "M2-6", + "status": null + } + ], + "dailyOccurrences": [ + { + "entityId": 10, + "start": "2024-12-07T14:30:00+01:00", + "end": "2024-12-07T15:30:00+01:00", + "ticketPriceRange": "10.000 Kr.", + "room": "M2-5", + "status": null + }, + { + "entityId": 11, + "start": "2024-11-08T10:30:00+01:00", + "end": "2024-11-08T16:30:00+01:00", + "ticketPriceRange": "Free or 100", + "room": "M2-6", + "status": null + } + ], + "tags": [ + "aros", + "Koncert" + ], + "imageUrls": { + "small": "media\/cache\/resolve\/small\/438d0b1f\/50856725020664f9161133a2396cfddacd9aec930c259e4403837f55f4cb3cab.png", + "medium": "media\/cache\/resolve\/medium\/438d0b1f\/50856725020664f9161133a2396cfddacd9aec930c259e4403837f55f4cb3cab.png", + "large": "media\/cache\/resolve\/large\/438d0b1f\/50856725020664f9161133a2396cfddacd9aec930c259e4403837f55f4cb3cab.png" + }, + "location": { + "entityId": 4, + "name": "ITK Development", + "image": null, + "url": "https:\/\/itk.aarhus.dk\/om-itk\/afdelinger\/development\/", + "telephone": null, + "disabilityAccess": true, + "mail": "itkdev@mkb.aarhus.dk", + "street": "Hack Kampmanns Plads 2", + "suite": "2.2", + "region": "Jylland", + "city": "Aarhus", + "country": "Danmark", + "postalCode": "8000", + "coordinates": [ + 56.1507645, + 10.2112699 + ] + } + } +},{ + "entityId": 12, + "start": "2024-12-08T12:30:00+01:00", + "end": "2024-12-08T14:30:00+01:00", + "ticketPriceRange": "Free in December", + "room": "M2-5", + "status": null, + "event": { + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00", + "entityId": 7, + "title": "ITKDev test event 1", + "excerpt": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", + "description": "

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis blandit turpis cursus in. Nisl suscipit adipiscing bibendum est ultricies integer quis auctor. Diam donec adipiscing tristique risus nec feugiat. Tincidunt eget nullam non nisi est. Consectetur a erat nam at lectus urna. Vulputate sapien nec sagittis aliquam. Luctus venenatis lectus magna fringilla. Sit amet consectetur adipiscing elit duis tristique. Bibendum enim facilisis gravida neque convallis a.<\/p>

Cursus eget nunc scelerisque viverra mauris in aliquam sem. Euismod elementum nisi quis eleifend quam adipiscing vitae proin sagittis.
Sodales ut eu sem integer vitae justo eget. Lacus sed viverra tellus in.<\/p>", + "url": "https:\/\/itk.aarhus.dk\/nyheder\/projektnyheder\/robotternes-bidrag-til-den-groenne-omstilling\/", + "ticketUrl": "https:\/\/www.aakb.dk\/arrangementer\/boern\/skak-nu-eller-aldrig-18", + "publicAccess": true, + "organizer": { + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00", + "entityId": 9, + "name": "ITKDev", + "email": "info@itkdev.dk", + "url": "https:\/\/github.com\/itk-dev" + }, + "partners": [ + { + "entityId": 10, + "name": "Aakb", + "email": "info@aakb.dk", + "url": "https:\/\/aakb.dk\/", + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00" + }, + { + "entityId": 11, + "name": "Dokk1", + "email": "info@dokk1.dk", + "url": "https:\/\/dokk1.dk\/", + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00" + } + ], + "occurrences": [ + { + "entityId": 12, + "start": "2024-12-08T12:30:00+01:00", + "end": "2024-12-08T14:30:00+01:00", + "ticketPriceRange": "Free in December", + "room": "M2-5", + "status": null + } + ], + "dailyOccurrences": [ + { + "entityId": 12, + "start": "2024-12-08T12:30:00+01:00", + "end": "2024-12-08T14:30:00+01:00", + "ticketPriceRange": "Free in December", + "room": "M2-5", + "status": null + } + ], + "tags": [ + "aros", + "theoceanraceaarhus", + "ITKDev" + ], + "imageUrls": { + "small": "media\/cache\/resolve\/small\/438d0b1f\/00bae8ff00e64832de73422f17a605ba391edc05b2458a786d4e8a11243e2162.png", + "medium": "media\/cache\/resolve\/medium\/438d0b1f\/00bae8ff00e64832de73422f17a605ba391edc05b2458a786d4e8a11243e2162.png", + "large": "media\/cache\/resolve\/large\/438d0b1f\/00bae8ff00e64832de73422f17a605ba391edc05b2458a786d4e8a11243e2162.png" + }, + "location": { + "entityId": 4, + "name": "ITK Development", + "image": null, + "url": "https:\/\/itk.aarhus.dk\/om-itk\/afdelinger\/development\/", + "telephone": null, + "disabilityAccess": true, + "mail": "itkdev@mkb.aarhus.dk", + "street": "Hack Kampmanns Plads 2", + "suite": "2.2", + "region": "Jylland", + "city": "Aarhus", + "country": "Danmark", + "postalCode": "8000", + "coordinates": [ + 56.1507645, + 10.2112699 + ] + } + } +}] \ No newline at end of file diff --git a/tests/resources/events.json b/tests/resources/events.json new file mode 100644 index 0000000..6a5669d --- /dev/null +++ b/tests/resources/events.json @@ -0,0 +1,169 @@ +[{ + "entityId": 7, + "title": "ITKDev test event 1", + "excerpt": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", + "description": "

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis blandit turpis cursus in. Nisl suscipit adipiscing bibendum est ultricies integer quis auctor. Diam donec adipiscing tristique risus nec feugiat. Tincidunt eget nullam non nisi est. Consectetur a erat nam at lectus urna. Vulputate sapien nec sagittis aliquam. Luctus venenatis lectus magna fringilla. Sit amet consectetur adipiscing elit duis tristique. Bibendum enim facilisis gravida neque convallis a.<\/p>

Cursus eget nunc scelerisque viverra mauris in aliquam sem. Euismod elementum nisi quis eleifend quam adipiscing vitae proin sagittis.
Sodales ut eu sem integer vitae justo eget. Lacus sed viverra tellus in.<\/p>", + "url": "https:\/\/itk.aarhus.dk\/nyheder\/projektnyheder\/robotternes-bidrag-til-den-groenne-omstilling\/", + "ticketUrl": "https:\/\/www.aakb.dk\/arrangementer\/boern\/skak-nu-eller-aldrig-18", + "publicAccess": true, + "organizer": { + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00", + "entityId": 9, + "name": "ITKDev", + "email": "info@itkdev.dk", + "url": "https:\/\/github.com\/itk-dev" + }, + "partners": [ + { + "entityId": 10, + "name": "Aakb", + "email": "info@aakb.dk", + "url": "https:\/\/aakb.dk\/", + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00" + }, + { + "entityId": 11, + "name": "Dokk1", + "email": "info@dokk1.dk", + "url": "https:\/\/dokk1.dk\/", + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00" + } + ], + "occurrences": [ + { + "entityId": 12, + "start": "2024-12-08T12:30:00+01:00", + "end": "2024-12-08T14:30:00+01:00", + "ticketPriceRange": "Free in December", + "room": "M2-5", + "status": null + } + ], + "dailyOccurrences": [ + { + "entityId": 12, + "start": "2024-12-08T12:30:00+01:00", + "end": "2024-12-08T14:30:00+01:00", + "ticketPriceRange": "Free in December", + "room": "M2-5", + "status": null + } + ], + "tags": [ + "aros", + "theoceanraceaarhus", + "ITKDev" + ], + "imageUrls": { + "small": "media\/cache\/resolve\/small\/438d0b1f\/00bae8ff00e64832de73422f17a605ba391edc05b2458a786d4e8a11243e2162.png", + "medium": "media\/cache\/resolve\/medium\/438d0b1f\/00bae8ff00e64832de73422f17a605ba391edc05b2458a786d4e8a11243e2162.png", + "large": "media\/cache\/resolve\/large\/438d0b1f\/00bae8ff00e64832de73422f17a605ba391edc05b2458a786d4e8a11243e2162.png" + }, + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00", + "location": { + "entityId": 4, + "name": "ITK Development", + "image": null, + "url": "https:\/\/itk.aarhus.dk\/om-itk\/afdelinger\/development\/", + "telephone": null, + "disabilityAccess": true, + "mail": "itkdev@mkb.aarhus.dk", + "street": "Hack Kampmanns Plads 2", + "suite": "2.2", + "region": "Jylland", + "city": "Aarhus", + "country": "Danmark", + "postalCode": "8000", + "coordinates": [ + 56.1507645, + 10.2112699 + ] + } +},{ + "entityId": 8, + "title": "ITKDev test event 2", + "excerpt": "Quis vel eros donec ac odio tempor orci dapibus ultrices. Velit dignissim sodales ut eu sem integer. Massa tincidunt dui ut ornare lectus sit amet est placerat.", + "description": "

Quam vulputate dignissim suspendisse in est ante. Libero enim sed faucibus turpis in eu mi bibendum. Gravida rutrum quisque non tellus orci. Eget nunc lobortis mattis aliquam faucibus purus in massa. Tortor posuere ac ut consequat semper viverra nam. Sapien et ligula ullamcorper malesuada. Et molestie ac feugiat sed lectus vestibulum mattis ullamcorper. At consectetur lorem donec massa sapien faucibus et. Ut consequat semper viverra nam libero. Hendrerit gravida rutrum quisque non tellus orci ac.<\/p>", + "url": "https:\/\/itk.aarhus.dk\/nyheder\/", + "ticketUrl": "https:\/\/www.aakb.dk\/arrangementer\/born\/kreavaerksted-monsterboger-0", + "publicAccess": false, + "organizer": { + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00", + "entityId": 9, + "name": "ITKDev", + "email": "info@itkdev.dk", + "url": "https:\/\/github.com\/itk-dev" + }, + "partners": [], + "occurrences": [ + { + "entityId": 10, + "start": "2024-12-07T14:30:00+01:00", + "end": "2024-12-07T15:30:00+01:00", + "ticketPriceRange": "10.000 Kr.", + "room": "M2-5", + "status": null + }, + { + "entityId": 11, + "start": "2024-11-08T10:30:00+01:00", + "end": "2024-11-08T16:30:00+01:00", + "ticketPriceRange": "Free or 100", + "room": "M2-6", + "status": null + } + ], + "dailyOccurrences": [ + { + "entityId": 10, + "start": "2024-12-07T14:30:00+01:00", + "end": "2024-12-07T15:30:00+01:00", + "ticketPriceRange": "10.000 Kr.", + "room": "M2-5", + "status": null + }, + { + "entityId": 11, + "start": "2024-11-08T10:30:00+01:00", + "end": "2024-11-08T16:30:00+01:00", + "ticketPriceRange": "Free or 100", + "room": "M2-6", + "status": null + } + ], + "tags": [ + "aros", + "Koncert" + ], + "imageUrls": { + "small": "media\/cache\/resolve\/small\/438d0b1f\/50856725020664f9161133a2396cfddacd9aec930c259e4403837f55f4cb3cab.png", + "medium": "media\/cache\/resolve\/medium\/438d0b1f\/50856725020664f9161133a2396cfddacd9aec930c259e4403837f55f4cb3cab.png", + "large": "media\/cache\/resolve\/large\/438d0b1f\/50856725020664f9161133a2396cfddacd9aec930c259e4403837f55f4cb3cab.png" + }, + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00", + "location": { + "entityId": 4, + "name": "ITK Development", + "image": null, + "url": "https:\/\/itk.aarhus.dk\/om-itk\/afdelinger\/development\/", + "telephone": null, + "disabilityAccess": true, + "mail": "itkdev@mkb.aarhus.dk", + "street": "Hack Kampmanns Plads 2", + "suite": "2.2", + "region": "Jylland", + "city": "Aarhus", + "country": "Danmark", + "postalCode": "8000", + "coordinates": [ + 56.1507645, + 10.2112699 + ] + } +}] diff --git a/tests/resources/locations.json b/tests/resources/locations.json new file mode 100644 index 0000000..981e1f4 --- /dev/null +++ b/tests/resources/locations.json @@ -0,0 +1,19 @@ +[{ + "entityId": 4, + "name": "ITK Development", + "image": null, + "url": "https:\/\/itk.aarhus.dk\/om-itk\/afdelinger\/development\/", + "telephone": null, + "disabilityAccess": true, + "mail": "itkdev@mkb.aarhus.dk", + "street": "Hack Kampmanns Plads 2", + "suite": "2.2", + "region": "Jylland", + "city": "Aarhus", + "country": "Danmark", + "postalCode": "8000", + "coordinates": [ + 56.1507645, + 10.2112699 + ] +}] \ No newline at end of file diff --git a/tests/resources/occurrences.json b/tests/resources/occurrences.json new file mode 100644 index 0000000..f7c9d90 --- /dev/null +++ b/tests/resources/occurrences.json @@ -0,0 +1,276 @@ +[{ + "entityId": 11, + "start": "2024-11-08T10:30:00+01:00", + "end": "2024-11-08T16:30:00+01:00", + "ticketPriceRange": "Free or 100", + "room": "M2-6", + "event": { + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00", + "entityId": 8, + "title": "ITKDev test event 2", + "excerpt": "Quis vel eros donec ac odio tempor orci dapibus ultrices. Velit dignissim sodales ut eu sem integer. Massa tincidunt dui ut ornare lectus sit amet est placerat.", + "description": "

Quam vulputate dignissim suspendisse in est ante. Libero enim sed faucibus turpis in eu mi bibendum. Gravida rutrum quisque non tellus orci. Eget nunc lobortis mattis aliquam faucibus purus in massa. Tortor posuere ac ut consequat semper viverra nam. Sapien et ligula ullamcorper malesuada. Et molestie ac feugiat sed lectus vestibulum mattis ullamcorper. At consectetur lorem donec massa sapien faucibus et. Ut consequat semper viverra nam libero. Hendrerit gravida rutrum quisque non tellus orci ac.<\/p>", + "url": "https:\/\/itk.aarhus.dk\/nyheder\/", + "ticketUrl": "https:\/\/www.aakb.dk\/arrangementer\/born\/kreavaerksted-monsterboger-0", + "publicAccess": true, + "organizer": { + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00", + "entityId": 9, + "name": "ITKDev", + "email": "info@itkdev.dk", + "url": "https:\/\/github.com\/itk-dev" + }, + "partners": [], + "occurrences": [ + { + "entityId": 10, + "start": "2024-12-07T14:30:00+01:00", + "end": "2024-12-07T15:30:00+01:00", + "ticketPriceRange": "10.000 Kr.", + "room": "M2-5", + "status": null + }, + { + "entityId": 11, + "start": "2024-11-08T10:30:00+01:00", + "end": "2024-11-08T16:30:00+01:00", + "ticketPriceRange": "Free or 100", + "room": "M2-6", + "status": null + } + ], + "dailyOccurrences": [ + { + "entityId": 10, + "start": "2024-12-07T14:30:00+01:00", + "end": "2024-12-07T15:30:00+01:00", + "ticketPriceRange": "10.000 Kr.", + "room": "M2-5", + "status": null + }, + { + "entityId": 11, + "start": "2024-11-08T10:30:00+01:00", + "end": "2024-11-08T16:30:00+01:00", + "ticketPriceRange": "Free or 100", + "room": "M2-6", + "status": null + } + ], + "tags": [ + "aros", + "Koncert" + ], + "imageUrls": { + "small": "media\/cache\/resolve\/small\/438d0b1f\/50856725020664f9161133a2396cfddacd9aec930c259e4403837f55f4cb3cab.png", + "medium": "media\/cache\/resolve\/medium\/438d0b1f\/50856725020664f9161133a2396cfddacd9aec930c259e4403837f55f4cb3cab.png", + "large": "media\/cache\/resolve\/large\/438d0b1f\/50856725020664f9161133a2396cfddacd9aec930c259e4403837f55f4cb3cab.png" + }, + "location": { + "entityId": 4, + "name": "ITK Development", + "image": null, + "url": "https:\/\/itk.aarhus.dk\/om-itk\/afdelinger\/development\/", + "telephone": null, + "disabilityAccess": true, + "mail": "itkdev@mkb.aarhus.dk", + "street": "Hack Kampmanns Plads 2", + "suite": "2.2", + "region": "Jylland", + "city": "Aarhus", + "country": "Danmark", + "postalCode": "8000", + "coordinates": [ + 56.1507645, + 10.2112699 + ] + } + }, + "status": null +},{ + "entityId": 10, + "start": "2024-12-07T14:30:00+01:00", + "end": "2024-12-07T15:30:00+01:00", + "ticketPriceRange": "10.000 Kr.", + "room": "M2-5", + "event": { + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00", + "entityId": 8, + "title": "ITKDev test event 2", + "excerpt": "Quis vel eros donec ac odio tempor orci dapibus ultrices. Velit dignissim sodales ut eu sem integer. Massa tincidunt dui ut ornare lectus sit amet est placerat.", + "description": "

Quam vulputate dignissim suspendisse in est ante. Libero enim sed faucibus turpis in eu mi bibendum. Gravida rutrum quisque non tellus orci. Eget nunc lobortis mattis aliquam faucibus purus in massa. Tortor posuere ac ut consequat semper viverra nam. Sapien et ligula ullamcorper malesuada. Et molestie ac feugiat sed lectus vestibulum mattis ullamcorper. At consectetur lorem donec massa sapien faucibus et. Ut consequat semper viverra nam libero. Hendrerit gravida rutrum quisque non tellus orci ac.<\/p>", + "url": "https:\/\/itk.aarhus.dk\/nyheder\/", + "ticketUrl": "https:\/\/www.aakb.dk\/arrangementer\/born\/kreavaerksted-monsterboger-0", + "publicAccess": true, + "organizer": { + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00", + "entityId": 9, + "name": "ITKDev", + "email": "info@itkdev.dk", + "url": "https:\/\/github.com\/itk-dev" + }, + "partners": [], + "occurrences": [ + { + "entityId": 10, + "start": "2024-12-07T14:30:00+01:00", + "end": "2024-12-07T15:30:00+01:00", + "ticketPriceRange": "10.000 Kr.", + "room": "M2-5", + "status": null + }, + { + "entityId": 11, + "start": "2024-11-08T10:30:00+01:00", + "end": "2024-11-08T16:30:00+01:00", + "ticketPriceRange": "Free or 100", + "room": "M2-6", + "status": null + } + ], + "dailyOccurrences": [ + { + "entityId": 10, + "start": "2024-12-07T14:30:00+01:00", + "end": "2024-12-07T15:30:00+01:00", + "ticketPriceRange": "10.000 Kr.", + "room": "M2-5", + "status": null + }, + { + "entityId": 11, + "start": "2024-11-08T10:30:00+01:00", + "end": "2024-11-08T16:30:00+01:00", + "ticketPriceRange": "Free or 100", + "room": "M2-6", + "status": null + } + ], + "tags": [ + "aros", + "Koncert" + ], + "imageUrls": { + "small": "media\/cache\/resolve\/small\/438d0b1f\/50856725020664f9161133a2396cfddacd9aec930c259e4403837f55f4cb3cab.png", + "medium": "media\/cache\/resolve\/medium\/438d0b1f\/50856725020664f9161133a2396cfddacd9aec930c259e4403837f55f4cb3cab.png", + "large": "media\/cache\/resolve\/large\/438d0b1f\/50856725020664f9161133a2396cfddacd9aec930c259e4403837f55f4cb3cab.png" + }, + "location": { + "entityId": 4, + "name": "ITK Development", + "image": null, + "url": "https:\/\/itk.aarhus.dk\/om-itk\/afdelinger\/development\/", + "telephone": null, + "disabilityAccess": true, + "mail": "itkdev@mkb.aarhus.dk", + "street": "Hack Kampmanns Plads 2", + "suite": "2.2", + "region": "Jylland", + "city": "Aarhus", + "country": "Danmark", + "postalCode": "8000", + "coordinates": [ + 56.1507645, + 10.2112699 + ] + } + }, + "status": null +},{ + "entityId": 12, + "start": "2024-12-08T12:30:00+01:00", + "end": "2024-12-08T14:30:00+01:00", + "ticketPriceRange": "Free in December", + "room": "M2-5", + "event": { + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00", + "entityId": 7, + "title": "ITKDev test event 1", + "excerpt": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", + "description": "

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis blandit turpis cursus in. Nisl suscipit adipiscing bibendum est ultricies integer quis auctor. Diam donec adipiscing tristique risus nec feugiat. Tincidunt eget nullam non nisi est. Consectetur a erat nam at lectus urna. Vulputate sapien nec sagittis aliquam. Luctus venenatis lectus magna fringilla. Sit amet consectetur adipiscing elit duis tristique. Bibendum enim facilisis gravida neque convallis a.<\/p>

Cursus eget nunc scelerisque viverra mauris in aliquam sem. Euismod elementum nisi quis eleifend quam adipiscing vitae proin sagittis.
Sodales ut eu sem integer vitae justo eget. Lacus sed viverra tellus in.<\/p>", + "url": "https:\/\/itk.aarhus.dk\/nyheder\/projektnyheder\/robotternes-bidrag-til-den-groenne-omstilling\/", + "ticketUrl": "https:\/\/www.aakb.dk\/arrangementer\/boern\/skak-nu-eller-aldrig-18", + "publicAccess": true, + "organizer": { + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00", + "entityId": 9, + "name": "ITKDev", + "email": "info@itkdev.dk", + "url": "https:\/\/github.com\/itk-dev" + }, + "partners": [ + { + "entityId": 10, + "name": "Aakb", + "email": "info@aakb.dk", + "url": "https:\/\/aakb.dk\/", + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00" + }, + { + "entityId": 11, + "name": "Dokk1", + "email": "info@dokk1.dk", + "url": "https:\/\/dokk1.dk\/", + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00" + } + ], + "occurrences": [ + { + "entityId": 12, + "start": "2024-12-08T12:30:00+01:00", + "end": "2024-12-08T14:30:00+01:00", + "ticketPriceRange": "Free in December", + "room": "M2-5", + "status": null + } + ], + "dailyOccurrences": [ + { + "entityId": 12, + "start": "2024-12-08T12:30:00+01:00", + "end": "2024-12-08T14:30:00+01:00", + "ticketPriceRange": "Free in December", + "room": "M2-5", + "status": null + } + ], + "tags": [ + "aros", + "theoceanraceaarhus", + "ITKDev" + ], + "imageUrls": { + "small": "media\/cache\/resolve\/small\/438d0b1f\/00bae8ff00e64832de73422f17a605ba391edc05b2458a786d4e8a11243e2162.png", + "medium": "media\/cache\/resolve\/medium\/438d0b1f\/00bae8ff00e64832de73422f17a605ba391edc05b2458a786d4e8a11243e2162.png", + "large": "media\/cache\/resolve\/large\/438d0b1f\/00bae8ff00e64832de73422f17a605ba391edc05b2458a786d4e8a11243e2162.png" + }, + "location": { + "entityId": 4, + "name": "ITK Development", + "image": null, + "url": "https:\/\/itk.aarhus.dk\/om-itk\/afdelinger\/development\/", + "telephone": null, + "disabilityAccess": true, + "mail": "itkdev@mkb.aarhus.dk", + "street": "Hack Kampmanns Plads 2", + "suite": "2.2", + "region": "Jylland", + "city": "Aarhus", + "country": "Danmark", + "postalCode": "8000", + "coordinates": [ + 56.1507645, + 10.2112699 + ] + } + }, + "status": null +}] \ No newline at end of file diff --git a/tests/resources/organizations.json b/tests/resources/organizations.json new file mode 100644 index 0000000..f0aa387 --- /dev/null +++ b/tests/resources/organizations.json @@ -0,0 +1,22 @@ +[{ + "entityId": 9, + "name": "ITKDev", + "email": "info@itkdev.dk", + "url": "https:\/\/github.com\/itk-dev", + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00" +},{ + "entityId": 11, + "name": "Dokk1", + "email": "info@dokk1.dk", + "url": "https:\/\/dokk1.dk\/", + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00" +},{ + "entityId": 10, + "name": "Aakb", + "email": "info@aakb.dk", + "url": "https:\/\/aakb.dk\/", + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00" +}] \ No newline at end of file diff --git a/tests/resources/tags.json b/tests/resources/tags.json new file mode 100644 index 0000000..43ea312 --- /dev/null +++ b/tests/resources/tags.json @@ -0,0 +1,26 @@ +[{ + "name": "aros", + "vocabulary": [ + "aarhusguiden" + ] +},{ + "name": "theoceanraceaarhus", + "vocabulary": [ + "aarhusguiden" + ] +},{ + "name": "Koncert", + "vocabulary": [ + "aarhusguiden" + ] +},{ + "name": "For b\u00f8rn", + "vocabulary": [ + "aarhusguiden" + ] +},{ + "name": "ITKDev", + "vocabulary": [ + "aarhusguiden" + ] +}] \ No newline at end of file diff --git a/tests/resources/vocabularies.json b/tests/resources/vocabularies.json new file mode 100644 index 0000000..ea4de07 --- /dev/null +++ b/tests/resources/vocabularies.json @@ -0,0 +1,15 @@ +[{ + "name": "aarhusguiden", + "tags": [ + "aros", + "theoceanraceaarhus", + "For b\u00f8rn", + "Koncert", + "ITKDev" + ], + "description": "Managed tags vocabulary for aarhusguiden.dk" +},{ + "name": "feeds", + "tags": [], + "description": "Free tags from feeds" +}] \ No newline at end of file From be5923d14934c14233a0fa4df99ad0cc33446697 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Wed, 4 Jun 2025 14:04:59 +0200 Subject: [PATCH 07/35] 4268: Improved test setup --- .github/workflows/pr.yaml | 4 +- README.md | 6 +- Taskfile.yml | 15 ++-- src/Fixtures/FixtureLoader.php | 4 +- tests/ApiPlatform/AbstractApiTestCase.php | 12 +++ tests/ApiPlatform/EventsFilterTest.php | 42 +++++++++ tests/ApiPlatform/EventsTest.php | 46 ++-------- tests/ApiPlatform/TagsTest.php | 15 ++++ .../Trait/GetEntitiesTestTrait.php | 23 +++++ tests/ApiPlatform/VocabulariesTest.php | 15 ++++ tests/resources/README.md | 28 ++++++ tests/resources/events.json | 85 +++++++++++++++++++ tests/resources/tags.json | 7 +- tests/resources/vocabularies.json | 4 +- 14 files changed, 252 insertions(+), 54 deletions(-) create mode 100644 tests/ApiPlatform/EventsFilterTest.php create mode 100644 tests/ApiPlatform/TagsTest.php create mode 100644 tests/ApiPlatform/Trait/GetEntitiesTestTrait.php create mode 100644 tests/ApiPlatform/VocabulariesTest.php create mode 100644 tests/resources/README.md diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index d261cda..601ef5c 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -21,9 +21,9 @@ jobs: docker network create frontend task --yes site:update - - name: Load fixtures + - name: Load test fixtures run: | - task --yes fixtures:load + task --yes fixtures:load:test - name: Run API tests run: | diff --git a/README.md b/README.md index 07f974d..ee6b194 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ curl --silent --header "X-Api-Key: api_key_1" "http://$(docker compose port ngin ## Test -``` shell -task fixtures:load --yes -task api:test --yes +``` shell name=run-tests +task fixtures:load:test --yes +task api:test ``` diff --git a/Taskfile.yml b/Taskfile.yml index 822afb9..237760c 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -45,11 +45,10 @@ tasks: ignore_error: true silent: true - api:test: - desc: Run API tests - prompt: This will reset your local data. Continue? + fixtures:load:test: + desc: Load local fixtures + prompt: Really load all local fixtures? cmds: - # Load local fixtures. - for: - events - organizations @@ -61,11 +60,15 @@ tasks: task: compose vars: COMPOSE_ARGS: exec phpfpm bin/console app:fixtures:load {{.ITEM}} --url=file:///app/tests/resources/{{.ITEM}}.json + # Loading some fixtures generates an 'Warning: Undefined array key "entityId"' error. + ignore_error: true + + api:test: + desc: Run API tests + cmds: - task: compose vars: COMPOSE_ARGS: exec phpfpm bin/phpunit - # Loading some fixtures generates an 'Warning: Undefined array key "entityId"' error. - ignore_error: true composer: desc: "Run `composer` command. Example: task composer -- normalize" diff --git a/src/Fixtures/FixtureLoader.php b/src/Fixtures/FixtureLoader.php index e11e764..9633a42 100644 --- a/src/Fixtures/FixtureLoader.php +++ b/src/Fixtures/FixtureLoader.php @@ -103,9 +103,11 @@ private function indexItems(string $indexName, array $items): void foreach ($items as $item) { $params = [ 'index' => $indexName, - 'id' => $item['entityId'], 'body' => $item, ]; + if (isset($item['entityId'])) { + $params['id'] = $item['entityId']; + } try { // No other places in this part of the frontend should index data, hence it's not in the index service. $response = $this->client->index($params); diff --git a/tests/ApiPlatform/AbstractApiTestCase.php b/tests/ApiPlatform/AbstractApiTestCase.php index 135a369..bde19e6 100644 --- a/tests/ApiPlatform/AbstractApiTestCase.php +++ b/tests/ApiPlatform/AbstractApiTestCase.php @@ -4,9 +4,12 @@ use ApiPlatform\Symfony\Bundle\Test\ApiTestCase; use ApiPlatform\Symfony\Bundle\Test\Client; +use ApiPlatform\Symfony\Bundle\Test\Response; abstract class AbstractApiTestCase extends ApiTestCase { + protected static string $requestPath; + protected static function createAuthenticatedClient(): Client { return static::createClient(defaultOptions: [ @@ -16,4 +19,13 @@ protected static function createAuthenticatedClient(): Client ], ]); } + + protected function get(array $query, ?string $path = null, bool $authenticated = true): Response + { + $path ??= static::$requestPath; + + $client = $authenticated ? self::createAuthenticatedClient() : self::createClient(); + + return $client->request('GET', $path.(str_contains($path, '?') ? '&' : '?').http_build_query($query)); + } } diff --git a/tests/ApiPlatform/EventsFilterTest.php b/tests/ApiPlatform/EventsFilterTest.php new file mode 100644 index 0000000..dd912b8 --- /dev/null +++ b/tests/ApiPlatform/EventsFilterTest.php @@ -0,0 +1,42 @@ +get($query); + + $data = $response->toArray(); + $this->assertArrayHasKey('hydra:member', $data); + $this->assertCount($expectedCount, $data['hydra:member']); + } + + public static function getEventsProvider(): iterable + { + yield [ + [], + 3, + ]; + + yield [ + ['publicAccess' => 'true'], + 2, + ]; + + yield [ + ['publicAccess' => 'false'], + 1, + ]; + } +} diff --git a/tests/ApiPlatform/EventsTest.php b/tests/ApiPlatform/EventsTest.php index cb4f32b..8c2095f 100644 --- a/tests/ApiPlatform/EventsTest.php +++ b/tests/ApiPlatform/EventsTest.php @@ -2,48 +2,14 @@ namespace App\Tests\ApiPlatform; -use Symfony\Component\HttpFoundation\Response; +use App\Tests\ApiPlatform\Trait\GetEntitiesTestTrait; +/** + * Test that we can call the API. + */ class EventsTest extends AbstractApiTestCase { - public function testGetEvents(): void - { - static::createClient() - ->request('GET', '/api/v2/events'); + use GetEntitiesTestTrait; - $this->assertResponseStatusCodeSame(Response::HTTP_UNAUTHORIZED); - - $response = static::createAuthenticatedClient() - ->request('GET', '/api/v2/events'); - - $this->assertResponseStatusCodeSame(Response::HTTP_OK); - $this->assertResponseHeaderSame('content-type', 'application/ld+json; charset=utf-8'); - $this->assertJson($response->getContent()); - - $data = $response->toArray(); - $this->assertArrayHasKey('hydra:member', $data); - $this->assertCount(2, $data['hydra:member']); - - $response = static::createAuthenticatedClient() - ->request('GET', '/api/v2/events?'.http_build_query(['publicAccess' => 'true'])); - - $this->assertResponseStatusCodeSame(Response::HTTP_OK); - $this->assertResponseHeaderSame('content-type', 'application/ld+json; charset=utf-8'); - $this->assertJson($response->getContent()); - - $data = $response->toArray(); - $this->assertArrayHasKey('hydra:member', $data); - $this->assertCount(1, $data['hydra:member']); - - $response = static::createAuthenticatedClient() - ->request('GET', '/api/v2/events?'.http_build_query(['publicAccess' => 'false'])); - - $this->assertResponseStatusCodeSame(Response::HTTP_OK); - $this->assertResponseHeaderSame('content-type', 'application/ld+json; charset=utf-8'); - $this->assertJson($response->getContent()); - - $data = $response->toArray(); - $this->assertArrayHasKey('hydra:member', $data); - $this->assertCount(1, $data['hydra:member']); - } + protected static string $requestPath = '/api/v2/events'; } diff --git a/tests/ApiPlatform/TagsTest.php b/tests/ApiPlatform/TagsTest.php new file mode 100644 index 0000000..7307969 --- /dev/null +++ b/tests/ApiPlatform/TagsTest.php @@ -0,0 +1,15 @@ +get([], authenticated: false); + + $this->assertResponseStatusCodeSame(Response::HTTP_UNAUTHORIZED); + + $response = $this->get([]); + + $this->assertResponseStatusCodeSame(Response::HTTP_OK); + $this->assertResponseHeaderSame('content-type', 'application/ld+json; charset=utf-8'); + $this->assertJson($response->getContent()); + } +} diff --git a/tests/ApiPlatform/VocabulariesTest.php b/tests/ApiPlatform/VocabulariesTest.php new file mode 100644 index 0000000..99b145f --- /dev/null +++ b/tests/ApiPlatform/VocabulariesTest.php @@ -0,0 +1,15 @@ +. + +## Local changes + +* A tag requires a `slug`: + + ``` diff + { + "name": "aros", + + "slug": "aros", + "vocabulary": [ + "aarhusguiden" + ] + ``` + +* A vocabulary requires a `slug`: + + ``` diff + { + "name": "aarhusguiden", + + "slug": "aarhusguiden", + "tags": [ + "aros", + "theoceanraceaarhus", + ``` diff --git a/tests/resources/events.json b/tests/resources/events.json index 6a5669d..185c698 100644 --- a/tests/resources/events.json +++ b/tests/resources/events.json @@ -166,4 +166,89 @@ 10.2112699 ] } +},{ + "entityId": 9, + "title": "ITKDev test event 2", + "excerpt": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", + "description": "

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis blandit turpis cursus in. Nisl suscipit adipiscing bibendum est ultricies integer quis auctor. Diam donec adipiscing tristique risus nec feugiat. Tincidunt eget nullam non nisi est. Consectetur a erat nam at lectus urna. Vulputate sapien nec sagittis aliquam. Luctus venenatis lectus magna fringilla. Sit amet consectetur adipiscing elit duis tristique. Bibendum enim facilisis gravida neque convallis a.<\/p>

Cursus eget nunc scelerisque viverra mauris in aliquam sem. Euismod elementum nisi quis eleifend quam adipiscing vitae proin sagittis.
Sodales ut eu sem integer vitae justo eget. Lacus sed viverra tellus in.<\/p>", + "url": "https:\/\/itk.aarhus.dk\/nyheder\/projektnyheder\/robotternes-bidrag-til-den-groenne-omstilling\/", + "ticketUrl": "https:\/\/www.aakb.dk\/arrangementer\/boern\/skak-nu-eller-aldrig-18", + "publicAccess": true, + "organizer": { + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00", + "entityId": 9, + "name": "ITKDev", + "email": "info@itkdev.dk", + "url": "https:\/\/github.com\/itk-dev" + }, + "partners": [ + { + "entityId": 10, + "name": "Aakb", + "email": "info@aakb.dk", + "url": "https:\/\/aakb.dk\/", + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00" + }, + { + "entityId": 11, + "name": "Dokk1", + "email": "info@dokk1.dk", + "url": "https:\/\/dokk1.dk\/", + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00" + } + ], + "occurrences": [ + { + "entityId": 12, + "start": "2024-12-08T12:30:00+01:00", + "end": "2024-12-08T14:30:00+01:00", + "ticketPriceRange": "Free in December", + "room": "M2-5", + "status": null + } + ], + "dailyOccurrences": [ + { + "entityId": 12, + "start": "2024-12-08T12:30:00+01:00", + "end": "2024-12-08T14:30:00+01:00", + "ticketPriceRange": "Free in December", + "room": "M2-5", + "status": null + } + ], + "tags": [ + "aros", + "theoceanraceaarhus", + "ITKDev" + ], + "imageUrls": { + "small": "media\/cache\/resolve\/small\/438d0b1f\/00bae8ff00e64832de73422f17a605ba391edc05b2458a786d4e8a11243e2162.png", + "medium": "media\/cache\/resolve\/medium\/438d0b1f\/00bae8ff00e64832de73422f17a605ba391edc05b2458a786d4e8a11243e2162.png", + "large": "media\/cache\/resolve\/large\/438d0b1f\/00bae8ff00e64832de73422f17a605ba391edc05b2458a786d4e8a11243e2162.png" + }, + "created": "2024-03-07T00:31:22+01:00", + "updated": "2024-03-07T00:31:22+01:00", + "location": { + "entityId": 4, + "name": "ITK Development", + "image": null, + "url": "https:\/\/itk.aarhus.dk\/om-itk\/afdelinger\/development\/", + "telephone": null, + "disabilityAccess": true, + "mail": "itkdev@mkb.aarhus.dk", + "street": "Hack Kampmanns Plads 2", + "suite": "2.2", + "region": "Jylland", + "city": "Aarhus", + "country": "Danmark", + "postalCode": "8000", + "coordinates": [ + 56.1507645, + 10.2112699 + ] + } }] diff --git a/tests/resources/tags.json b/tests/resources/tags.json index 43ea312..81deb49 100644 --- a/tests/resources/tags.json +++ b/tests/resources/tags.json @@ -1,26 +1,31 @@ [{ "name": "aros", + "slug": "aros", "vocabulary": [ "aarhusguiden" ] },{ "name": "theoceanraceaarhus", + "slug": "theoceanraceaarhus", "vocabulary": [ "aarhusguiden" ] },{ "name": "Koncert", + "slug": "koncert", "vocabulary": [ "aarhusguiden" ] },{ "name": "For b\u00f8rn", + "slug": "for-boern", "vocabulary": [ "aarhusguiden" ] },{ "name": "ITKDev", + "slug": "itkdev", "vocabulary": [ "aarhusguiden" ] -}] \ No newline at end of file +}] diff --git a/tests/resources/vocabularies.json b/tests/resources/vocabularies.json index ea4de07..3b697d6 100644 --- a/tests/resources/vocabularies.json +++ b/tests/resources/vocabularies.json @@ -1,5 +1,6 @@ [{ "name": "aarhusguiden", + "slug": "aarhusguiden", "tags": [ "aros", "theoceanraceaarhus", @@ -10,6 +11,7 @@ "description": "Managed tags vocabulary for aarhusguiden.dk" },{ "name": "feeds", + "slug": "feeds", "tags": [], "description": "Free tags from feeds" -}] \ No newline at end of file +}] From 3e5f758e241cdcdfa125a3862d1e53ee863c97f4 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Wed, 4 Jun 2025 14:20:21 +0200 Subject: [PATCH 08/35] 4268: Cleaned up --- Taskfile.yml | 8 ++++++++ src/Fixtures/FixtureLoader.php | 10 ++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index 237760c..3b6e6b7 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -167,6 +167,14 @@ tasks: COMPOSE_ARGS: run --rm prettier {{.YAML_FILES_GLOB}} --check silent: true + code-analysis: + desc: "Run code analysis" + cmds: + - task: compose + vars: + COMPOSE_ARGS: exec phpfpm vendor/bin/psalm --no-cache + silent: true + default: cmds: - task --list diff --git a/src/Fixtures/FixtureLoader.php b/src/Fixtures/FixtureLoader.php index 9633a42..e079b29 100644 --- a/src/Fixtures/FixtureLoader.php +++ b/src/Fixtures/FixtureLoader.php @@ -8,8 +8,6 @@ use Elastic\Elasticsearch\Exception\MissingParameterException; use Elastic\Elasticsearch\Exception\ServerResponseException; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface; use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface; use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface; @@ -60,7 +58,7 @@ public function process(string $indexName, string $url): void * @throws RedirectionExceptionInterface * @throws ServerExceptionInterface * @throws TransportExceptionInterface - * @throws HttpException + * @throws \HttpException */ private function download(string $url): array { @@ -68,11 +66,11 @@ private function download(string $url): array if (preg_match('~^file://(?/.+)$~', $url, $matches)) { $path = $matches['path']; if (!is_readable($path)) { - throw new NotFoundHttpException('Unable to download fixture data'); + throw new \HttpException('Unable to load fixture data'); } $data = json_decode(file_get_contents($path), true); if (empty($data)) { - throw new NotFoundHttpException('Unable to download fixture data'); + throw new \HttpException('Unable to load fixture data'); } return $data; @@ -81,7 +79,7 @@ private function download(string $url): array $response = $this->httpClient->request('GET', $url); if (Response::HTTP_OK !== $response->getStatusCode()) { - throw new NotFoundHttpException('Unable to download fixture data'); + throw new \HttpException('Unable to download fixture data'); } return $response->toArray(); From f1675a7e556e779ad17b4948fcac6d4d81af3406 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Wed, 4 Jun 2025 15:34:54 +0200 Subject: [PATCH 09/35] 4268: Used tasks (and docker compose) in actions (and fixed some typos) --- .github/workflows/pr.yaml | 73 ++++++++++----------------------------- Taskfile.yml | 20 +++++++++-- 2 files changed, 37 insertions(+), 56 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 601ef5c..3c48e79 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -41,7 +41,7 @@ jobs: - run: | docker network create frontend - - name: Load fixtures + - name: Check YAML coding standards run: | task --yes coding-standards:yaml:check @@ -50,75 +50,40 @@ jobs: psalm: runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php: ["8.3"] - name: Psalm static analysis (${{ matrix.php}}) + name: Psalm static analysis steps: - uses: actions/checkout@v4 - - name: Setup PHP, with composer and extensions - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php}} - extensions: http, ctype, iconv - coverage: none - - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + # https://taskfile.dev/installation/#github-actions + - uses: arduino/setup-task@v2 - - name: Cache dependencies - uses: actions/cache@v4 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.dependency-version }}- - restore-keys: ${{ runner.os }}-composer-${{ matrix.dependency-version }}- + - run: | + docker network create frontend + task --yes site:update - - name: Install Dependencies + - name: Run code analysis run: | - composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist - bin/console cache:clear - - name: Psalm - run: ./vendor/bin/psalm --no-cache + task --yes code-analysis:psalm apispec: runs-on: ubuntu-latest - name: API Specification validation - strategy: - fail-fast: false - matrix: - php: ["8.3"] + name: API specification validation steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 2 - - name: Setup PHP, with composer and extensions - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php}} - extensions: http, ctype, iconv - coverage: none - - - name: Get composer cache directory - id: composer-cache - run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - - name: Cache dependencies - uses: actions/cache@v4 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- + # https://taskfile.dev/installation/#github-actions + - uses: arduino/setup-task@v2 - - name: Install Dependencies - run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist + - run: | + docker network create frontend + task --yes site:update - - name: Export specifications - run: bin/console api:openapi:export --yaml --output=public/spec.yaml --no-interaction + - name: Export API specification + run: | + task --yes apispec:export - - name: Check for changes in specifications + - name: Check for changes in specification run: git diff --diff-filter=ACMRT --exit-code public/spec.yaml diff --git a/Taskfile.yml b/Taskfile.yml index 3b6e6b7..815d089 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -83,6 +83,14 @@ tasks: # Run docker compose with both arguments passed via var plus any cli args. - "{{.DOCKER_COMPOSE}} {{.COMPOSE_ARGS}} {{.CLI_ARGS}}" + console: + desc: "Run Symfony console command. Example: task console -- cache:clear" + cmds: + # Run docker compose with both arguments passed via var plus any cli args. + - task: compose + vars: + COMPOSE_ARGS: exec phpfpm bin/console {{.CONSOLE_ARGS}} + coding-standards:apply: desc: "Apply coding standards" cmds: @@ -167,14 +175,22 @@ tasks: COMPOSE_ARGS: run --rm prettier {{.YAML_FILES_GLOB}} --check silent: true - code-analysis: - desc: "Run code analysis" + code-analysis:psalm: + desc: "Run PSalm" cmds: - task: compose vars: COMPOSE_ARGS: exec phpfpm vendor/bin/psalm --no-cache silent: true + apispec:export: + desc: Export API spec + cmds: + - task: console + vars: + CONSOLE_ARGS: api:openapi:export --yaml --output=public/spec.yaml --no-interaction + silent: true + default: cmds: - task --list From 56c129ff2701189eba89f8d42b7b530569ee9d6f Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Wed, 4 Jun 2025 16:01:09 +0200 Subject: [PATCH 10/35] 4268: Upgraded to API Platform 3.4 (for real) --- composer.json | 2 +- composer.lock | 26 +++++++++++++------------- config/packages/api_platform.yaml | 6 ++++++ symfony.lock | 6 +++--- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/composer.json b/composer.json index ee2d5c5..1d470b9 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "php": ">=8.3", "ext-ctype": "*", "ext-iconv": "*", - "api-platform/core": "^3.2", + "api-platform/core": "^3.4", "elasticsearch/elasticsearch": "^8.13", "nelmio/cors-bundle": "^2.4", "phpdocumentor/reflection-docblock": "^5.3", diff --git a/composer.lock b/composer.lock index c87a925..85bd198 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "25af8701eebf448a4e169485fe79ddc0", + "content-hash": "4684012d091a95e9a8857f59a323a2a4", "packages": [ { "name": "api-platform/core", - "version": "v3.4.7", + "version": "v3.4.17", "source": { "type": "git", "url": "https://github.com/api-platform/core.git", - "reference": "717c7e5d5410f1d8b26381cd546c70860e454d37" + "reference": "c5fb664d17ed9ae919394514ea69a5039d2ad9ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/api-platform/core/zipball/717c7e5d5410f1d8b26381cd546c70860e454d37", - "reference": "717c7e5d5410f1d8b26381cd546c70860e454d37", + "url": "https://api.github.com/repos/api-platform/core/zipball/c5fb664d17ed9ae919394514ea69a5039d2ad9ab", + "reference": "c5fb664d17ed9ae919394514ea69a5039d2ad9ab", "shasum": "" }, "require": { @@ -223,9 +223,9 @@ ], "support": { "issues": "https://github.com/api-platform/core/issues", - "source": "https://github.com/api-platform/core/tree/v3.4.7" + "source": "https://github.com/api-platform/core/tree/v3.4.17" }, - "time": "2024-11-22T11:02:47+00:00" + "time": "2025-04-07T08:40:57+00:00" }, { "name": "doctrine/deprecations", @@ -5566,16 +5566,16 @@ }, { "name": "symfony/web-link", - "version": "v6.4.13", + "version": "v6.4.22", "source": { "type": "git", "url": "https://github.com/symfony/web-link.git", - "reference": "4d188b64bb9a9c5e2e4d20c8d5fdce6bbbb32c94" + "reference": "8595204221c4307b5fd30644a225b0b952082b18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/web-link/zipball/4d188b64bb9a9c5e2e4d20c8d5fdce6bbbb32c94", - "reference": "4d188b64bb9a9c5e2e4d20c8d5fdce6bbbb32c94", + "url": "https://api.github.com/repos/symfony/web-link/zipball/8595204221c4307b5fd30644a225b0b952082b18", + "reference": "8595204221c4307b5fd30644a225b0b952082b18", "shasum": "" }, "require": { @@ -5629,7 +5629,7 @@ "push" ], "support": { - "source": "https://github.com/symfony/web-link/tree/v6.4.13" + "source": "https://github.com/symfony/web-link/tree/v6.4.22" }, "funding": [ { @@ -5645,7 +5645,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:18:03+00:00" + "time": "2025-05-16T08:23:44+00:00" }, { "name": "symfony/yaml", diff --git a/config/packages/api_platform.yaml b/config/packages/api_platform.yaml index 11940d6..96f54a7 100644 --- a/config/packages/api_platform.yaml +++ b/config/packages/api_platform.yaml @@ -16,6 +16,7 @@ api_platform: docs_formats: jsonld: ['application/ld+json'] + jsonopenapi: ['application/vnd.openapi+json'] html: ['text/html'] mapping: @@ -43,9 +44,14 @@ api_platform: shared_max_age: 3600 vary: ['Content-Type', 'Authorization', 'Origin'] extra_properties: + # Note: The api-platform/core 3.4 recipe sets `standard_put` eventhough + # https://api-platform.com/docs/core/upgrade-guide/#api-platform-34 + # (probably) tells us to remove it + # standard_put: true # https://api-platform.com/docs/core/upgrade-guide/#api-platform-34 rfc_7807_compliant_errors: true keep_legacy_inflector: false + # Note: The api-platform/core 3.4 recipe wants `use_symfony_listeners` to be true use_symfony_listeners: false # https://api-platform.com/docs/core/upgrade-guide/#upgrade-guide diff --git a/symfony.lock b/symfony.lock index d8149ad..c08edb1 100644 --- a/symfony.lock +++ b/symfony.lock @@ -1,11 +1,11 @@ { "api-platform/core": { - "version": "4.1", + "version": "3.4", "recipe": { "repo": "github.com/symfony/recipes", "branch": "main", - "version": "4.0", - "ref": "cb9e6b8ceb9b62f32d41fc8ad72a25d5bd674c6d" + "version": "3.3", + "ref": "74b45ac570c57eb1fbe56c984091a9ff87e18bab" }, "files": [ "config/packages/api_platform.yaml", From 0569611ff7f601d4be20783a3a8f4961364f33d5 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Wed, 4 Jun 2025 16:01:56 +0200 Subject: [PATCH 11/35] 4268: Updated API tests --- README.md | 17 +++++ tests/ApiPlatform/AbstractApiTestCase.php | 5 ++ tests/ApiPlatform/EventsFilterTest.php | 93 ++++++++++++++++++++++- tests/resources/events.json | 37 ++++----- tests/resources/locations.json | 20 ++++- 5 files changed, 150 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index ee6b194..fe09a49 100644 --- a/README.md +++ b/README.md @@ -121,3 +121,20 @@ curl --silent --header "X-Api-Key: api_key_1" "http://$(docker compose port ngin task fixtures:load:test --yes task api:test ``` + +You can pass additional arguments to filter tests, e.g. + +``` shell +task api:test -- --filter Event +``` + +> [!TIP] +> Use Task's [Dry run mode](https://taskfile.dev/usage/#dry-run-mode) (`task --dry`) to see the commands that are +> actually run, e.g. +> +> ``` shell +> $ task --dry api:test -- --filter Event +> task: [compose] docker compose exec phpfpm bin/phpunit --filter Event +> ``` +> +> This is useful to tweak a (test) command without changing `Taskfile.yml`. diff --git a/tests/ApiPlatform/AbstractApiTestCase.php b/tests/ApiPlatform/AbstractApiTestCase.php index bde19e6..2c6b031 100644 --- a/tests/ApiPlatform/AbstractApiTestCase.php +++ b/tests/ApiPlatform/AbstractApiTestCase.php @@ -28,4 +28,9 @@ protected function get(array $query, ?string $path = null, bool $authenticated = return $client->request('GET', $path.(str_contains($path, '?') ? '&' : '?').http_build_query($query)); } + + protected static function formatDateTime(string $datetime): string + { + return (new \DateTimeImmutable($datetime))->format(\DateTimeImmutable::ATOM); + } } diff --git a/tests/ApiPlatform/EventsFilterTest.php b/tests/ApiPlatform/EventsFilterTest.php index dd912b8..2cdff85 100644 --- a/tests/ApiPlatform/EventsFilterTest.php +++ b/tests/ApiPlatform/EventsFilterTest.php @@ -13,13 +13,15 @@ class EventsFilterTest extends AbstractApiTestCase protected static string $requestPath = '/api/v2/events'; #[DataProvider('getEventsProvider')] - public function testGetEvents(array $query, int $expectedCount): void + public function testGetEvents(array $query, int $expectedCount, ?string $message = null): void { + $message ??= ''; + $response = $this->get($query); $data = $response->toArray(); - $this->assertArrayHasKey('hydra:member', $data); - $this->assertCount($expectedCount, $data['hydra:member']); + $this->assertArrayHasKey('hydra:member', $data, $message); + $this->assertCount($expectedCount, $data['hydra:member'], $message); } public static function getEventsProvider(): iterable @@ -29,6 +31,7 @@ public static function getEventsProvider(): iterable 3, ]; + // Test BooleanFilter. yield [ ['publicAccess' => 'true'], 2, @@ -38,5 +41,89 @@ public static function getEventsProvider(): iterable ['publicAccess' => 'false'], 1, ]; + + // Test DateRangeFilter. + yield [ + ['occurrences.start[between]' => implode('..', [ + (new \DateTimeImmutable('2001-01-01'))->format(\DateTimeImmutable::ATOM), + (new \DateTimeImmutable('2100-01-01'))->format(\DateTimeImmutable::ATOM), + ])], + 3, + 'Events in 21st century', + ]; + + yield [ + ['occurrences.start[between]' => implode('..', [ + (new \DateTimeImmutable('2001-01-01'))->format(\DateTimeImmutable::ATOM), + (new \DateTimeImmutable('2100-01-01'))->format(\DateTimeImmutable::ATOM), + ])], + 3, + 'Events in 21st century', + ]; + + yield [ + ['occurrences.start[between]' => static::formatDateTime('2026-01-01').'..'.static::formatDateTime('2026-12-31')], + 1, + 'Events in 2026', + ]; + + // Test IdFilter. + yield [ + ['organizer.entityId' => 9], + 2, + ]; + + yield [ + ['organizer.entityId' => 11], + 1, + ]; + + // Test MatchFilter. + yield [ + ['location.name' => 'somewhere'], + 1, + 'An event somewhere', + ]; + + yield [ + ['location.name' => 'Another place'], + 0, + ]; + + // Test TagFilter. + yield [ + ['tags' => 'itkdev'], + 2, + 'Events tagged with "itkdev"', + ]; + + yield [ + ['tags' => 'itkdevelopment'], + 0, + 'Events tagged with "itkdevelopment"', + ]; + + // @todo Does tags filtering use the tag slug or name? + // yield [ + // ['tags' => 'for børn'], + // 0, + // 'Events tagged with "for børn"', + // ]; + // + // yield [ + // ['tags' => 'for-boern'], + // 1, + // 'Events tagged with "for-boern"', + // ]; + + // Combined filters. + yield [ + [ + 'occurrences.start[between]' => static::formatDateTime('2026-01-01').'..'.static::formatDateTime('2026-12-31'), + 'tags' => 'itkdev', + ], + 1, + 'Events in 2026 tagged with "itkdev"', + ]; } } diff --git a/tests/resources/events.json b/tests/resources/events.json index 185c698..11d4cc0 100644 --- a/tests/resources/events.json +++ b/tests/resources/events.json @@ -177,7 +177,7 @@ "organizer": { "created": "2024-03-07T00:31:22+01:00", "updated": "2024-03-07T00:31:22+01:00", - "entityId": 9, + "entityId": 11, "name": "ITKDev", "email": "info@itkdev.dk", "url": "https:\/\/github.com\/itk-dev" @@ -203,8 +203,8 @@ "occurrences": [ { "entityId": 12, - "start": "2024-12-08T12:30:00+01:00", - "end": "2024-12-08T14:30:00+01:00", + "start": "2026-12-08T12:30:00+01:00", + "end": "2026-12-08T14:30:00+01:00", "ticketPriceRange": "Free in December", "room": "M2-5", "status": null @@ -213,8 +213,8 @@ "dailyOccurrences": [ { "entityId": 12, - "start": "2024-12-08T12:30:00+01:00", - "end": "2024-12-08T14:30:00+01:00", + "start": "2026-12-08T12:30:00+01:00", + "end": "2026-12-08T14:30:00+01:00", "ticketPriceRange": "Free in December", "room": "M2-5", "status": null @@ -223,7 +223,8 @@ "tags": [ "aros", "theoceanraceaarhus", - "ITKDev" + "ITKDev", + "For b\u00f8rn" ], "imageUrls": { "small": "media\/cache\/resolve\/small\/438d0b1f\/00bae8ff00e64832de73422f17a605ba391edc05b2458a786d4e8a11243e2162.png", @@ -233,22 +234,22 @@ "created": "2024-03-07T00:31:22+01:00", "updated": "2024-03-07T00:31:22+01:00", "location": { - "entityId": 4, - "name": "ITK Development", + "entityId": 5, + "name": "Somewhere", "image": null, - "url": "https:\/\/itk.aarhus.dk\/om-itk\/afdelinger\/development\/", + "url": "https:\/\/example.com/somewhere", "telephone": null, "disabilityAccess": true, - "mail": "itkdev@mkb.aarhus.dk", - "street": "Hack Kampmanns Plads 2", - "suite": "2.2", - "region": "Jylland", - "city": "Aarhus", - "country": "Danmark", - "postalCode": "8000", + "mail": "somewhere#example.com", + "street": "", + "suite": "", + "region": "", + "city": "", + "country": "", + "postalCode": "", "coordinates": [ - 56.1507645, - 10.2112699 + 0.0000000, + 0.0000000 ] } }] diff --git a/tests/resources/locations.json b/tests/resources/locations.json index 981e1f4..bbfd06e 100644 --- a/tests/resources/locations.json +++ b/tests/resources/locations.json @@ -16,4 +16,22 @@ 56.1507645, 10.2112699 ] -}] \ No newline at end of file +},{ + "entityId": 5, + "name": "Somewhere", + "image": null, + "url": "https:\/\/example.com/somewhere", + "telephone": null, + "disabilityAccess": true, + "mail": "somewhere#example.com", + "street": "", + "suite": "", + "region": "", + "city": "", + "country": "", + "postalCode": "", + "coordinates": [ + 0.0000000, + 0.0000000 + ] +}] From 19278ebdadd5c74488c3ebb2d9cd4c4c45f42812 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Wed, 4 Jun 2025 16:14:10 +0200 Subject: [PATCH 12/35] 4268: Upgraded to API Platform 4.1 --- CHANGELOG.md | 1 + composer.json | 2 +- composer.lock | 231 ++++++++++++++-------- config/packages/api_platform.yaml | 1 - public/spec.yaml | 199 ++++++++++++++++++- symfony.lock | 6 +- tests/ApiPlatform/AbstractApiTestCase.php | 2 + 7 files changed, 350 insertions(+), 92 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42c7260..a8dc73f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ See [keep a changelog] for information about writing changes to this log. - [PR-18](https://github.com/itk-dev/event-database-api/pull/18) - Updated docker compose setup - Added simple API tests and resolved some deprecations + - Upgraded to API platform v4 ## [1.1.1] - 2025-03-28 diff --git a/composer.json b/composer.json index 1d470b9..57e05e5 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "php": ">=8.3", "ext-ctype": "*", "ext-iconv": "*", - "api-platform/core": "^3.4", + "api-platform/core": "^4.1", "elasticsearch/elasticsearch": "^8.13", "nelmio/cors-bundle": "^2.4", "phpdocumentor/reflection-docblock": "^5.3", diff --git a/composer.lock b/composer.lock index 85bd198..375e360 100644 --- a/composer.lock +++ b/composer.lock @@ -4,36 +4,37 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4684012d091a95e9a8857f59a323a2a4", + "content-hash": "c7e8e3c29ef2214c8ee82213bc3883fe", "packages": [ { "name": "api-platform/core", - "version": "v3.4.17", + "version": "v4.1.12", "source": { "type": "git", "url": "https://github.com/api-platform/core.git", - "reference": "c5fb664d17ed9ae919394514ea69a5039d2ad9ab" + "reference": "abb1fac0c6201764589a8f22cb3e1ffd7e02aa16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/api-platform/core/zipball/c5fb664d17ed9ae919394514ea69a5039d2ad9ab", - "reference": "c5fb664d17ed9ae919394514ea69a5039d2ad9ab", + "url": "https://api.github.com/repos/api-platform/core/zipball/abb1fac0c6201764589a8f22cb3e1ffd7e02aa16", + "reference": "abb1fac0c6201764589a8f22cb3e1ffd7e02aa16", "shasum": "" }, "require": { "doctrine/inflector": "^1.0 || ^2.0", - "php": ">=8.1", + "php": ">=8.2", "psr/cache": "^1.0 || ^2.0 || ^3.0", "psr/container": "^1.0 || ^2.0", "symfony/deprecation-contracts": "^3.1", - "symfony/http-foundation": "^6.4 || ^7.1", - "symfony/http-kernel": "^6.4 || ^7.1", - "symfony/property-access": "^6.4 || ^7.1", + "symfony/http-foundation": "^6.4 || ^7.0", + "symfony/http-kernel": "^6.4 || ^7.0", + "symfony/property-access": "^6.4 || ^7.0", "symfony/property-info": "^6.4 || ^7.1", - "symfony/serializer": "^6.4 || ^7.1", + "symfony/serializer": "^6.4 || ^7.0", "symfony/translation-contracts": "^3.3", + "symfony/type-info": "^7.2", "symfony/web-link": "^6.4 || ^7.1", - "willdurand/negotiation": "^3.0" + "willdurand/negotiation": "^3.1" }, "conflict": { "doctrine/common": "<3.2.2", @@ -41,7 +42,6 @@ "doctrine/mongodb-odm": "<2.4", "doctrine/orm": "<2.14.0", "doctrine/persistence": "<1.3", - "elasticsearch/elasticsearch": ">=8.0,<8.4", "phpspec/prophecy": "<1.15", "phpunit/phpunit": "<9.5", "symfony/framework-bundle": "6.4.6 || 7.0.6", @@ -71,88 +71,77 @@ "api-platform/validator": "self.version" }, "require-dev": { - "api-platform/doctrine-common": "^3.4 || ^4.0", - "api-platform/doctrine-odm": "^3.4 || ^4.0", - "api-platform/doctrine-orm": "^3.4 || ^4.0", - "api-platform/documentation": "^3.4 || ^4.0", - "api-platform/elasticsearch": "^3.4 || ^4.0", - "api-platform/graphql": "^3.4 || ^4.0", - "api-platform/http-cache": "^3.4 || ^4.0", - "api-platform/hydra": "^3.4 || ^4.0", - "api-platform/json-api": "^3.3 || ^4.0", - "api-platform/json-schema": "^3.4 || ^4.0", - "api-platform/jsonld": "^3.4 || ^4.0", - "api-platform/metadata": "^3.4 || ^4.0", - "api-platform/openapi": "^3.4 || ^4.0", - "api-platform/parameter-validator": "^3.4", - "api-platform/ramsey-uuid": "^3.4 || ^4.0", - "api-platform/serializer": "^3.4 || ^4.0", - "api-platform/state": "^3.4 || ^4.0", - "api-platform/validator": "^3.4 || ^4.0", "behat/behat": "^3.11", "behat/mink": "^1.9", "doctrine/cache": "^1.11 || ^2.1", "doctrine/common": "^3.2.2", - "doctrine/dbal": "^3.4.0 || ^4.0", - "doctrine/doctrine-bundle": "^1.12 || ^2.0", - "doctrine/mongodb-odm": "^2.2", - "doctrine/mongodb-odm-bundle": "^4.0 || ^5.0", - "doctrine/orm": "^2.14 || ^3.0", - "elasticsearch/elasticsearch": "^7.11 || ^8.4", + "doctrine/dbal": "^4.0", + "doctrine/doctrine-bundle": "^2.11", + "doctrine/mongodb-odm": "^2.10", + "doctrine/mongodb-odm-bundle": "^5.0", + "doctrine/orm": "^2.17 || ^3.0", + "elasticsearch/elasticsearch": "^7.17 || ^8.4", "friends-of-behat/mink-browserkit-driver": "^1.3.1", "friends-of-behat/mink-extension": "^2.2", "friends-of-behat/symfony-extension": "^2.1", - "guzzlehttp/guzzle": "^6.0 || ^7.1", + "guzzlehttp/guzzle": "^6.0 || ^7.0", + "illuminate/config": "^11.0 || ^12.0", + "illuminate/contracts": "^11.0 || ^12.0", + "illuminate/database": "^11.0 || ^12.0", + "illuminate/http": "^11.0 || ^12.0", + "illuminate/pagination": "^11.0 || ^12.0", + "illuminate/routing": "^11.0 || ^12.0", + "illuminate/support": "^11.0 || ^12.0", "jangregor/phpstan-prophecy": "^1.0", - "justinrainbow/json-schema": "^5.2.1", - "phpspec/prophecy-phpunit": "^2.0", + "justinrainbow/json-schema": "^5.2.11", + "laravel/framework": "^11.0 || ^12.0", + "orchestra/testbench": "^9.1", + "phpspec/prophecy-phpunit": "^2.2", "phpstan/extension-installer": "^1.1", - "phpstan/phpdoc-parser": "^1.13|^2.0", + "phpstan/phpdoc-parser": "^1.29 || ^2.0", "phpstan/phpstan": "^1.10", "phpstan/phpstan-doctrine": "^1.0", "phpstan/phpstan-phpunit": "^1.0", "phpstan/phpstan-symfony": "^1.0", - "phpunit/phpunit": "^9.6", + "phpunit/phpunit": "11.5.x-dev", "psr/log": "^1.0 || ^2.0 || ^3.0", - "ramsey/uuid": "^3.9.7 || ^4.0", - "ramsey/uuid-doctrine": "^1.4 || ^2.0 || ^3.0", - "sebastian/comparator": "<5.0", - "soyuka/contexts": "v3.3.9", - "soyuka/pmu": "^0.0.12", + "ramsey/uuid": "^4.7", + "ramsey/uuid-doctrine": "^2.0", + "soyuka/contexts": "^3.3.10", + "soyuka/pmu": "^0.2.0", "soyuka/stubs-mongodb": "^1.0", - "symfony/asset": "^6.4 || ^7.1", - "symfony/browser-kit": "^6.4 || ^7.1", - "symfony/cache": "^6.4 || ^7.1", - "symfony/config": "^6.4 || ^7.1", - "symfony/console": "^6.4 || ^7.1", - "symfony/css-selector": "^6.4 || ^7.1", - "symfony/dependency-injection": "^6.4 || ^7.1", - "symfony/doctrine-bridge": "^6.4 || ^7.1", - "symfony/dom-crawler": "^6.4 || ^7.1", - "symfony/error-handler": "^6.4 || ^7.1", - "symfony/event-dispatcher": "^6.4 || ^7.1", - "symfony/expression-language": "^6.4 || ^7.1", - "symfony/finder": "^6.4 || ^7.1", - "symfony/form": "^6.4 || ^7.1", - "symfony/framework-bundle": "^6.4 || ^7.1", - "symfony/http-client": "^6.4 || ^7.1", - "symfony/intl": "^6.4 || ^7.1", + "symfony/asset": "^6.4 || ^7.0", + "symfony/browser-kit": "^6.4 || ^7.0", + "symfony/cache": "^6.4 || ^7.0", + "symfony/config": "^6.4 || ^7.0", + "symfony/console": "^6.4 || ^7.0", + "symfony/css-selector": "^6.4 || ^7.0", + "symfony/dependency-injection": "^6.4 || ^7.0", + "symfony/doctrine-bridge": "^6.4.2 || ^7.0.2", + "symfony/dom-crawler": "^6.4 || ^7.0", + "symfony/error-handler": "^6.4 || ^7.0", + "symfony/event-dispatcher": "^6.4 || ^7.0", + "symfony/expression-language": "^6.4 || ^7.0", + "symfony/finder": "^6.4 || ^7.0", + "symfony/form": "^6.4 || ^7.0", + "symfony/framework-bundle": "^6.4 || ^7.0", + "symfony/http-client": "^6.4 || ^7.0", + "symfony/intl": "^6.4 || ^7.0", "symfony/maker-bundle": "^1.24", "symfony/mercure-bundle": "*", - "symfony/messenger": "^6.4 || ^7.1", - "symfony/phpunit-bridge": "^6.4.1 || ^7.1", - "symfony/routing": "^6.4 || ^7.1", - "symfony/security-bundle": "^6.4 || ^7.1", - "symfony/security-core": "^6.4 || ^7.1", - "symfony/stopwatch": "^6.4 || ^7.1", - "symfony/string": "^6.4 || ^7.1", - "symfony/twig-bundle": "^6.4 || ^7.1", - "symfony/uid": "^6.4 || ^7.1", - "symfony/validator": "^6.4 || ^7.1", - "symfony/web-profiler-bundle": "^6.4 || ^7.1", - "symfony/yaml": "^6.4 || ^7.1", + "symfony/messenger": "^6.4 || ^7.0", + "symfony/routing": "^6.4 || ^7.0", + "symfony/security-bundle": "^6.4 || ^7.0", + "symfony/security-core": "^6.4 || ^7.0", + "symfony/stopwatch": "^6.4 || ^7.0", + "symfony/string": "^6.4 || ^7.0", + "symfony/twig-bundle": "^6.4 || ^7.0", + "symfony/uid": "^6.4 || ^7.0", + "symfony/validator": "^6.4 || ^7.0", + "symfony/web-profiler-bundle": "^6.4 || ^7.0", + "symfony/yaml": "^6.4 || ^7.0", "twig/twig": "^1.42.3 || ^2.12 || ^3.0", - "webonyx/graphql-php": "^14.0 || ^15.0" + "webonyx/graphql-php": "^15.0" }, "suggest": { "doctrine/mongodb-odm-bundle": "To support MongoDB. Only versions 4.0 and later are supported.", @@ -193,6 +182,9 @@ } }, "autoload": { + "files": [ + "src/JsonLd/HydraContext.php" + ], "psr-4": { "ApiPlatform\\": "src/" } @@ -217,15 +209,17 @@ "graphql", "hal", "jsonapi", + "laravel", "openapi", "rest", - "swagger" + "swagger", + "symfony" ], "support": { "issues": "https://github.com/api-platform/core/issues", - "source": "https://github.com/api-platform/core/tree/v3.4.17" + "source": "https://github.com/api-platform/core/tree/v4.1.12" }, - "time": "2025-04-07T08:40:57+00:00" + "time": "2025-05-22T13:26:31+00:00" }, { "name": "doctrine/deprecations", @@ -5305,6 +5299,85 @@ ], "time": "2024-09-25T14:18:03+00:00" }, + { + "name": "symfony/type-info", + "version": "v7.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/type-info.git", + "reference": "bc9af22e25796d98078f69c0749ab3a9d3454786" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/type-info/zipball/bc9af22e25796d98078f69c0749ab3a9d3454786", + "reference": "bc9af22e25796d98078f69c0749ab3a9d3454786", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "phpstan/phpdoc-parser": "<1.30" + }, + "require-dev": { + "phpstan/phpdoc-parser": "^1.30|^2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\TypeInfo\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mathias Arlaud", + "email": "mathias.arlaud@gmail.com" + }, + { + "name": "Baptiste LEDUC", + "email": "baptiste.leduc@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Extracts PHP types information.", + "homepage": "https://symfony.com", + "keywords": [ + "PHPStan", + "phpdoc", + "symfony", + "type" + ], + "support": { + "source": "https://github.com/symfony/type-info/tree/v7.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-03-30T12:17:06+00:00" + }, { "name": "symfony/validator", "version": "v6.4.16", diff --git a/config/packages/api_platform.yaml b/config/packages/api_platform.yaml index 96f54a7..44441f1 100644 --- a/config/packages/api_platform.yaml +++ b/config/packages/api_platform.yaml @@ -50,7 +50,6 @@ api_platform: # standard_put: true # https://api-platform.com/docs/core/upgrade-guide/#api-platform-34 rfc_7807_compliant_errors: true - keep_legacy_inflector: false # Note: The api-platform/core 3.4 recipe wants `use_symfony_listeners` to be true use_symfony_listeners: false diff --git a/public/spec.yaml b/public/spec.yaml index 1ea1ee9..d6b8090 100644 --- a/public/spec.yaml +++ b/public/spec.yaml @@ -379,7 +379,18 @@ paths: '200': description: 'Single daily occurrence' '404': - description: 'Resource not found' + description: 'Not found' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Error.jsonld' + application/problem+json: + schema: + $ref: '#/components/schemas/Error' + application/json: + schema: + $ref: '#/components/schemas/Error' + links: { } summary: 'Retrieves a DailyOccurrence resource.' description: 'Retrieves a DailyOccurrence resource.' parameters: @@ -762,7 +773,18 @@ paths: '200': description: 'Single event' '404': - description: 'Resource not found' + description: 'Not found' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Error.jsonld' + application/problem+json: + schema: + $ref: '#/components/schemas/Error' + application/json: + schema: + $ref: '#/components/schemas/Error' + links: { } summary: 'Retrieves a Event resource.' description: 'Retrieves a Event resource.' parameters: @@ -935,7 +957,18 @@ paths: '200': description: 'Single location' '404': - description: 'Resource not found' + description: 'Not found' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Error.jsonld' + application/problem+json: + schema: + $ref: '#/components/schemas/Error' + application/json: + schema: + $ref: '#/components/schemas/Error' + links: { } summary: 'Get single location based on identifier' description: 'Retrieves a Location resource.' parameters: @@ -1306,7 +1339,18 @@ paths: '200': description: 'Single occurrence' '404': - description: 'Resource not found' + description: 'Not found' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Error.jsonld' + application/problem+json: + schema: + $ref: '#/components/schemas/Error' + application/json: + schema: + $ref: '#/components/schemas/Error' + links: { } summary: 'Get single occurrence based on identifier' description: 'Retrieves a Occurrence resource.' parameters: @@ -1467,7 +1511,18 @@ paths: '200': description: 'Single organization' '404': - description: 'Resource not found' + description: 'Not found' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Error.jsonld' + application/problem+json: + schema: + $ref: '#/components/schemas/Error' + application/json: + schema: + $ref: '#/components/schemas/Error' + links: { } summary: 'Get single organization based on identifier' description: 'Retrieves a Organization resource.' parameters: @@ -1568,7 +1623,18 @@ paths: '200': description: 'Get single tag' '404': - description: 'Resource not found' + description: 'Not found' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Error.jsonld' + application/problem+json: + schema: + $ref: '#/components/schemas/Error' + application/json: + schema: + $ref: '#/components/schemas/Error' + links: { } summary: 'Get single tag' description: 'Retrieves a Tag resource.' parameters: @@ -1669,7 +1735,18 @@ paths: '200': description: 'Get single vocabulary' '404': - description: 'Resource not found' + description: 'Not found' + content: + application/ld+json: + schema: + $ref: '#/components/schemas/Error.jsonld' + application/problem+json: + schema: + $ref: '#/components/schemas/Error' + application/json: + schema: + $ref: '#/components/schemas/Error' + links: { } summary: 'Get a vocabulary based on slug' description: 'Retrieves a Vocabulary resource.' parameters: @@ -1716,6 +1793,98 @@ components: - '@vocab' - hydra additionalProperties: true + Error: + type: object + description: 'A representation of common errors.' + deprecated: false + properties: + title: + readOnly: true + description: 'A short, human-readable summary of the problem.' + type: + - string + - 'null' + detail: + readOnly: true + description: 'A human-readable explanation specific to this occurrence of the problem.' + type: + - string + - 'null' + status: + type: number + examples: + - 404 + default: 400 + instance: + readOnly: true + description: 'A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.' + type: + - string + - 'null' + type: + readOnly: true + description: 'A URI reference that identifies the problem type' + type: string + Error.jsonld: + type: object + description: 'A representation of common errors.' + deprecated: false + properties: + '@context': + readOnly: true + oneOf: + - + type: string + - + type: object + properties: + '@vocab': + type: string + hydra: + type: string + enum: ['http://www.w3.org/ns/hydra/core#'] + required: + - '@vocab' + - hydra + additionalProperties: true + '@id': + readOnly: true + type: string + '@type': + readOnly: true + type: string + title: + readOnly: true + description: 'A short, human-readable summary of the problem.' + type: + - string + - 'null' + detail: + readOnly: true + description: 'A human-readable explanation specific to this occurrence of the problem.' + type: + - string + - 'null' + status: + type: number + examples: + - 404 + default: 400 + instance: + readOnly: true + description: 'A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.' + type: + - string + - 'null' + type: + readOnly: true + description: 'A URI reference that identifies the problem type' + type: string + description: + readOnly: true + type: + - string + - 'null' Event.EventRepresentationProvider.jsonld: type: object description: '' @@ -1912,5 +2081,19 @@ components: security: - ApiKeyAuth: [] -tags: [] +tags: + - + name: DailyOccurrence + - + name: Event + - + name: Location + - + name: Occurrence + - + name: Organization + - + name: Tag + - + name: Vocabulary webhooks: { } diff --git a/symfony.lock b/symfony.lock index c08edb1..d8149ad 100644 --- a/symfony.lock +++ b/symfony.lock @@ -1,11 +1,11 @@ { "api-platform/core": { - "version": "3.4", + "version": "4.1", "recipe": { "repo": "github.com/symfony/recipes", "branch": "main", - "version": "3.3", - "ref": "74b45ac570c57eb1fbe56c984091a9ff87e18bab" + "version": "4.0", + "ref": "cb9e6b8ceb9b62f32d41fc8ad72a25d5bd674c6d" }, "files": [ "config/packages/api_platform.yaml", diff --git a/tests/ApiPlatform/AbstractApiTestCase.php b/tests/ApiPlatform/AbstractApiTestCase.php index 2c6b031..cf3b9b0 100644 --- a/tests/ApiPlatform/AbstractApiTestCase.php +++ b/tests/ApiPlatform/AbstractApiTestCase.php @@ -8,6 +8,8 @@ abstract class AbstractApiTestCase extends ApiTestCase { + protected static ?bool $alwaysBootKernel = false; + protected static string $requestPath; protected static function createAuthenticatedClient(): Client From 1d42d36623104e46adbb65dd6429dd8ae9874acf Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Wed, 4 Jun 2025 16:25:37 +0200 Subject: [PATCH 13/35] 4268: Updated composer packages --- CHANGELOG.md | 1 + composer.lock | 857 +++++++++++++++++++++++++------------------------- 2 files changed, 433 insertions(+), 425 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8dc73f..6363091 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ See [keep a changelog] for information about writing changes to this log. - Updated docker compose setup - Added simple API tests and resolved some deprecations - Upgraded to API platform v4 + - Updated composer packages (security update) ## [1.1.1] - 2025-03-28 diff --git a/composer.lock b/composer.lock index 375e360..91f5ea2 100644 --- a/composer.lock +++ b/composer.lock @@ -223,29 +223,30 @@ }, { "name": "doctrine/deprecations", - "version": "1.1.3", + "version": "1.1.5", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" + "reference": "459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38", + "reference": "459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, + "conflict": { + "phpunit/phpunit": "<=7.5 || >=13" + }, "require-dev": { - "doctrine/coding-standard": "^9", - "phpstan/phpstan": "1.4.10 || 1.10.15", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "0.18.4", - "psr/log": "^1 || ^2 || ^3", - "vimeo/psalm": "4.30.0 || 5.12.0" + "doctrine/coding-standard": "^9 || ^12 || ^13", + "phpstan/phpstan": "1.4.10 || 2.1.11", + "phpstan/phpstan-phpunit": "^1.0 || ^2", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6 || ^10.5 || ^11.5 || ^12", + "psr/log": "^1 || ^2 || ^3" }, "suggest": { "psr/log": "Allows logging deprecations via PSR-3 logger implementation" @@ -253,7 +254,7 @@ "type": "library", "autoload": { "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + "Doctrine\\Deprecations\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -264,9 +265,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.3" + "source": "https://github.com/doctrine/deprecations/tree/1.1.5" }, - "time": "2024-01-30T19:34:25+00:00" + "time": "2025-04-07T20:06:18+00:00" }, { "name": "doctrine/inflector", @@ -361,16 +362,16 @@ }, { "name": "elastic/transport", - "version": "v8.10.0", + "version": "v8.11.0", "source": { "type": "git", "url": "https://github.com/elastic/elastic-transport-php.git", - "reference": "8be37d679637545e50b1cea9f8ee903888783021" + "reference": "1d476af5dc0b74530d59b67d5dd96ee39768d5a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/elastic/elastic-transport-php/zipball/8be37d679637545e50b1cea9f8ee903888783021", - "reference": "8be37d679637545e50b1cea9f8ee903888783021", + "url": "https://api.github.com/repos/elastic/elastic-transport-php/zipball/1d476af5dc0b74530d59b67d5dd96ee39768d5a4", + "reference": "1d476af5dc0b74530d59b67d5dd96ee39768d5a4", "shasum": "" }, "require": { @@ -388,7 +389,7 @@ "nyholm/psr7": "^1.5", "open-telemetry/sdk": "^1.0", "php-http/mock-client": "^1.5", - "phpstan/phpstan": "^1.4", + "phpstan/phpstan": "^2.1", "phpunit/phpunit": "^9.5", "symfony/http-client": "^5.4" }, @@ -413,22 +414,22 @@ ], "support": { "issues": "https://github.com/elastic/elastic-transport-php/issues", - "source": "https://github.com/elastic/elastic-transport-php/tree/v8.10.0" + "source": "https://github.com/elastic/elastic-transport-php/tree/v8.11.0" }, - "time": "2024-08-14T08:55:07+00:00" + "time": "2025-04-02T08:20:33+00:00" }, { "name": "elasticsearch/elasticsearch", - "version": "v8.16.0", + "version": "v8.18.0", "source": { "type": "git", "url": "https://github.com/elastic/elasticsearch-php.git", - "reference": "ab0fdb43f9e69f0d0539028d8b0b56cdf3328d85" + "reference": "df8ee73046c688ee9ce2d69cb5c54a03ca38cc5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/ab0fdb43f9e69f0d0539028d8b0b56cdf3328d85", - "reference": "ab0fdb43f9e69f0d0539028d8b0b56cdf3328d85", + "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/df8ee73046c688ee9ce2d69cb5c54a03ca38cc5c", + "reference": "df8ee73046c688ee9ce2d69cb5c54a03ca38cc5c", "shasum": "" }, "require": { @@ -444,9 +445,8 @@ "ext-zip": "*", "mockery/mockery": "^1.5", "nyholm/psr7": "^1.5", - "php-http/message-factory": "^1.0", "php-http/mock-client": "^1.5", - "phpstan/phpstan": "^1.4", + "phpstan/phpstan": "^2.1", "phpunit/phpunit": "^9.5", "psr/http-factory": "^1.0", "symfony/finder": "~4.0", @@ -471,22 +471,22 @@ ], "support": { "issues": "https://github.com/elastic/elasticsearch-php/issues", - "source": "https://github.com/elastic/elasticsearch-php/tree/v8.16.0" + "source": "https://github.com/elastic/elasticsearch-php/tree/v8.18.0" }, - "time": "2024-11-14T22:23:33+00:00" + "time": "2025-05-02T10:38:56+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.9.2", + "version": "7.9.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b" + "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7b2f29fe81dc4da0ca0ea7d42107a0845946ea77", + "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77", "shasum": "" }, "require": { @@ -583,7 +583,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.9.2" + "source": "https://github.com/guzzle/guzzle/tree/7.9.3" }, "funding": [ { @@ -599,20 +599,20 @@ "type": "tidelift" } ], - "time": "2024-07-24T11:22:20+00:00" + "time": "2025-03-27T13:37:11+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.4", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455" + "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455", - "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "url": "https://api.github.com/repos/guzzle/promises/zipball/7c69f28996b0a6920945dd20b3857e499d9ca96c", + "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c", "shasum": "" }, "require": { @@ -666,7 +666,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.4" + "source": "https://github.com/guzzle/promises/tree/2.2.0" }, "funding": [ { @@ -682,20 +682,20 @@ "type": "tidelift" } ], - "time": "2024-10-17T10:06:22+00:00" + "time": "2025-03-27T13:27:01+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.7.0", + "version": "2.7.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" + "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/c2270caaabe631b3b44c85f99e5a04bbb8060d16", + "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16", "shasum": "" }, "require": { @@ -782,7 +782,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.7.0" + "source": "https://github.com/guzzle/psr7/tree/2.7.1" }, "funding": [ { @@ -798,7 +798,7 @@ "type": "tidelift" } ], - "time": "2024-07-18T11:15:46+00:00" + "time": "2025-03-27T12:30:47+00:00" }, { "name": "nelmio/cors-bundle", @@ -864,16 +864,16 @@ }, { "name": "open-telemetry/api", - "version": "1.1.1", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/api.git", - "reference": "542064815d38a6df55af7957cd6f1d7d967c99c6" + "reference": "4e3bb38e069876fb73c2ce85c89583bf2b28cd86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/542064815d38a6df55af7957cd6f1d7d967c99c6", - "reference": "542064815d38a6df55af7957cd6f1d7d967c99c6", + "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/4e3bb38e069876fb73c2ce85c89583bf2b28cd86", + "reference": "4e3bb38e069876fb73c2ce85c89583bf2b28cd86", "shasum": "" }, "require": { @@ -887,13 +887,13 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.1.x-dev" - }, "spi": { "OpenTelemetry\\API\\Instrumentation\\AutoInstrumentation\\HookManagerInterface": [ "OpenTelemetry\\API\\Instrumentation\\AutoInstrumentation\\ExtensionHookManager" ] + }, + "branch-alias": { + "dev-main": "1.1.x-dev" } }, "autoload": { @@ -930,20 +930,20 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2024-10-15T22:42:37+00:00" + "time": "2025-05-07T12:32:21+00:00" }, { "name": "open-telemetry/context", - "version": "1.1.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/context.git", - "reference": "0cba875ea1953435f78aec7f1d75afa87bdbf7f3" + "reference": "1eb2b837ee9362db064a6b65d5ecce15a9f9f020" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/context/zipball/0cba875ea1953435f78aec7f1d75afa87bdbf7f3", - "reference": "0cba875ea1953435f78aec7f1d75afa87bdbf7f3", + "url": "https://api.github.com/repos/opentelemetry-php/context/zipball/1eb2b837ee9362db064a6b65d5ecce15a9f9f020", + "reference": "1eb2b837ee9362db064a6b65d5ecce15a9f9f020", "shasum": "" }, "require": { @@ -989,7 +989,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2024-08-21T00:29:20+00:00" + "time": "2025-05-07T23:36:50+00:00" }, { "name": "php-http/discovery", @@ -1234,16 +1234,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.6.0", + "version": "5.6.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "f3558a4c23426d12bffeaab463f8a8d8b681193c" + "reference": "92dde6a5919e34835c506ac8c523ef095a95ed62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/f3558a4c23426d12bffeaab463f8a8d8b681193c", - "reference": "f3558a4c23426d12bffeaab463f8a8d8b681193c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/92dde6a5919e34835c506ac8c523ef095a95ed62", + "reference": "92dde6a5919e34835c506ac8c523ef095a95ed62", "shasum": "" }, "require": { @@ -1292,9 +1292,9 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.0" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.2" }, - "time": "2024-11-12T11:25:25+00:00" + "time": "2025-04-13T19:20:35+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -1982,16 +1982,16 @@ }, { "name": "symfony/cache", - "version": "v6.4.16", + "version": "v6.4.21", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "70d60e9a3603108563010f8592dff15a6f15dfae" + "reference": "d1abcf763a7414f2e572f676f22da7a06c8cd9ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/70d60e9a3603108563010f8592dff15a6f15dfae", - "reference": "70d60e9a3603108563010f8592dff15a6f15dfae", + "url": "https://api.github.com/repos/symfony/cache/zipball/d1abcf763a7414f2e572f676f22da7a06c8cd9ee", + "reference": "d1abcf763a7414f2e572f676f22da7a06c8cd9ee", "shasum": "" }, "require": { @@ -2058,7 +2058,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v6.4.16" + "source": "https://github.com/symfony/cache/tree/v6.4.21" }, "funding": [ { @@ -2074,20 +2074,20 @@ "type": "tidelift" } ], - "time": "2024-11-20T10:10:54+00:00" + "time": "2025-04-08T08:21:20+00:00" }, { "name": "symfony/cache-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/cache-contracts.git", - "reference": "15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b" + "reference": "5d68a57d66910405e5c0b63d6f0af941e66fc868" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b", - "reference": "15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b", + "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/5d68a57d66910405e5c0b63d6f0af941e66fc868", + "reference": "5d68a57d66910405e5c0b63d6f0af941e66fc868", "shasum": "" }, "require": { @@ -2096,12 +2096,12 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "3.5-dev" - }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" } }, "autoload": { @@ -2134,7 +2134,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/cache-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/cache-contracts/tree/v3.6.0" }, "funding": [ { @@ -2150,7 +2150,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2025-03-13T15:25:07+00:00" }, { "name": "symfony/clock", @@ -2228,16 +2228,16 @@ }, { "name": "symfony/config", - "version": "v6.4.14", + "version": "v6.4.22", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "4e55e7e4ffddd343671ea972216d4509f46c22ef" + "reference": "af5917a3b1571f54689e56677a3f06440d2fe4c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/4e55e7e4ffddd343671ea972216d4509f46c22ef", - "reference": "4e55e7e4ffddd343671ea972216d4509f46c22ef", + "url": "https://api.github.com/repos/symfony/config/zipball/af5917a3b1571f54689e56677a3f06440d2fe4c7", + "reference": "af5917a3b1571f54689e56677a3f06440d2fe4c7", "shasum": "" }, "require": { @@ -2283,7 +2283,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v6.4.14" + "source": "https://github.com/symfony/config/tree/v6.4.22" }, "funding": [ { @@ -2299,20 +2299,20 @@ "type": "tidelift" } ], - "time": "2024-11-04T11:33:53+00:00" + "time": "2025-05-14T06:00:01+00:00" }, { "name": "symfony/console", - "version": "v6.4.15", + "version": "v6.4.22", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "f1fc6f47283e27336e7cebb9e8946c8de7bff9bd" + "reference": "7d29659bc3c9d8e9a34e2c3414ef9e9e003e6cf3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/f1fc6f47283e27336e7cebb9e8946c8de7bff9bd", - "reference": "f1fc6f47283e27336e7cebb9e8946c8de7bff9bd", + "url": "https://api.github.com/repos/symfony/console/zipball/7d29659bc3c9d8e9a34e2c3414ef9e9e003e6cf3", + "reference": "7d29659bc3c9d8e9a34e2c3414ef9e9e003e6cf3", "shasum": "" }, "require": { @@ -2377,7 +2377,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.15" + "source": "https://github.com/symfony/console/tree/v6.4.22" }, "funding": [ { @@ -2393,20 +2393,20 @@ "type": "tidelift" } ], - "time": "2024-11-06T14:19:14+00:00" + "time": "2025-05-07T07:05:04+00:00" }, { "name": "symfony/dependency-injection", - "version": "v6.4.16", + "version": "v6.4.22", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "7a379d8871f6a36f01559c14e11141cc02eb8dc8" + "reference": "8cb11f833d1f5bfbb2df97dfc23c92b4d42c18d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/7a379d8871f6a36f01559c14e11141cc02eb8dc8", - "reference": "7a379d8871f6a36f01559c14e11141cc02eb8dc8", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/8cb11f833d1f5bfbb2df97dfc23c92b4d42c18d9", + "reference": "8cb11f833d1f5bfbb2df97dfc23c92b4d42c18d9", "shasum": "" }, "require": { @@ -2414,7 +2414,7 @@ "psr/container": "^1.1|^2.0", "symfony/deprecation-contracts": "^2.5|^3", "symfony/service-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^6.2.10|^7.0" + "symfony/var-exporter": "^6.4.20|^7.2.5" }, "conflict": { "ext-psr": "<1.1|>=2", @@ -2458,7 +2458,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v6.4.16" + "source": "https://github.com/symfony/dependency-injection/tree/v6.4.22" }, "funding": [ { @@ -2474,20 +2474,20 @@ "type": "tidelift" } ], - "time": "2024-11-25T14:52:46+00:00" + "time": "2025-05-17T07:35:26+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", "shasum": "" }, "require": { @@ -2495,12 +2495,12 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "3.5-dev" - }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" } }, "autoload": { @@ -2525,7 +2525,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" }, "funding": [ { @@ -2541,7 +2541,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/dotenv", @@ -2619,16 +2619,16 @@ }, { "name": "symfony/error-handler", - "version": "v6.4.14", + "version": "v6.4.22", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "9e024324511eeb00983ee76b9aedc3e6ecd993d9" + "reference": "ce765a2d28b3cce61de1fb916e207767a73171d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/9e024324511eeb00983ee76b9aedc3e6ecd993d9", - "reference": "9e024324511eeb00983ee76b9aedc3e6ecd993d9", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/ce765a2d28b3cce61de1fb916e207767a73171d1", + "reference": "ce765a2d28b3cce61de1fb916e207767a73171d1", "shasum": "" }, "require": { @@ -2674,7 +2674,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.4.14" + "source": "https://github.com/symfony/error-handler/tree/v6.4.22" }, "funding": [ { @@ -2690,7 +2690,7 @@ "type": "tidelift" } ], - "time": "2024-11-05T15:34:40+00:00" + "time": "2025-05-28T12:00:15+00:00" }, { "name": "symfony/event-dispatcher", @@ -2774,16 +2774,16 @@ }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f" + "reference": "59eb412e93815df44f05f342958efa9f46b1e586" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7642f5e970b672283b7823222ae8ef8bbc160b9f", - "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/59eb412e93815df44f05f342958efa9f46b1e586", + "reference": "59eb412e93815df44f05f342958efa9f46b1e586", "shasum": "" }, "require": { @@ -2792,12 +2792,12 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "3.5-dev" - }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" } }, "autoload": { @@ -2830,7 +2830,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.6.0" }, "funding": [ { @@ -2846,7 +2846,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/expression-language", @@ -2980,16 +2980,16 @@ }, { "name": "symfony/finder", - "version": "v6.4.13", + "version": "v6.4.17", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "daea9eca0b08d0ed1dc9ab702a46128fd1be4958" + "reference": "1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/daea9eca0b08d0ed1dc9ab702a46128fd1be4958", - "reference": "daea9eca0b08d0ed1dc9ab702a46128fd1be4958", + "url": "https://api.github.com/repos/symfony/finder/zipball/1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7", + "reference": "1d0e8266248c5d9ab6a87e3789e6dc482af3c9c7", "shasum": "" }, "require": { @@ -3024,7 +3024,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.4.13" + "source": "https://github.com/symfony/finder/tree/v6.4.17" }, "funding": [ { @@ -3040,20 +3040,20 @@ "type": "tidelift" } ], - "time": "2024-10-01T08:30:56+00:00" + "time": "2024-12-29T13:51:37+00:00" }, { "name": "symfony/flex", - "version": "v2.4.7", + "version": "v2.7.1", "source": { "type": "git", "url": "https://github.com/symfony/flex.git", - "reference": "92f4fba342161ff36072bd3b8e0b3c6c23160402" + "reference": "4ae50d368415a06820739e54d38a4a29d6df9155" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/flex/zipball/92f4fba342161ff36072bd3b8e0b3c6c23160402", - "reference": "92f4fba342161ff36072bd3b8e0b3c6c23160402", + "url": "https://api.github.com/repos/symfony/flex/zipball/4ae50d368415a06820739e54d38a4a29d6df9155", + "reference": "4ae50d368415a06820739e54d38a4a29d6df9155", "shasum": "" }, "require": { @@ -3092,7 +3092,7 @@ "description": "Composer plugin for Symfony", "support": { "issues": "https://github.com/symfony/flex/issues", - "source": "https://github.com/symfony/flex/tree/v2.4.7" + "source": "https://github.com/symfony/flex/tree/v2.7.1" }, "funding": [ { @@ -3108,20 +3108,20 @@ "type": "tidelift" } ], - "time": "2024-10-07T08:51:54+00:00" + "time": "2025-05-28T14:22:54+00:00" }, { "name": "symfony/framework-bundle", - "version": "v6.4.13", + "version": "v6.4.22", "source": { "type": "git", "url": "https://github.com/symfony/framework-bundle.git", - "reference": "e8b0bd921f9bd35ea4d1508067c3f3f6e2036418" + "reference": "b1de19b2083484d0ce945977f6c6484e9e493a2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/e8b0bd921f9bd35ea4d1508067c3f3f6e2036418", - "reference": "e8b0bd921f9bd35ea4d1508067c3f3f6e2036418", + "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/b1de19b2083484d0ce945977f6c6484e9e493a2e", + "reference": "b1de19b2083484d0ce945977f6c6484e9e493a2e", "shasum": "" }, "require": { @@ -3241,7 +3241,7 @@ "description": "Provides a tight integration between Symfony components and the Symfony full-stack framework", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/framework-bundle/tree/v6.4.13" + "source": "https://github.com/symfony/framework-bundle/tree/v6.4.22" }, "funding": [ { @@ -3257,27 +3257,27 @@ "type": "tidelift" } ], - "time": "2024-10-25T15:07:50+00:00" + "time": "2025-05-14T07:14:36+00:00" }, { "name": "symfony/http-client", - "version": "v6.4.16", + "version": "v6.4.19", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "60a113666fa67e598abace38e5f46a0954d8833d" + "reference": "3294a433fc9d12ae58128174896b5b1822c28dad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/60a113666fa67e598abace38e5f46a0954d8833d", - "reference": "60a113666fa67e598abace38e5f46a0954d8833d", + "url": "https://api.github.com/repos/symfony/http-client/zipball/3294a433fc9d12ae58128174896b5b1822c28dad", + "reference": "3294a433fc9d12ae58128174896b5b1822c28dad", "shasum": "" }, "require": { "php": ">=8.1", "psr/log": "^1|^2|^3", "symfony/deprecation-contracts": "^2.5|^3", - "symfony/http-client-contracts": "~3.4.3|^3.5.1", + "symfony/http-client-contracts": "~3.4.4|^3.5.2", "symfony/service-contracts": "^2.5|^3" }, "conflict": { @@ -3334,7 +3334,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v6.4.16" + "source": "https://github.com/symfony/http-client/tree/v6.4.19" }, "funding": [ { @@ -3350,20 +3350,20 @@ "type": "tidelift" } ], - "time": "2024-11-27T11:52:33+00:00" + "time": "2025-02-13T09:55:13+00:00" }, { "name": "symfony/http-client-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/http-client-contracts.git", - "reference": "c2f3ad828596624ca39ea40f83617ef51ca8bbf9" + "reference": "75d7043853a42837e68111812f4d964b01e5101c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/c2f3ad828596624ca39ea40f83617ef51ca8bbf9", - "reference": "c2f3ad828596624ca39ea40f83617ef51ca8bbf9", + "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/75d7043853a42837e68111812f4d964b01e5101c", + "reference": "75d7043853a42837e68111812f4d964b01e5101c", "shasum": "" }, "require": { @@ -3371,12 +3371,12 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "3.5-dev" - }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" } }, "autoload": { @@ -3412,7 +3412,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/http-client-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/http-client-contracts/tree/v3.6.0" }, "funding": [ { @@ -3428,20 +3428,20 @@ "type": "tidelift" } ], - "time": "2024-11-25T12:02:18+00:00" + "time": "2025-04-29T11:18:49+00:00" }, { "name": "symfony/http-foundation", - "version": "v6.4.16", + "version": "v6.4.22", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "431771b7a6f662f1575b3cfc8fd7617aa9864d57" + "reference": "6b7c97fe1ddac8df3cc9ba6410c8abc683e148ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/431771b7a6f662f1575b3cfc8fd7617aa9864d57", - "reference": "431771b7a6f662f1575b3cfc8fd7617aa9864d57", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/6b7c97fe1ddac8df3cc9ba6410c8abc683e148ae", + "reference": "6b7c97fe1ddac8df3cc9ba6410c8abc683e148ae", "shasum": "" }, "require": { @@ -3489,7 +3489,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.4.16" + "source": "https://github.com/symfony/http-foundation/tree/v6.4.22" }, "funding": [ { @@ -3505,20 +3505,20 @@ "type": "tidelift" } ], - "time": "2024-11-13T18:58:10+00:00" + "time": "2025-05-11T15:36:20+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.4.16", + "version": "v6.4.22", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "8838b5b21d807923b893ccbfc2cbeda0f1bc00f0" + "reference": "15c105b839a7cfa1bc0989c091bfb6477f23b673" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/8838b5b21d807923b893ccbfc2cbeda0f1bc00f0", - "reference": "8838b5b21d807923b893ccbfc2cbeda0f1bc00f0", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/15c105b839a7cfa1bc0989c091bfb6477f23b673", + "reference": "15c105b839a7cfa1bc0989c091bfb6477f23b673", "shasum": "" }, "require": { @@ -3603,7 +3603,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.4.16" + "source": "https://github.com/symfony/http-kernel/tree/v6.4.22" }, "funding": [ { @@ -3619,7 +3619,7 @@ "type": "tidelift" } ], - "time": "2024-11-27T12:49:36+00:00" + "time": "2025-05-29T07:23:40+00:00" }, { "name": "symfony/password-hasher", @@ -3695,7 +3695,7 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", @@ -3716,8 +3716,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -3753,7 +3753,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.32.0" }, "funding": [ { @@ -3773,7 +3773,7 @@ }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -3794,8 +3794,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -3834,7 +3834,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.32.0" }, "funding": [ { @@ -3854,19 +3854,20 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", "shasum": "" }, "require": { + "ext-iconv": "*", "php": ">=7.2" }, "provide": { @@ -3878,8 +3879,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -3914,7 +3915,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0" }, "funding": [ { @@ -3930,11 +3931,11 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2024-12-23T08:48:59+00:00" }, { "name": "symfony/polyfill-php82", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php82.git", @@ -3952,8 +3953,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -3990,7 +3991,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php82/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-php82/tree/v1.32.0" }, "funding": [ { @@ -4010,7 +4011,7 @@ }, { "name": "symfony/polyfill-php83", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php83.git", @@ -4028,8 +4029,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -4066,7 +4067,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-php83/tree/v1.32.0" }, "funding": [ { @@ -4086,16 +4087,16 @@ }, { "name": "symfony/property-access", - "version": "v6.4.13", + "version": "v6.4.18", "source": { "type": "git", "url": "https://github.com/symfony/property-access.git", - "reference": "8cc779d88d12e440adaa26387bcfc25744064afe" + "reference": "80e0378f2f058b60d87dedc3c760caec882e992c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-access/zipball/8cc779d88d12e440adaa26387bcfc25744064afe", - "reference": "8cc779d88d12e440adaa26387bcfc25744064afe", + "url": "https://api.github.com/repos/symfony/property-access/zipball/80e0378f2f058b60d87dedc3c760caec882e992c", + "reference": "80e0378f2f058b60d87dedc3c760caec882e992c", "shasum": "" }, "require": { @@ -4143,7 +4144,7 @@ "reflection" ], "support": { - "source": "https://github.com/symfony/property-access/tree/v6.4.13" + "source": "https://github.com/symfony/property-access/tree/v6.4.18" }, "funding": [ { @@ -4159,20 +4160,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:18:03+00:00" + "time": "2024-12-16T14:42:05+00:00" }, { "name": "symfony/property-info", - "version": "v6.4.16", + "version": "v6.4.18", "source": { "type": "git", "url": "https://github.com/symfony/property-info.git", - "reference": "e4782ec1c2b6896e820896357f6a3d02249e63eb" + "reference": "94d18e5cc11a37fd92856d38b61d9cdf72536a1e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-info/zipball/e4782ec1c2b6896e820896357f6a3d02249e63eb", - "reference": "e4782ec1c2b6896e820896357f6a3d02249e63eb", + "url": "https://api.github.com/repos/symfony/property-info/zipball/94d18e5cc11a37fd92856d38b61d9cdf72536a1e", + "reference": "94d18e5cc11a37fd92856d38b61d9cdf72536a1e", "shasum": "" }, "require": { @@ -4183,7 +4184,9 @@ "doctrine/annotations": "<1.12", "phpdocumentor/reflection-docblock": "<5.2", "phpdocumentor/type-resolver": "<1.5.1", - "symfony/dependency-injection": "<5.4|>=6.0,<6.4" + "symfony/cache": "<5.4", + "symfony/dependency-injection": "<5.4|>=6.0,<6.4", + "symfony/serializer": "<5.4" }, "require-dev": { "doctrine/annotations": "^1.12|^2", @@ -4227,7 +4230,7 @@ "validator" ], "support": { - "source": "https://github.com/symfony/property-info/tree/v6.4.16" + "source": "https://github.com/symfony/property-info/tree/v6.4.18" }, "funding": [ { @@ -4243,20 +4246,20 @@ "type": "tidelift" } ], - "time": "2024-11-27T10:18:02+00:00" + "time": "2025-01-21T10:52:27+00:00" }, { "name": "symfony/routing", - "version": "v6.4.16", + "version": "v6.4.22", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "91e02e606b4b705c2f4fb42f7e7708b7923a3220" + "reference": "1f5234e8457164a3a0038a4c0a4ba27876a9c670" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/91e02e606b4b705c2f4fb42f7e7708b7923a3220", - "reference": "91e02e606b4b705c2f4fb42f7e7708b7923a3220", + "url": "https://api.github.com/repos/symfony/routing/zipball/1f5234e8457164a3a0038a4c0a4ba27876a9c670", + "reference": "1f5234e8457164a3a0038a4c0a4ba27876a9c670", "shasum": "" }, "require": { @@ -4310,7 +4313,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.4.16" + "source": "https://github.com/symfony/routing/tree/v6.4.22" }, "funding": [ { @@ -4326,20 +4329,20 @@ "type": "tidelift" } ], - "time": "2024-11-13T15:31:34+00:00" + "time": "2025-04-27T16:08:38+00:00" }, { "name": "symfony/runtime", - "version": "v6.4.14", + "version": "v6.4.22", "source": { "type": "git", "url": "https://github.com/symfony/runtime.git", - "reference": "4facd4174f45cd37c65860403412b67c7381136a" + "reference": "832c3ce3b810509815050434ccb7ead68d06395b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/runtime/zipball/4facd4174f45cd37c65860403412b67c7381136a", - "reference": "4facd4174f45cd37c65860403412b67c7381136a", + "url": "https://api.github.com/repos/symfony/runtime/zipball/832c3ce3b810509815050434ccb7ead68d06395b", + "reference": "832c3ce3b810509815050434ccb7ead68d06395b", "shasum": "" }, "require": { @@ -4389,7 +4392,7 @@ "runtime" ], "support": { - "source": "https://github.com/symfony/runtime/tree/v6.4.14" + "source": "https://github.com/symfony/runtime/tree/v6.4.22" }, "funding": [ { @@ -4405,20 +4408,20 @@ "type": "tidelift" } ], - "time": "2024-11-05T16:39:55+00:00" + "time": "2025-05-07T21:15:03+00:00" }, { "name": "symfony/security-bundle", - "version": "v6.4.13", + "version": "v6.4.22", "source": { "type": "git", "url": "https://github.com/symfony/security-bundle.git", - "reference": "181d1fcf5f88ef8212ed7f6434e5ff51c9d7dff3" + "reference": "671ab5339a1e53923bfb8069bf984a47a412f612" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security-bundle/zipball/181d1fcf5f88ef8212ed7f6434e5ff51c9d7dff3", - "reference": "181d1fcf5f88ef8212ed7f6434e5ff51c9d7dff3", + "url": "https://api.github.com/repos/symfony/security-bundle/zipball/671ab5339a1e53923bfb8069bf984a47a412f612", + "reference": "671ab5339a1e53923bfb8069bf984a47a412f612", "shasum": "" }, "require": { @@ -4501,7 +4504,7 @@ "description": "Provides a tight integration of the Security component into the Symfony full-stack framework", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/security-bundle/tree/v6.4.13" + "source": "https://github.com/symfony/security-bundle/tree/v6.4.22" }, "funding": [ { @@ -4517,20 +4520,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:18:03+00:00" + "time": "2025-05-09T21:27:20+00:00" }, { "name": "symfony/security-core", - "version": "v6.4.16", + "version": "v6.4.22", "source": { "type": "git", "url": "https://github.com/symfony/security-core.git", - "reference": "19cdb7de86e556202ab16e0cffd1a97348231bc0" + "reference": "110483f4e0106cf4bb63ed0479f6a5d09ab24a9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security-core/zipball/19cdb7de86e556202ab16e0cffd1a97348231bc0", - "reference": "19cdb7de86e556202ab16e0cffd1a97348231bc0", + "url": "https://api.github.com/repos/symfony/security-core/zipball/110483f4e0106cf4bb63ed0479f6a5d09ab24a9e", + "reference": "110483f4e0106cf4bb63ed0479f6a5d09ab24a9e", "shasum": "" }, "require": { @@ -4587,7 +4590,7 @@ "description": "Symfony Security Component - Core Library", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/security-core/tree/v6.4.16" + "source": "https://github.com/symfony/security-core/tree/v6.4.22" }, "funding": [ { @@ -4603,7 +4606,7 @@ "type": "tidelift" } ], - "time": "2024-11-27T09:48:51+00:00" + "time": "2025-05-20T14:15:13+00:00" }, { "name": "symfony/security-csrf", @@ -4675,16 +4678,16 @@ }, { "name": "symfony/security-http", - "version": "v6.4.15", + "version": "v6.4.22", "source": { "type": "git", "url": "https://github.com/symfony/security-http.git", - "reference": "ded1e078f952e686b058d9eac98e497bea47b308" + "reference": "786c8eeee44b07419264ede2a795e8f490113dc2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security-http/zipball/ded1e078f952e686b058d9eac98e497bea47b308", - "reference": "ded1e078f952e686b058d9eac98e497bea47b308", + "url": "https://api.github.com/repos/symfony/security-http/zipball/786c8eeee44b07419264ede2a795e8f490113dc2", + "reference": "786c8eeee44b07419264ede2a795e8f490113dc2", "shasum": "" }, "require": { @@ -4743,7 +4746,7 @@ "description": "Symfony Security Component - HTTP Integration", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/security-http/tree/v6.4.15" + "source": "https://github.com/symfony/security-http/tree/v6.4.22" }, "funding": [ { @@ -4759,20 +4762,20 @@ "type": "tidelift" } ], - "time": "2024-11-13T13:40:18+00:00" + "time": "2025-05-09T07:11:47+00:00" }, { "name": "symfony/serializer", - "version": "v6.4.15", + "version": "v6.4.22", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "9d862d66198f3c2e30404228629ef4c18d5d608e" + "reference": "b836df93e9ea07d1d3ada58a679ef205d54b64d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/9d862d66198f3c2e30404228629ef4c18d5d608e", - "reference": "9d862d66198f3c2e30404228629ef4c18d5d608e", + "url": "https://api.github.com/repos/symfony/serializer/zipball/b836df93e9ea07d1d3ada58a679ef205d54b64d1", + "reference": "b836df93e9ea07d1d3ada58a679ef205d54b64d1", "shasum": "" }, "require": { @@ -4841,7 +4844,7 @@ "description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/serializer/tree/v6.4.15" + "source": "https://github.com/symfony/serializer/tree/v6.4.22" }, "funding": [ { @@ -4857,20 +4860,20 @@ "type": "tidelift" } ], - "time": "2024-10-23T13:25:59+00:00" + "time": "2025-05-12T08:02:50+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", - "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4", + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4", "shasum": "" }, "require": { @@ -4883,12 +4886,12 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "3.5-dev" - }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" } }, "autoload": { @@ -4924,7 +4927,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.6.0" }, "funding": [ { @@ -4940,20 +4943,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2025-04-25T09:37:31+00:00" }, { "name": "symfony/string", - "version": "v6.4.15", + "version": "v6.4.21", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f" + "reference": "73e2c6966a5aef1d4892873ed5322245295370c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f", - "reference": "73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f", + "url": "https://api.github.com/repos/symfony/string/zipball/73e2c6966a5aef1d4892873ed5322245295370c6", + "reference": "73e2c6966a5aef1d4892873ed5322245295370c6", "shasum": "" }, "require": { @@ -5010,7 +5013,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.15" + "source": "https://github.com/symfony/string/tree/v6.4.21" }, "funding": [ { @@ -5026,20 +5029,20 @@ "type": "tidelift" } ], - "time": "2024-11-13T13:31:12+00:00" + "time": "2025-04-18T15:23:29+00:00" }, { "name": "symfony/translation-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "4667ff3bd513750603a09c8dedbea942487fb07c" + "reference": "df210c7a2573f1913b2d17cc95f90f53a73d8f7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/4667ff3bd513750603a09c8dedbea942487fb07c", - "reference": "4667ff3bd513750603a09c8dedbea942487fb07c", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/df210c7a2573f1913b2d17cc95f90f53a73d8f7d", + "reference": "df210c7a2573f1913b2d17cc95f90f53a73d8f7d", "shasum": "" }, "require": { @@ -5047,12 +5050,12 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "3.5-dev" - }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" } }, "autoload": { @@ -5088,7 +5091,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/translation-contracts/tree/v3.6.0" }, "funding": [ { @@ -5104,20 +5107,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-09-27T08:32:26+00:00" }, { "name": "symfony/twig-bridge", - "version": "v6.4.16", + "version": "v6.4.22", "source": { "type": "git", "url": "https://github.com/symfony/twig-bridge.git", - "reference": "32ec012ed4f6426441a66014471bdb26674744be" + "reference": "04ab306a2f2c9dbd46f4363383812954f704af9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/32ec012ed4f6426441a66014471bdb26674744be", - "reference": "32ec012ed4f6426441a66014471bdb26674744be", + "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/04ab306a2f2c9dbd46f4363383812954f704af9d", + "reference": "04ab306a2f2c9dbd46f4363383812954f704af9d", "shasum": "" }, "require": { @@ -5148,7 +5151,7 @@ "symfony/dependency-injection": "^5.4|^6.0|^7.0", "symfony/expression-language": "^5.4|^6.0|^7.0", "symfony/finder": "^5.4|^6.0|^7.0", - "symfony/form": "^6.4|^7.0", + "symfony/form": "^6.4.20|^7.2.5", "symfony/html-sanitizer": "^6.1|^7.0", "symfony/http-foundation": "^5.4|^6.0|^7.0", "symfony/http-kernel": "^6.4|^7.0", @@ -5197,7 +5200,7 @@ "description": "Provides integration for Twig with various Symfony components", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/twig-bridge/tree/v6.4.16" + "source": "https://github.com/symfony/twig-bridge/tree/v6.4.22" }, "funding": [ { @@ -5213,7 +5216,7 @@ "type": "tidelift" } ], - "time": "2024-11-25T11:59:11+00:00" + "time": "2025-05-16T08:23:44+00:00" }, { "name": "symfony/twig-bundle", @@ -5380,16 +5383,16 @@ }, { "name": "symfony/validator", - "version": "v6.4.16", + "version": "v6.4.22", "source": { "type": "git", "url": "https://github.com/symfony/validator.git", - "reference": "9b0d1988b56511706bc91d96ead39acd77aaf34d" + "reference": "4c5fbccb2d8f64017c8dada6473701a5c8539716" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/9b0d1988b56511706bc91d96ead39acd77aaf34d", - "reference": "9b0d1988b56511706bc91d96ead39acd77aaf34d", + "url": "https://api.github.com/repos/symfony/validator/zipball/4c5fbccb2d8f64017c8dada6473701a5c8539716", + "reference": "4c5fbccb2d8f64017c8dada6473701a5c8539716", "shasum": "" }, "require": { @@ -5457,7 +5460,7 @@ "description": "Provides tools to validate values", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/validator/tree/v6.4.16" + "source": "https://github.com/symfony/validator/tree/v6.4.22" }, "funding": [ { @@ -5473,20 +5476,20 @@ "type": "tidelift" } ], - "time": "2024-11-27T09:48:51+00:00" + "time": "2025-05-29T07:03:46+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.4.15", + "version": "v6.4.21", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "38254d5a5ac2e61f2b52f9caf54e7aa3c9d36b80" + "reference": "22560f80c0c5cd58cc0bcaf73455ffd81eb380d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/38254d5a5ac2e61f2b52f9caf54e7aa3c9d36b80", - "reference": "38254d5a5ac2e61f2b52f9caf54e7aa3c9d36b80", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/22560f80c0c5cd58cc0bcaf73455ffd81eb380d5", + "reference": "22560f80c0c5cd58cc0bcaf73455ffd81eb380d5", "shasum": "" }, "require": { @@ -5542,7 +5545,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.4.15" + "source": "https://github.com/symfony/var-dumper/tree/v6.4.21" }, "funding": [ { @@ -5558,20 +5561,20 @@ "type": "tidelift" } ], - "time": "2024-11-08T15:28:48+00:00" + "time": "2025-04-09T07:34:50+00:00" }, { "name": "symfony/var-exporter", - "version": "v6.4.13", + "version": "v6.4.22", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "0f605f72a363f8743001038a176eeb2a11223b51" + "reference": "f28cf841f5654955c9f88ceaf4b9dc29571988a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/0f605f72a363f8743001038a176eeb2a11223b51", - "reference": "0f605f72a363f8743001038a176eeb2a11223b51", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/f28cf841f5654955c9f88ceaf4b9dc29571988a9", + "reference": "f28cf841f5654955c9f88ceaf4b9dc29571988a9", "shasum": "" }, "require": { @@ -5619,7 +5622,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v6.4.13" + "source": "https://github.com/symfony/var-exporter/tree/v6.4.22" }, "funding": [ { @@ -5635,7 +5638,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:18:03+00:00" + "time": "2025-05-14T13:00:13+00:00" }, { "name": "symfony/web-link", @@ -5722,16 +5725,16 @@ }, { "name": "symfony/yaml", - "version": "v6.4.13", + "version": "v6.4.21", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "e99b4e94d124b29ee4cf3140e1b537d2dad8cec9" + "reference": "f01987f45676778b474468aa266fe2eda1f2bc7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e99b4e94d124b29ee4cf3140e1b537d2dad8cec9", - "reference": "e99b4e94d124b29ee4cf3140e1b537d2dad8cec9", + "url": "https://api.github.com/repos/symfony/yaml/zipball/f01987f45676778b474468aa266fe2eda1f2bc7e", + "reference": "f01987f45676778b474468aa266fe2eda1f2bc7e", "shasum": "" }, "require": { @@ -5774,7 +5777,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.4.13" + "source": "https://github.com/symfony/yaml/tree/v6.4.21" }, "funding": [ { @@ -5790,28 +5793,27 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:18:03+00:00" + "time": "2025-04-04T09:48:44+00:00" }, { "name": "twig/twig", - "version": "v3.16.0", + "version": "v3.21.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "475ad2dc97d65d8631393e721e7e44fb544f0561" + "reference": "285123877d4dd97dd7c11842ac5fb7e86e60d81d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/475ad2dc97d65d8631393e721e7e44fb544f0561", - "reference": "475ad2dc97d65d8631393e721e7e44fb544f0561", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/285123877d4dd97dd7c11842ac5fb7e86e60d81d", + "reference": "285123877d4dd97dd7c11842ac5fb7e86e60d81d", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1.0", "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php81": "^1.29" + "symfony/polyfill-mbstring": "^1.3" }, "require-dev": { "phpstan/phpstan": "^2.0", @@ -5858,7 +5860,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.16.0" + "source": "https://github.com/twigphp/Twig/tree/v3.21.1" }, "funding": [ { @@ -5870,7 +5872,7 @@ "type": "tidelift" } ], - "time": "2024-11-29T08:27:05+00:00" + "time": "2025-05-03T07:21:55+00:00" }, { "name": "webmozart/assert", @@ -6239,13 +6241,13 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - }, "phpstan": { "includes": [ "extension.neon" ] + }, + "branch-alias": { + "dev-main": "3.x-dev" } }, "autoload": { @@ -7134,16 +7136,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.65.0", + "version": "v3.75.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "79d4f3e77b250a7d8043d76c6af8f0695e8a469f" + "reference": "399a128ff2fdaf4281e4e79b755693286cdf325c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/79d4f3e77b250a7d8043d76c6af8f0695e8a469f", - "reference": "79d4f3e77b250a7d8043d76c6af8f0695e8a469f", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/399a128ff2fdaf4281e4e79b755693286cdf325c", + "reference": "399a128ff2fdaf4281e4e79b755693286cdf325c", "shasum": "" }, "require": { @@ -7151,6 +7153,7 @@ "composer/semver": "^3.4", "composer/xdebug-handler": "^3.0.3", "ext-filter": "*", + "ext-hash": "*", "ext-json": "*", "ext-tokenizer": "*", "fidry/cpu-core-counter": "^1.2", @@ -7160,31 +7163,31 @@ "react/promise": "^2.0 || ^3.0", "react/socket": "^1.0", "react/stream": "^1.0", - "sebastian/diff": "^4.0 || ^5.0 || ^6.0", - "symfony/console": "^5.4 || ^6.0 || ^7.0", - "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0", - "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", - "symfony/finder": "^5.4 || ^6.0 || ^7.0", - "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0", - "symfony/polyfill-mbstring": "^1.28", - "symfony/polyfill-php80": "^1.28", - "symfony/polyfill-php81": "^1.28", - "symfony/process": "^5.4 || ^6.0 || ^7.0", - "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0" + "sebastian/diff": "^4.0 || ^5.1 || ^6.0 || ^7.0", + "symfony/console": "^5.4 || ^6.4 || ^7.0", + "symfony/event-dispatcher": "^5.4 || ^6.4 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.4 || ^7.0", + "symfony/finder": "^5.4 || ^6.4 || ^7.0", + "symfony/options-resolver": "^5.4 || ^6.4 || ^7.0", + "symfony/polyfill-mbstring": "^1.31", + "symfony/polyfill-php80": "^1.31", + "symfony/polyfill-php81": "^1.31", + "symfony/process": "^5.4 || ^6.4 || ^7.2", + "symfony/stopwatch": "^5.4 || ^6.4 || ^7.0" }, "require-dev": { - "facile-it/paraunit": "^1.3.1 || ^2.4", - "infection/infection": "^0.29.8", - "justinrainbow/json-schema": "^5.3 || ^6.0", + "facile-it/paraunit": "^1.3.1 || ^2.6", + "infection/infection": "^0.29.14", + "justinrainbow/json-schema": "^5.3 || ^6.2", "keradus/cli-executor": "^2.1", "mikey179/vfsstream": "^1.6.12", "php-coveralls/php-coveralls": "^2.7", "php-cs-fixer/accessible-object": "^1.1", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.5", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.5", - "phpunit/phpunit": "^9.6.21 || ^10.5.38 || ^11.4.3", - "symfony/var-dumper": "^5.4.47 || ^6.4.15 || ^7.1.8", - "symfony/yaml": "^5.4.45 || ^6.4.13 || ^7.1.6" + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6", + "phpunit/phpunit": "^9.6.22 || ^10.5.45 || ^11.5.12", + "symfony/var-dumper": "^5.4.48 || ^6.4.18 || ^7.2.3", + "symfony/yaml": "^5.4.45 || ^6.4.18 || ^7.2.3" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -7225,7 +7228,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.65.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.75.0" }, "funding": [ { @@ -7233,20 +7236,20 @@ "type": "github" } ], - "time": "2024-11-25T00:39:24+00:00" + "time": "2025-03-31T18:40:42+00:00" }, { "name": "justinrainbow/json-schema", - "version": "6.4.1", + "version": "6.4.2", "source": { "type": "git", "url": "https://github.com/jsonrainbow/json-schema.git", - "reference": "35d262c94959571e8736db1e5c9bc36ab94ae900" + "reference": "ce1fd2d47799bb60668643bc6220f6278a4c1d02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/35d262c94959571e8736db1e5c9bc36ab94ae900", - "reference": "35d262c94959571e8736db1e5c9bc36ab94ae900", + "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/ce1fd2d47799bb60668643bc6220f6278a4c1d02", + "reference": "ce1fd2d47799bb60668643bc6220f6278a4c1d02", "shasum": "" }, "require": { @@ -7306,9 +7309,9 @@ ], "support": { "issues": "https://github.com/jsonrainbow/json-schema/issues", - "source": "https://github.com/jsonrainbow/json-schema/tree/6.4.1" + "source": "https://github.com/jsonrainbow/json-schema/tree/6.4.2" }, - "time": "2025-04-04T13:08:07+00:00" + "time": "2025-06-03T18:27:04+00:00" }, { "name": "localheinz/diff", @@ -7507,16 +7510,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.12.1", + "version": "1.13.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" + "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", - "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/1720ddd719e16cf0db4eb1c6eca108031636d46c", + "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c", "shasum": "" }, "require": { @@ -7555,7 +7558,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.1" }, "funding": [ { @@ -7563,7 +7566,7 @@ "type": "tidelift" } ], - "time": "2024-11-08T17:47:46+00:00" + "time": "2025-04-29T12:36:36+00:00" }, { "name": "netresearch/jsonmapper", @@ -8113,16 +8116,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.38", + "version": "10.5.46", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a86773b9e887a67bc53efa9da9ad6e3f2498c132" + "reference": "8080be387a5be380dda48c6f41cee4a13aadab3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a86773b9e887a67bc53efa9da9ad6e3f2498c132", - "reference": "a86773b9e887a67bc53efa9da9ad6e3f2498c132", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8080be387a5be380dda48c6f41cee4a13aadab3d", + "reference": "8080be387a5be380dda48c6f41cee4a13aadab3d", "shasum": "" }, "require": { @@ -8132,7 +8135,7 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.12.0", + "myclabs/deep-copy": "^1.13.1", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=8.1", @@ -8194,7 +8197,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.38" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.46" }, "funding": [ { @@ -8205,32 +8208,40 @@ "url": "https://github.com/sebastianbergmann", "type": "github" }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, { "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", "type": "tidelift" } ], - "time": "2024-10-28T13:06:21+00:00" + "time": "2025-05-02T06:46:24+00:00" }, { "name": "psalm/plugin-symfony", - "version": "v5.2.5", + "version": "v5.2.6", "source": { "type": "git", "url": "https://github.com/psalm/psalm-plugin-symfony.git", - "reference": "fb801a9b3d12ace9fb619febfaa3ae0bc1dbb196" + "reference": "1638f172b4ae5f283ee6b1b58fff3e44aa628742" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/psalm/psalm-plugin-symfony/zipball/fb801a9b3d12ace9fb619febfaa3ae0bc1dbb196", - "reference": "fb801a9b3d12ace9fb619febfaa3ae0bc1dbb196", + "url": "https://api.github.com/repos/psalm/psalm-plugin-symfony/zipball/1638f172b4ae5f283ee6b1b58fff3e44aa628742", + "reference": "1638f172b4ae5f283ee6b1b58fff3e44aa628742", "shasum": "" }, "require": { "ext-simplexml": "*", "php": "^8.1", "symfony/framework-bundle": "^5.0 || ^6.0 || ^7.0", - "vimeo/psalm": "^5.16" + "vimeo/psalm": "^5.16 || dev-master" }, "require-dev": { "doctrine/annotations": "^1.8|^2", @@ -8273,9 +8284,9 @@ "description": "Psalm Plugin for Symfony", "support": { "issues": "https://github.com/psalm/psalm-plugin-symfony/issues", - "source": "https://github.com/psalm/psalm-plugin-symfony/tree/v5.2.5" + "source": "https://github.com/psalm/psalm-plugin-symfony/tree/v5.2.6" }, - "time": "2024-07-03T11:57:02+00:00" + "time": "2024-12-21T08:46:26+00:00" }, { "name": "react/cache", @@ -8351,33 +8362,33 @@ }, { "name": "react/child-process", - "version": "v0.6.5", + "version": "v0.6.6", "source": { "type": "git", "url": "https://github.com/reactphp/child-process.git", - "reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43" + "reference": "1721e2b93d89b745664353b9cfc8f155ba8a6159" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/child-process/zipball/e71eb1aa55f057c7a4a0d08d06b0b0a484bead43", - "reference": "e71eb1aa55f057c7a4a0d08d06b0b0a484bead43", + "url": "https://api.github.com/repos/reactphp/child-process/zipball/1721e2b93d89b745664353b9cfc8f155ba8a6159", + "reference": "1721e2b93d89b745664353b9cfc8f155ba8a6159", "shasum": "" }, "require": { "evenement/evenement": "^3.0 || ^2.0 || ^1.0", "php": ">=5.3.0", "react/event-loop": "^1.2", - "react/stream": "^1.2" + "react/stream": "^1.4" }, "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35", - "react/socket": "^1.8", + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36", + "react/socket": "^1.16", "sebastian/environment": "^5.0 || ^3.0 || ^2.0 || ^1.0" }, "type": "library", "autoload": { "psr-4": { - "React\\ChildProcess\\": "src" + "React\\ChildProcess\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -8414,19 +8425,15 @@ ], "support": { "issues": "https://github.com/reactphp/child-process/issues", - "source": "https://github.com/reactphp/child-process/tree/v0.6.5" + "source": "https://github.com/reactphp/child-process/tree/v0.6.6" }, "funding": [ { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "time": "2022-09-16T13:41:56+00:00" + "time": "2025-01-01T16:37:48+00:00" }, { "name": "react/dns", @@ -9725,16 +9732,16 @@ }, { "name": "spatie/array-to-xml", - "version": "3.3.0", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/spatie/array-to-xml.git", - "reference": "f56b220fe2db1ade4c88098d83413ebdfc3bf876" + "reference": "7dcfc67d60b0272926dabad1ec01f6b8a5fb5e67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/f56b220fe2db1ade4c88098d83413ebdfc3bf876", - "reference": "f56b220fe2db1ade4c88098d83413ebdfc3bf876", + "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/7dcfc67d60b0272926dabad1ec01f6b8a5fb5e67", + "reference": "7dcfc67d60b0272926dabad1ec01f6b8a5fb5e67", "shasum": "" }, "require": { @@ -9777,7 +9784,7 @@ "xml" ], "support": { - "source": "https://github.com/spatie/array-to-xml/tree/3.3.0" + "source": "https://github.com/spatie/array-to-xml/tree/3.4.0" }, "funding": [ { @@ -9789,7 +9796,7 @@ "type": "github" } ], - "time": "2024-05-01T10:20:27+00:00" + "time": "2024-12-16T12:45:15+00:00" }, { "name": "symfony/browser-kit", @@ -9928,16 +9935,16 @@ }, { "name": "symfony/maker-bundle", - "version": "v1.61.0", + "version": "v1.62.1", "source": { "type": "git", "url": "https://github.com/symfony/maker-bundle.git", - "reference": "a3b7f14d349f8f44ed752d4dde2263f77510cc18" + "reference": "468ff2708200c95ebc0d85d3174b6c6711b8a590" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/maker-bundle/zipball/a3b7f14d349f8f44ed752d4dde2263f77510cc18", - "reference": "a3b7f14d349f8f44ed752d4dde2263f77510cc18", + "url": "https://api.github.com/repos/symfony/maker-bundle/zipball/468ff2708200c95ebc0d85d3174b6c6711b8a590", + "reference": "468ff2708200c95ebc0d85d3174b6c6711b8a590", "shasum": "" }, "require": { @@ -10000,7 +10007,7 @@ ], "support": { "issues": "https://github.com/symfony/maker-bundle/issues", - "source": "https://github.com/symfony/maker-bundle/tree/v1.61.0" + "source": "https://github.com/symfony/maker-bundle/tree/v1.62.1" }, "funding": [ { @@ -10016,7 +10023,7 @@ "type": "tidelift" } ], - "time": "2024-08-29T22:50:23+00:00" + "time": "2025-01-15T00:21:40+00:00" }, { "name": "symfony/options-resolver", @@ -10087,16 +10094,16 @@ }, { "name": "symfony/phpunit-bridge", - "version": "v7.2.0", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/phpunit-bridge.git", - "reference": "2bbde92ab25a0e2c88160857af7be9db5da0d145" + "reference": "2eabda563921f21cbce1d1e3247b3c36568905e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/2bbde92ab25a0e2c88160857af7be9db5da0d145", - "reference": "2bbde92ab25a0e2c88160857af7be9db5da0d145", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/2eabda563921f21cbce1d1e3247b3c36568905e6", + "reference": "2eabda563921f21cbce1d1e3247b3c36568905e6", "shasum": "" }, "require": { @@ -10149,7 +10156,7 @@ "description": "Provides utilities for PHPUnit, especially user deprecation notices management", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/phpunit-bridge/tree/v7.2.0" + "source": "https://github.com/symfony/phpunit-bridge/tree/v7.3.0" }, "funding": [ { @@ -10165,20 +10172,20 @@ "type": "tidelift" } ], - "time": "2024-11-13T16:15:23+00:00" + "time": "2025-05-23T07:26:30+00:00" }, { "name": "symfony/process", - "version": "v6.4.15", + "version": "v6.4.20", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "3cb242f059c14ae08591c5c4087d1fe443564392" + "reference": "e2a61c16af36c9a07e5c9906498b73e091949a20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/3cb242f059c14ae08591c5c4087d1fe443564392", - "reference": "3cb242f059c14ae08591c5c4087d1fe443564392", + "url": "https://api.github.com/repos/symfony/process/zipball/e2a61c16af36c9a07e5c9906498b73e091949a20", + "reference": "e2a61c16af36c9a07e5c9906498b73e091949a20", "shasum": "" }, "require": { @@ -10210,7 +10217,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.4.15" + "source": "https://github.com/symfony/process/tree/v6.4.20" }, "funding": [ { @@ -10226,20 +10233,20 @@ "type": "tidelift" } ], - "time": "2024-11-06T14:19:14+00:00" + "time": "2025-03-10T17:11:00+00:00" }, { "name": "symfony/stopwatch", - "version": "v6.4.13", + "version": "v6.4.19", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "2cae0a6f8d04937d02f6d19806251e2104d54f92" + "reference": "dfe1481c12c06266d0c3d58c0cb4b09bd497ab9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/2cae0a6f8d04937d02f6d19806251e2104d54f92", - "reference": "2cae0a6f8d04937d02f6d19806251e2104d54f92", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/dfe1481c12c06266d0c3d58c0cb4b09bd497ab9c", + "reference": "dfe1481c12c06266d0c3d58c0cb4b09bd497ab9c", "shasum": "" }, "require": { @@ -10272,7 +10279,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v6.4.13" + "source": "https://github.com/symfony/stopwatch/tree/v6.4.19" }, "funding": [ { @@ -10288,20 +10295,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:18:03+00:00" + "time": "2025-02-21T10:06:30+00:00" }, { "name": "symfony/web-profiler-bundle", - "version": "v6.4.16", + "version": "v6.4.19", "source": { "type": "git", "url": "https://github.com/symfony/web-profiler-bundle.git", - "reference": "2d58fd04ac0d3c6279cadd0105959083ef1d7f5b" + "reference": "7d1026a8e950d416cb5148ae88ac23db5d264839" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/web-profiler-bundle/zipball/2d58fd04ac0d3c6279cadd0105959083ef1d7f5b", - "reference": "2d58fd04ac0d3c6279cadd0105959083ef1d7f5b", + "url": "https://api.github.com/repos/symfony/web-profiler-bundle/zipball/7d1026a8e950d416cb5148ae88ac23db5d264839", + "reference": "7d1026a8e950d416cb5148ae88ac23db5d264839", "shasum": "" }, "require": { @@ -10354,7 +10361,7 @@ "dev" ], "support": { - "source": "https://github.com/symfony/web-profiler-bundle/tree/v6.4.16" + "source": "https://github.com/symfony/web-profiler-bundle/tree/v6.4.19" }, "funding": [ { @@ -10370,7 +10377,7 @@ "type": "tidelift" } ], - "time": "2024-11-19T10:11:25+00:00" + "time": "2025-02-14T12:21:59+00:00" }, { "name": "theseer/tokenizer", From f2131899adf00d7519439e98e9ac167a661a1e27 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Wed, 4 Jun 2025 16:29:28 +0200 Subject: [PATCH 14/35] 4268: Updated phpunit/phpunit recipe --- .gitignore | 2 +- CHANGELOG.md | 2 +- phpunit.xml.dist | 13 ++++++------- symfony.lock | 4 ++-- tests/bootstrap.php | 8 +++++--- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index a68256d..69c301b 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,7 @@ ###> phpunit/phpunit ### /phpunit.xml -.phpunit.result.cache +/.phpunit.cache/ ###< phpunit/phpunit ### ###> symfony/phpunit-bridge ### diff --git a/CHANGELOG.md b/CHANGELOG.md index 6363091..a31091a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ See [keep a changelog] for information about writing changes to this log. - Updated docker compose setup - Added simple API tests and resolved some deprecations - Upgraded to API platform v4 - - Updated composer packages (security update) + - Updated composer packages (security update) and recipes ## [1.1.1] - 2025-03-28 diff --git a/phpunit.xml.dist b/phpunit.xml.dist index a3d31d7..64d02a2 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -4,19 +4,16 @@ - - @@ -25,10 +22,12 @@ - + src + + diff --git a/symfony.lock b/symfony.lock index d8149ad..b1be843 100644 --- a/symfony.lock +++ b/symfony.lock @@ -63,8 +63,8 @@ "recipe": { "repo": "github.com/symfony/recipes", "branch": "main", - "version": "9.6", - "ref": "7364a21d87e658eb363c5020c072ecfdc12e2326" + "version": "10.0", + "ref": "bb22cf8d8c554a623b427d5f3416b538f5525233" }, "files": [ ".env.test", diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 469dcce..47a5855 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -4,8 +4,10 @@ require dirname(__DIR__).'/vendor/autoload.php'; -if (file_exists(dirname(__DIR__).'/config/bootstrap.php')) { - require dirname(__DIR__).'/config/bootstrap.php'; -} elseif (method_exists(Dotenv::class, 'bootEnv')) { +if (method_exists(Dotenv::class, 'bootEnv')) { (new Dotenv())->bootEnv(dirname(__DIR__).'/.env'); } + +if ($_SERVER['APP_DEBUG']) { + umask(0000); +} From a6bef83c21d2802c8c1ba1c6f6a9e8fd479cebe5 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Wed, 4 Jun 2025 16:31:00 +0200 Subject: [PATCH 15/35] 4268: Updated symfony/console recipe --- bin/console | 4 ++++ symfony.lock | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/console b/bin/console index c933dc5..d8d530e 100755 --- a/bin/console +++ b/bin/console @@ -4,6 +4,10 @@ use App\Kernel; use Symfony\Bundle\FrameworkBundle\Console\Application; +if (!is_dir(dirname(__DIR__).'/vendor')) { + throw new LogicException('Dependencies are missing. Try running "composer install".'); +} + if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) { throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".'); } diff --git a/symfony.lock b/symfony.lock index b1be843..8c2c1ef 100644 --- a/symfony.lock +++ b/symfony.lock @@ -78,7 +78,7 @@ "repo": "github.com/symfony/recipes", "branch": "main", "version": "5.3", - "ref": "da0c8be8157600ad34f10ff0c9cc91232522e047" + "ref": "1781ff40d8a17d87cf53f8d4cf0c8346ed2bb461" }, "files": [ "bin/console" From fac42b2bc5f3101e7c9df578a49977a58886ba0c Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Wed, 4 Jun 2025 16:31:41 +0200 Subject: [PATCH 16/35] 4268: Updated symfony/flex recipe --- .env.dev | 0 symfony.lock | 9 +++++---- 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 .env.dev diff --git a/.env.dev b/.env.dev new file mode 100644 index 0000000..e69de29 diff --git a/symfony.lock b/symfony.lock index 8c2c1ef..60294d3 100644 --- a/symfony.lock +++ b/symfony.lock @@ -85,15 +85,16 @@ ] }, "symfony/flex": { - "version": "2.4", + "version": "2.7", "recipe": { "repo": "github.com/symfony/recipes", "branch": "main", - "version": "1.0", - "ref": "146251ae39e06a95be0fe3d13c807bcf3938b172" + "version": "2.4", + "ref": "52e9754527a15e2b79d9a610f98185a1fe46622a" }, "files": [ - ".env" + ".env", + ".env.dev" ] }, "symfony/framework-bundle": { From ffdb85f74a979103e24e8d19fdf4af28bc44630c Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Wed, 4 Jun 2025 16:32:53 +0200 Subject: [PATCH 17/35] 4268: Updated symfony/framework-bundle recipe --- config/packages/framework.yaml | 1 - symfony.lock | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml index ca339c9..7d97622 100644 --- a/config/packages/framework.yaml +++ b/config/packages/framework.yaml @@ -1,7 +1,6 @@ # see https://symfony.com/doc/current/reference/configuration/framework.html framework: secret: '%env(APP_SECRET)%' - #csrf_protection: true annotations: false http_method_override: false handle_all_throwables: true diff --git a/symfony.lock b/symfony.lock index 60294d3..1cccf9a 100644 --- a/symfony.lock +++ b/symfony.lock @@ -103,7 +103,7 @@ "repo": "github.com/symfony/recipes", "branch": "main", "version": "6.4", - "ref": "a91c965766ad3ff2ae15981801643330eb42b6a5" + "ref": "32126346f25e1cee607cc4aa6783d46034920554" }, "files": [ "config/packages/cache.yaml", From 3c0070f6a36d6e8120985ed9c8c553cb5b0c6e6d Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Wed, 4 Jun 2025 16:35:01 +0200 Subject: [PATCH 18/35] 4268: Updated symfony/twig-bundle recipe --- config/packages/twig.yaml | 2 +- symfony.lock | 4 ++-- templates/base.html.twig | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml index 980f9a9..b46e8b3 100644 --- a/config/packages/twig.yaml +++ b/config/packages/twig.yaml @@ -1,5 +1,5 @@ twig: - default_path: '%kernel.project_dir%/templates' + file_name_pattern: '*.twig' globals: app_project_uri: '%env(APP_PROJECT_URI)%' diff --git a/symfony.lock b/symfony.lock index 1cccf9a..516f11d 100644 --- a/symfony.lock +++ b/symfony.lock @@ -171,8 +171,8 @@ "recipe": { "repo": "github.com/symfony/recipes", "branch": "main", - "version": "6.3", - "ref": "b7772eb20e92f3fb4d4fe756e7505b4ba2ca1a2c" + "version": "6.4", + "ref": "cab5fd2a13a45c266d45a7d9337e28dee6272877" }, "files": [ "config/packages/twig.yaml", diff --git a/templates/base.html.twig b/templates/base.html.twig index 67598ac..1069c14 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -3,7 +3,7 @@ {% block title %}Welcome!{% endblock %} - + {% block stylesheets %} {% endblock %} From 01623873400b09043725ce17684a211de8d3a89a Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Wed, 4 Jun 2025 16:35:47 +0200 Subject: [PATCH 19/35] 4268: Updated symfony/web-profiler-bundle recipe --- config/packages/web_profiler.yaml | 6 ------ symfony.lock | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/config/packages/web_profiler.yaml b/config/packages/web_profiler.yaml index b946111..1e039b7 100644 --- a/config/packages/web_profiler.yaml +++ b/config/packages/web_profiler.yaml @@ -1,17 +1,11 @@ when@dev: web_profiler: toolbar: true - intercept_redirects: false framework: profiler: - only_exceptions: false collect_serializer_data: true when@test: - web_profiler: - toolbar: false - intercept_redirects: false - framework: profiler: { collect: false } diff --git a/symfony.lock b/symfony.lock index 516f11d..bded9e7 100644 --- a/symfony.lock +++ b/symfony.lock @@ -197,7 +197,7 @@ "repo": "github.com/symfony/recipes", "branch": "main", "version": "6.1", - "ref": "e42b3f0177df239add25373083a564e5ead4e13a" + "ref": "8b51135b84f4266e3b4c8a6dc23c9d1e32e543b7" }, "files": [ "config/packages/web_profiler.yaml", From b6cb8be1ad0e33a3f71de1b0b02fdc7377f76dac Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Wed, 4 Jun 2025 16:38:52 +0200 Subject: [PATCH 20/35] 4268: Updated symfony/phpunit-bridge --- composer.json | 2 +- composer.lock | 2 +- phpunit.xml.dist | 4 ++++ symfony.lock | 14 ++++---------- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/composer.json b/composer.json index 57e05e5..7ce3357 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,7 @@ "psalm/plugin-symfony": "^5.1", "symfony/browser-kit": "~6.4.0", "symfony/maker-bundle": "^1.52", - "symfony/phpunit-bridge": "^7.0", + "symfony/phpunit-bridge": "^7.3", "symfony/stopwatch": "~6.4.0", "symfony/web-profiler-bundle": "~6.4.0", "vimeo/psalm": "^5.16", diff --git a/composer.lock b/composer.lock index 91f5ea2..c65c960 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c7e8e3c29ef2214c8ee82213bc3883fe", + "content-hash": "8f4a44f5fd1c8a1784ace5dffea1ec95", "packages": [ { "name": "api-platform/core", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 64d02a2..34c7a19 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -29,5 +29,9 @@ + + + + diff --git a/symfony.lock b/symfony.lock index bded9e7..8448a20 100644 --- a/symfony.lock +++ b/symfony.lock @@ -126,19 +126,13 @@ } }, "symfony/phpunit-bridge": { - "version": "7.0", + "version": "7.3", "recipe": { "repo": "github.com/symfony/recipes", "branch": "main", - "version": "6.3", - "ref": "1f5830c331065b6e4c9d5fa2105e322d29fcd573" - }, - "files": [ - ".env.test", - "bin/phpunit", - "phpunit.xml.dist", - "tests/bootstrap.php" - ] + "version": "7.3", + "ref": "dc13fec96bd527bd399c3c01f0aab915c67fd544" + } }, "symfony/routing": { "version": "6.4", From 5be438214db949bbe9ae7f1eaace5c3f183467b1 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Wed, 4 Jun 2025 23:04:06 +0200 Subject: [PATCH 21/35] 4268: Updated comments to remove unused imports (!) See https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/2814 for details. --- src/Api/Dto/DailyOccurrence.php | 3 +-- src/Api/Dto/Event.php | 2 +- src/Api/Dto/Location.php | 3 +-- src/Api/Dto/Occurrence.php | 3 +-- src/Api/Dto/Organization.php | 3 +-- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/Api/Dto/DailyOccurrence.php b/src/Api/Dto/DailyOccurrence.php index 1b89206..0f3074a 100644 --- a/src/Api/Dto/DailyOccurrence.php +++ b/src/Api/Dto/DailyOccurrence.php @@ -11,7 +11,6 @@ use ApiPlatform\OpenApi\Model\Parameter; use ApiPlatform\OpenApi\Model\Response; use App\Api\Filter\ElasticSearch\BooleanFilter; -use App\Api\Filter\ElasticSearch\DateFilter; use App\Api\Filter\ElasticSearch\DateRangeFilter; use App\Api\Filter\ElasticSearch\IdFilter; use App\Api\Filter\ElasticSearch\MatchFilter; @@ -74,7 +73,7 @@ 'end' => 'lte', 'updated' => 'gte', ], - // Arguments only exist to provide backward compatibility with filters originally defined by the DateFilter + // Arguments only exist to provide backward compatibility with filters originally defined by the Date filter arguments: [ 'config' => [ 'gte' => [ diff --git a/src/Api/Dto/Event.php b/src/Api/Dto/Event.php index e3edc53..6e07de0 100644 --- a/src/Api/Dto/Event.php +++ b/src/Api/Dto/Event.php @@ -73,7 +73,7 @@ 'occurrences.end' => 'lte', 'updated' => 'gte', ], - // Arguments only exist to provide backward compatibility with filters originally defined by the DateFilter + // Arguments only exist to provide backward compatibility with filters originally defined by the Date filter arguments: [ 'config' => [ 'gte' => [ diff --git a/src/Api/Dto/Location.php b/src/Api/Dto/Location.php index 1d52561..ec1c499 100644 --- a/src/Api/Dto/Location.php +++ b/src/Api/Dto/Location.php @@ -10,7 +10,6 @@ use ApiPlatform\OpenApi\Model\Operation; use ApiPlatform\OpenApi\Model\Parameter; use ApiPlatform\OpenApi\Model\Response; -use App\Api\Filter\ElasticSearch\DateFilter; use App\Api\Filter\ElasticSearch\DateRangeFilter; use App\Api\Filter\ElasticSearch\MatchFilter; use App\Api\State\LocationRepresentationProvider; @@ -58,7 +57,7 @@ properties: [ 'updated' => 'start', ], - // Arguments only exist to provide backward compatibility with filters originally defined by the DateFilter + // Arguments only exist to provide backward compatibility with filters originally defined by the Date filter arguments: [ 'config' => [ 'start' => [ diff --git a/src/Api/Dto/Occurrence.php b/src/Api/Dto/Occurrence.php index e2c16ec..e78b537 100644 --- a/src/Api/Dto/Occurrence.php +++ b/src/Api/Dto/Occurrence.php @@ -10,7 +10,6 @@ use ApiPlatform\OpenApi\Model\Operation; use ApiPlatform\OpenApi\Model\Parameter; use ApiPlatform\OpenApi\Model\Response; -use App\Api\Filter\ElasticSearch\DateFilter; use App\Api\Filter\ElasticSearch\DateRangeFilter; use App\Api\Filter\ElasticSearch\IdFilter; use App\Api\Filter\ElasticSearch\MatchFilter; @@ -70,7 +69,7 @@ 'end' => 'lte', 'updated' => 'gte', ], - // Arguments only exist to provide backward compatibility with filters originally defined by the DateFilter + // Arguments only exist to provide backward compatibility with filters originally defined by the Date filter arguments: [ 'config' => [ 'gte' => [ diff --git a/src/Api/Dto/Organization.php b/src/Api/Dto/Organization.php index c0606bd..a3a8a6f 100644 --- a/src/Api/Dto/Organization.php +++ b/src/Api/Dto/Organization.php @@ -10,7 +10,6 @@ use ApiPlatform\OpenApi\Model\Operation; use ApiPlatform\OpenApi\Model\Parameter; use ApiPlatform\OpenApi\Model\Response; -use App\Api\Filter\ElasticSearch\DateFilter; use App\Api\Filter\ElasticSearch\DateRangeFilter; use App\Api\Filter\ElasticSearch\MatchFilter; use App\Api\State\OrganizationRepresentationProvider; @@ -58,7 +57,7 @@ properties: [ 'updated' => 'start', ], - // Arguments only exist to provide backward compatibility with filters originally defined by the DateFilter + // Arguments only exist to provide backward compatibility with filters originally defined by the Date filter arguments: [ 'config' => [ 'start' => [ From 84ac2c33c57b7c0b79046a76bfafafbd7e2560b4 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Wed, 4 Jun 2025 16:55:44 +0200 Subject: [PATCH 22/35] 4268: Replaced Psaml with PHPStan --- .github/workflows/pr.yaml | 6 +- .gitignore | 4 + CHANGELOG.md | 2 + Taskfile.yml | 12 +- composer.json | 13 +- composer.lock | 849 ++++++++------------------------------ phpstan.dist.neon | 8 + psalm-baseline.xml | 117 ------ psalm.xml | 25 -- symfony.lock | 12 + 10 files changed, 221 insertions(+), 827 deletions(-) create mode 100644 phpstan.dist.neon delete mode 100644 psalm-baseline.xml delete mode 100644 psalm.xml diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 3c48e79..84ea1fa 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -48,9 +48,9 @@ jobs: - name: Check that nothing has changed run: git diff --exit-code - psalm: + code-analysis-phpstan: runs-on: ubuntu-latest - name: Psalm static analysis + name: PHPStan static analysis steps: - uses: actions/checkout@v4 @@ -63,7 +63,7 @@ jobs: - name: Run code analysis run: | - task --yes code-analysis:psalm + task --yes code-analysis:phpstan apispec: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 69c301b..0f3aac4 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,7 @@ ###< vincentlanglet/twig-cs-fixer ### .phpunit.cache + +###> phpstan/phpstan ### +phpstan.neon +###< phpstan/phpstan ### diff --git a/CHANGELOG.md b/CHANGELOG.md index a31091a..34ac90b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ See [keep a changelog] for information about writing changes to this log. - Added simple API tests and resolved some deprecations - Upgraded to API platform v4 - Updated composer packages (security update) and recipes + - Replaces [Psalm](https://psalm.dev/) with [PHPStan](https://phpstan.org/) (via + ). ## [1.1.1] - 2025-03-28 diff --git a/Taskfile.yml b/Taskfile.yml index 815d089..9c55b4a 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -175,12 +175,18 @@ tasks: COMPOSE_ARGS: run --rm prettier {{.YAML_FILES_GLOB}} --check silent: true - code-analysis:psalm: - desc: "Run PSalm" + code-analysis: + desc: "Run code analysis" + cmds: + - task: code-analysis:phpstan + silent: true + + code-analysis:phpstan: + desc: "Run PHPStan" cmds: - task: compose vars: - COMPOSE_ARGS: exec phpfpm vendor/bin/psalm --no-cache + COMPOSE_ARGS: exec phpfpm vendor/bin/phpstan silent: true apispec:export: diff --git a/composer.json b/composer.json index 7ce3357..11f601a 100644 --- a/composer.json +++ b/composer.json @@ -31,16 +31,15 @@ "require-dev": { "ergebnis/composer-normalize": "^2.47", "friendsofphp/php-cs-fixer": "^3.40", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan-symfony": "^2.0", "phpunit/phpunit": "^10.5", - "psalm/plugin-symfony": "^5.1", "symfony/browser-kit": "~6.4.0", "symfony/maker-bundle": "^1.52", "symfony/phpunit-bridge": "^7.3", "symfony/stopwatch": "~6.4.0", "symfony/web-profiler-bundle": "~6.4.0", - "vimeo/psalm": "^5.16", - "vincentlanglet/twig-cs-fixer": "^3.7", - "weirdan/doctrine-psalm-plugin": "^2.9" + "vincentlanglet/twig-cs-fixer": "^3.7" }, "replace": { "symfony/polyfill-ctype": "*", @@ -70,6 +69,7 @@ "allow-plugins": { "ergebnis/composer-normalize": true, "php-http/discovery": true, + "phpstan/extension-installer": true, "symfony/flex": true, "symfony/runtime": true }, @@ -77,7 +77,7 @@ }, "extra": { "symfony": { - "allow-contrib": false, + "allow-contrib": true, "require": "6.4.*" } }, @@ -100,9 +100,6 @@ ], "coding-standards-check": [ "PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --dry-run" - ], - "psalm": [ - "./vendor/bin/psalm --no-cache" ] } } diff --git a/composer.lock b/composer.lock index c65c960..ae4d405 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8f4a44f5fd1c8a1784ace5dffea1ec95", + "content-hash": "734d7df34f96b86a919c53bf4fe0519b", "packages": [ { "name": "api-platform/core", @@ -5990,166 +5990,6 @@ } ], "packages-dev": [ - { - "name": "amphp/amp", - "version": "v2.6.4", - "source": { - "type": "git", - "url": "https://github.com/amphp/amp.git", - "reference": "ded3d9be08f526089eb7ee8d9f16a9768f9dec2d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/ded3d9be08f526089eb7ee8d9f16a9768f9dec2d", - "reference": "ded3d9be08f526089eb7ee8d9f16a9768f9dec2d", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1", - "ext-json": "*", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^7 | ^8 | ^9", - "react/promise": "^2", - "vimeo/psalm": "^3.12" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "files": [ - "lib/functions.php", - "lib/Internal/functions.php" - ], - "psr-4": { - "Amp\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniel Lowrey", - "email": "rdlowrey@php.net" - }, - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Bob Weinand", - "email": "bobwei9@hotmail.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "A non-blocking concurrency framework for PHP applications.", - "homepage": "https://amphp.org/amp", - "keywords": [ - "async", - "asynchronous", - "awaitable", - "concurrency", - "event", - "event-loop", - "future", - "non-blocking", - "promise" - ], - "support": { - "irc": "irc://irc.freenode.org/amphp", - "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v2.6.4" - }, - "funding": [ - { - "url": "https://github.com/amphp", - "type": "github" - } - ], - "time": "2024-03-21T18:52:26+00:00" - }, - { - "name": "amphp/byte-stream", - "version": "v1.8.2", - "source": { - "type": "git", - "url": "https://github.com/amphp/byte-stream.git", - "reference": "4f0e968ba3798a423730f567b1b50d3441c16ddc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/amphp/byte-stream/zipball/4f0e968ba3798a423730f567b1b50d3441c16ddc", - "reference": "4f0e968ba3798a423730f567b1b50d3441c16ddc", - "shasum": "" - }, - "require": { - "amphp/amp": "^2", - "php": ">=7.1" - }, - "require-dev": { - "amphp/php-cs-fixer-config": "dev-master", - "amphp/phpunit-util": "^1.4", - "friendsofphp/php-cs-fixer": "^2.3", - "jetbrains/phpstorm-stubs": "^2019.3", - "phpunit/phpunit": "^6 || ^7 || ^8", - "psalm/phar": "^3.11.4" - }, - "type": "library", - "autoload": { - "files": [ - "lib/functions.php" - ], - "psr-4": { - "Amp\\ByteStream\\": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Piotrowski", - "email": "aaron@trowski.com" - }, - { - "name": "Niklas Keller", - "email": "me@kelunik.com" - } - ], - "description": "A stream abstraction to make working with non-blocking I/O simple.", - "homepage": "https://amphp.org/byte-stream", - "keywords": [ - "amp", - "amphp", - "async", - "io", - "non-blocking", - "stream" - ], - "support": { - "issues": "https://github.com/amphp/byte-stream/issues", - "source": "https://github.com/amphp/byte-stream/tree/v1.8.2" - }, - "funding": [ - { - "url": "https://github.com/amphp", - "type": "github" - } - ], - "time": "2024-04-13T18:00:56+00:00" - }, { "name": "clue/ndjson-react", "version": "v1.3.0", @@ -6440,43 +6280,6 @@ ], "time": "2024-05-06T16:37:16+00:00" }, - { - "name": "dnoegel/php-xdg-base-dir", - "version": "v0.1.1", - "source": { - "type": "git", - "url": "https://github.com/dnoegel/php-xdg-base-dir.git", - "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", - "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" - }, - "type": "library", - "autoload": { - "psr-4": { - "XdgBaseDir\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "implementation of xdg base directory specification for php", - "support": { - "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues", - "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1" - }, - "time": "2019-12-04T15:06:13+00:00" - }, { "name": "ergebnis/composer-normalize", "version": "2.47.0", @@ -6972,107 +6775,6 @@ }, "time": "2023-08-08T05:53:35+00:00" }, - { - "name": "felixfbecker/advanced-json-rpc", - "version": "v3.2.1", - "source": { - "type": "git", - "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", - "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447", - "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447", - "shasum": "" - }, - "require": { - "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "php": "^7.1 || ^8.0", - "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" - }, - "require-dev": { - "phpunit/phpunit": "^7.0 || ^8.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "AdvancedJsonRpc\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "ISC" - ], - "authors": [ - { - "name": "Felix Becker", - "email": "felix.b@outlook.com" - } - ], - "description": "A more advanced JSONRPC implementation", - "support": { - "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", - "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1" - }, - "time": "2021-06-11T22:34:44+00:00" - }, - { - "name": "felixfbecker/language-server-protocol", - "version": "v1.5.3", - "source": { - "type": "git", - "url": "https://github.com/felixfbecker/php-language-server-protocol.git", - "reference": "a9e113dbc7d849e35b8776da39edaf4313b7b6c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/a9e113dbc7d849e35b8776da39edaf4313b7b6c9", - "reference": "a9e113dbc7d849e35b8776da39edaf4313b7b6c9", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpstan/phpstan": "*", - "squizlabs/php_codesniffer": "^3.1", - "vimeo/psalm": "^4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "LanguageServerProtocol\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "ISC" - ], - "authors": [ - { - "name": "Felix Becker", - "email": "felix.b@outlook.com" - } - ], - "description": "PHP classes for the Language Server Protocol", - "keywords": [ - "language", - "microsoft", - "php", - "server" - ], - "support": { - "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", - "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.3" - }, - "time": "2024-04-30T00:40:11+00:00" - }, { "name": "fidry/cpu-core-counter", "version": "1.2.0", @@ -7568,57 +7270,6 @@ ], "time": "2025-04-29T12:36:36+00:00" }, - { - "name": "netresearch/jsonmapper", - "version": "v4.5.0", - "source": { - "type": "git", - "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "8e76efb98ee8b6afc54687045e1b8dba55ac76e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8e76efb98ee8b6afc54687045e1b8dba55ac76e5", - "reference": "8e76efb98ee8b6afc54687045e1b8dba55ac76e5", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0 || ~10.0", - "squizlabs/php_codesniffer": "~3.5" - }, - "type": "library", - "autoload": { - "psr-0": { - "JsonMapper": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "OSL-3.0" - ], - "authors": [ - { - "name": "Christian Weiske", - "email": "cweiske@cweiske.de", - "homepage": "http://github.com/cweiske/jsonmapper/", - "role": "Developer" - } - ], - "description": "Map nested JSON structures onto PHP classes", - "support": { - "email": "cweiske@cweiske.de", - "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/v4.5.0" - }, - "time": "2024-09-08T10:13:13+00:00" - }, { "name": "nikic/php-parser", "version": "v4.19.4", @@ -7793,6 +7444,183 @@ }, "time": "2022-02-21T01:04:05+00:00" }, + { + "name": "phpstan/extension-installer", + "version": "1.4.3", + "source": { + "type": "git", + "url": "https://github.com/phpstan/extension-installer.git", + "reference": "85e90b3942d06b2326fba0403ec24fe912372936" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/85e90b3942d06b2326fba0403ec24fe912372936", + "reference": "85e90b3942d06b2326fba0403ec24fe912372936", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.0", + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^1.9.0 || ^2.0" + }, + "require-dev": { + "composer/composer": "^2.0", + "php-parallel-lint/php-parallel-lint": "^1.2.0", + "phpstan/phpstan-strict-rules": "^0.11 || ^0.12 || ^1.0" + }, + "type": "composer-plugin", + "extra": { + "class": "PHPStan\\ExtensionInstaller\\Plugin" + }, + "autoload": { + "psr-4": { + "PHPStan\\ExtensionInstaller\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Composer plugin for automatic installation of PHPStan extensions", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpstan/extension-installer/issues", + "source": "https://github.com/phpstan/extension-installer/tree/1.4.3" + }, + "time": "2024-09-04T20:21:43+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "2.1.17", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "89b5ef665716fa2a52ecd2633f21007a6a349053" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/89b5ef665716fa2a52ecd2633f21007a6a349053", + "reference": "89b5ef665716fa2a52ecd2633f21007a6a349053", + "shasum": "" + }, + "require": { + "php": "^7.4|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + } + ], + "time": "2025-05-21T20:55:28+00:00" + }, + { + "name": "phpstan/phpstan-symfony", + "version": "2.0.6", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-symfony.git", + "reference": "5005288e07583546ea00b52de4a9ac412eb869d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/5005288e07583546ea00b52de4a9ac412eb869d7", + "reference": "5005288e07583546ea00b52de4a9ac412eb869d7", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "php": "^7.4 || ^8.0", + "phpstan/phpstan": "^2.1.13" + }, + "conflict": { + "symfony/framework-bundle": "<3.0" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^9.6", + "psr/container": "1.1.2", + "symfony/config": "^5.4 || ^6.1", + "symfony/console": "^5.4 || ^6.1", + "symfony/dependency-injection": "^5.4 || ^6.1", + "symfony/form": "^5.4 || ^6.1", + "symfony/framework-bundle": "^5.4 || ^6.1", + "symfony/http-foundation": "^5.4 || ^6.1", + "symfony/messenger": "^5.4", + "symfony/polyfill-php80": "^1.24", + "symfony/serializer": "^5.4", + "symfony/service-contracts": "^2.2.0" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "extension.neon", + "rules.neon" + ] + } + }, + "autoload": { + "psr-4": { + "PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Lukáš Unger", + "email": "looky.msc@gmail.com", + "homepage": "https://lookyman.net" + } + ], + "description": "Symfony Framework extensions and rules for PHPStan", + "support": { + "issues": "https://github.com/phpstan/phpstan-symfony/issues", + "source": "https://github.com/phpstan/phpstan-symfony/tree/2.0.6" + }, + "time": "2025-05-14T07:00:05+00:00" + }, { "name": "phpunit/php-code-coverage", "version": "10.1.16", @@ -8223,71 +8051,6 @@ ], "time": "2025-05-02T06:46:24+00:00" }, - { - "name": "psalm/plugin-symfony", - "version": "v5.2.6", - "source": { - "type": "git", - "url": "https://github.com/psalm/psalm-plugin-symfony.git", - "reference": "1638f172b4ae5f283ee6b1b58fff3e44aa628742" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/psalm/psalm-plugin-symfony/zipball/1638f172b4ae5f283ee6b1b58fff3e44aa628742", - "reference": "1638f172b4ae5f283ee6b1b58fff3e44aa628742", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "php": "^8.1", - "symfony/framework-bundle": "^5.0 || ^6.0 || ^7.0", - "vimeo/psalm": "^5.16 || dev-master" - }, - "require-dev": { - "doctrine/annotations": "^1.8|^2", - "doctrine/orm": "^2.9", - "phpunit/phpunit": "~7.5 || ~9.5", - "symfony/cache-contracts": "^1.0 || ^2.0", - "symfony/console": "*", - "symfony/form": "^5.0 || ^6.0 || ^7.0", - "symfony/messenger": "^5.0 || ^6.0 || ^7.0", - "symfony/security-core": "*", - "symfony/serializer": "^5.0 || ^6.0 || ^7.0", - "symfony/validator": "*", - "twig/twig": "^2.10 || ^3.0", - "weirdan/codeception-psalm-module": "dev-master" - }, - "suggest": { - "weirdan/doctrine-psalm-plugin": "If Doctrine is used, it is recommended install this plugin" - }, - "type": "psalm-plugin", - "extra": { - "psalm": { - "pluginClass": "Psalm\\SymfonyPsalmPlugin\\Plugin" - } - }, - "autoload": { - "psr-4": { - "Psalm\\SymfonyPsalmPlugin\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Farhad Safarov", - "email": "farhad.safarov@gmail.com" - } - ], - "description": "Psalm Plugin for Symfony", - "support": { - "issues": "https://github.com/psalm/psalm-plugin-symfony/issues", - "source": "https://github.com/psalm/psalm-plugin-symfony/tree/v5.2.6" - }, - "time": "2024-12-21T08:46:26+00:00" - }, { "name": "react/cache", "version": "v1.2.0", @@ -9730,74 +9493,6 @@ ], "time": "2023-02-07T11:34:05+00:00" }, - { - "name": "spatie/array-to-xml", - "version": "3.4.0", - "source": { - "type": "git", - "url": "https://github.com/spatie/array-to-xml.git", - "reference": "7dcfc67d60b0272926dabad1ec01f6b8a5fb5e67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/7dcfc67d60b0272926dabad1ec01f6b8a5fb5e67", - "reference": "7dcfc67d60b0272926dabad1ec01f6b8a5fb5e67", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "php": "^8.0" - }, - "require-dev": { - "mockery/mockery": "^1.2", - "pestphp/pest": "^1.21", - "spatie/pest-plugin-snapshots": "^1.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Spatie\\ArrayToXml\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Freek Van der Herten", - "email": "freek@spatie.be", - "homepage": "https://freek.dev", - "role": "Developer" - } - ], - "description": "Convert an array to xml", - "homepage": "https://github.com/spatie/array-to-xml", - "keywords": [ - "array", - "convert", - "xml" - ], - "support": { - "source": "https://github.com/spatie/array-to-xml/tree/3.4.0" - }, - "funding": [ - { - "url": "https://spatie.be/open-source/support-us", - "type": "custom" - }, - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2024-12-16T12:45:15+00:00" - }, { "name": "symfony/browser-kit", "version": "v6.4.19", @@ -10429,116 +10124,6 @@ ], "time": "2024-03-03T12:36:25+00:00" }, - { - "name": "vimeo/psalm", - "version": "5.26.1", - "source": { - "type": "git", - "url": "https://github.com/vimeo/psalm.git", - "reference": "d747f6500b38ac4f7dfc5edbcae6e4b637d7add0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/d747f6500b38ac4f7dfc5edbcae6e4b637d7add0", - "reference": "d747f6500b38ac4f7dfc5edbcae6e4b637d7add0", - "shasum": "" - }, - "require": { - "amphp/amp": "^2.4.2", - "amphp/byte-stream": "^1.5", - "composer-runtime-api": "^2", - "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^2.0 || ^3.0", - "dnoegel/php-xdg-base-dir": "^0.1.1", - "ext-ctype": "*", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-simplexml": "*", - "ext-tokenizer": "*", - "felixfbecker/advanced-json-rpc": "^3.1", - "felixfbecker/language-server-protocol": "^1.5.2", - "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1 || ^1.0.0", - "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "nikic/php-parser": "^4.17", - "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", - "sebastian/diff": "^4.0 || ^5.0 || ^6.0", - "spatie/array-to-xml": "^2.17.0 || ^3.0", - "symfony/console": "^4.1.6 || ^5.0 || ^6.0 || ^7.0", - "symfony/filesystem": "^5.4 || ^6.0 || ^7.0" - }, - "conflict": { - "nikic/php-parser": "4.17.0" - }, - "provide": { - "psalm/psalm": "self.version" - }, - "require-dev": { - "amphp/phpunit-util": "^2.0", - "bamarni/composer-bin-plugin": "^1.4", - "brianium/paratest": "^6.9", - "ext-curl": "*", - "mockery/mockery": "^1.5", - "nunomaduro/mock-final-classes": "^1.1", - "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpdoc-parser": "^1.6", - "phpunit/phpunit": "^9.6", - "psalm/plugin-mockery": "^1.1", - "psalm/plugin-phpunit": "^0.18", - "slevomat/coding-standard": "^8.4", - "squizlabs/php_codesniffer": "^3.6", - "symfony/process": "^4.4 || ^5.0 || ^6.0 || ^7.0" - }, - "suggest": { - "ext-curl": "In order to send data to shepherd", - "ext-igbinary": "^2.0.5 is required, used to serialize caching data" - }, - "bin": [ - "psalm", - "psalm-language-server", - "psalm-plugin", - "psalm-refactor", - "psalter" - ], - "type": "project", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev", - "dev-2.x": "2.x-dev", - "dev-3.x": "3.x-dev", - "dev-4.x": "4.x-dev", - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psalm\\": "src/Psalm/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matthew Brown" - } - ], - "description": "A static analysis tool for finding errors in PHP applications", - "keywords": [ - "code", - "inspection", - "php", - "static analysis" - ], - "support": { - "docs": "https://psalm.dev/docs", - "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm" - }, - "time": "2024-09-08T18:53:08+00:00" - }, { "name": "vincentlanglet/twig-cs-fixer", "version": "3.7.1", @@ -10615,84 +10200,6 @@ } ], "time": "2025-05-19T12:24:50+00:00" - }, - { - "name": "weirdan/doctrine-psalm-plugin", - "version": "v2.9.0", - "source": { - "type": "git", - "url": "https://github.com/psalm/psalm-plugin-doctrine.git", - "reference": "3db8e55b2ea15373338d2a3eab71c5f5a31c8b08" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/psalm/psalm-plugin-doctrine/zipball/3db8e55b2ea15373338d2a3eab71c5f5a31c8b08", - "reference": "3db8e55b2ea15373338d2a3eab71c5f5a31c8b08", - "shasum": "" - }, - "require": { - "composer/semver": "^1.4 || ^2.0 || ^3.0", - "php": "^7.2 || ^8", - "vimeo/psalm": "^4.28|^5.0" - }, - "conflict": { - "doctrine/collections": "<1.8", - "doctrine/orm": "<2.6", - "doctrine/persistence": "<2.0" - }, - "require-dev": { - "codeception/codeception": "^4.0", - "doctrine/coding-standard": "^9.0", - "doctrine/collections": "^1.8 || ^2.0", - "doctrine/doctrine-bundle": "^1.11 || ^2.0", - "doctrine/orm": "^2.6", - "doctrine/persistence": "^2.0", - "phly/keep-a-changelog": "^2.1", - "squizlabs/php_codesniffer": "^3.3", - "weirdan/codeception-psalm-module": "^0.13.1" - }, - "type": "psalm-plugin", - "extra": { - "psalm": { - "pluginClass": "Weirdan\\DoctrinePsalmPlugin\\Plugin" - } - }, - "autoload": { - "psr-4": { - "Weirdan\\DoctrinePsalmPlugin\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bruce Weirdan", - "email": "weirdan@gmail.com" - } - ], - "description": "Stubs to let Psalm understand Doctrine better", - "keywords": [ - "code", - "dbal", - "doctrine", - "doctrine2", - "extension", - "inspection", - "orm", - "php", - "plugin", - "psalm", - "psalm-plugin", - "static analysis", - "static-analysis" - ], - "support": { - "issues": "https://github.com/psalm/psalm-plugin-doctrine/issues", - "source": "https://github.com/psalm/psalm-plugin-doctrine/tree/v2.9.0" - }, - "time": "2023-07-15T05:44:30+00:00" } ], "aliases": [], diff --git a/phpstan.dist.neon b/phpstan.dist.neon new file mode 100644 index 0000000..e0de575 --- /dev/null +++ b/phpstan.dist.neon @@ -0,0 +1,8 @@ +parameters: + level: 6 + paths: + - bin/ + - config/ + - public/ + - src/ + - tests/ diff --git a/psalm-baseline.xml b/psalm-baseline.xml deleted file mode 100644 index 4710a86..0000000 --- a/psalm-baseline.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - index->get(IndexName::DailyOccurrences->value, $uriVariables['id'])['_source']]]]> - - - - - - index->get(IndexName::DailyOccurrences->value, $uriVariables['id'])['_source']]]> - - - - - index->get(IndexName::Events->value, $uriVariables['id'])['_source']]]]> - - - - - - index->get(IndexName::Events->value, $uriVariables['id'])['_source']]]> - - - - - index->get(IndexName::Locations->value, $uriVariables['id'])['_source']]]]> - - - - - - index->get(IndexName::Locations->value, $uriVariables['id'])['_source']]]> - - - - - index->get(IndexName::Occurrences->value, $uriVariables['id'])['_source']]]]> - - - - - - index->get(IndexName::Occurrences->value, $uriVariables['id'])['_source']]]> - - - - - index->get(IndexName::Organizations->value, $uriVariables['id'])['_source']]]]> - - - - - - index->get(IndexName::Organizations->value, $uriVariables['id'])['_source']]]> - - - - - - - - - - - - - - - - - - - - $indexName, - 'body' => [ - 'settings' => [ - 'number_of_shards' => 5, - 'number_of_replicas' => 0, - ], - ], - ]]]> - - - - - - - - - - - - - - - - - - - - $indexName]]]> - - - - - - - - - diff --git a/psalm.xml b/psalm.xml deleted file mode 100644 index e7fa19e..0000000 --- a/psalm.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - var/cache/dev/App_KernelDevDebugContainer.xml - - - - - diff --git a/symfony.lock b/symfony.lock index 8448a20..b5f3215 100644 --- a/symfony.lock +++ b/symfony.lock @@ -58,6 +58,18 @@ "config/packages/http_discovery.yaml" ] }, + "phpstan/phpstan": { + "version": "2.1", + "recipe": { + "repo": "github.com/symfony/recipes-contrib", + "branch": "main", + "version": "1.0", + "ref": "5e490cc197fb6bb1ae22e5abbc531ddc633b6767" + }, + "files": [ + "phpstan.dist.neon" + ] + }, "phpunit/phpunit": { "version": "10.5", "recipe": { From 263c40058f97865c839a37d3ea165e009e878e44 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Wed, 4 Jun 2025 23:06:33 +0200 Subject: [PATCH 23/35] 4268: Updated PHPStan config --- Taskfile.yml | 6 +++--- phpstan.dist.neon | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index 9c55b4a..7da4de4 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -10,7 +10,7 @@ vars: DOCKER_COMPOSE: '{{.TASK_DOCKER_COMPOSE | default "docker compose"}}' # We're not yet ready to normalize config files … - YAML_FILES_GLOB: "Taskfile.yml .github/workflows/**.{yml,yaml}" + YAML_FILES_GLOB: "Taskfile.yml .github/workflows/**.{yml,yaml} phpstan.dist.neon" tasks: site:update: @@ -163,7 +163,7 @@ tasks: cmds: - task: compose vars: - COMPOSE_ARGS: run --rm prettier {{.YAML_FILES_GLOB}} --write + COMPOSE_ARGS: run --rm prettier --parser yaml {{.YAML_FILES_GLOB}} --write silent: true coding-standards:yaml:check: @@ -172,7 +172,7 @@ tasks: - task: coding-standards:yaml:apply - task: compose vars: - COMPOSE_ARGS: run --rm prettier {{.YAML_FILES_GLOB}} --check + COMPOSE_ARGS: run --rm prettier --parser yaml {{.YAML_FILES_GLOB}} --check silent: true code-analysis: diff --git a/phpstan.dist.neon b/phpstan.dist.neon index e0de575..3a65ed4 100644 --- a/phpstan.dist.neon +++ b/phpstan.dist.neon @@ -6,3 +6,12 @@ parameters: - public/ - src/ - tests/ + + ignoreErrors: + - messages: + - "#Method .+ has parameter .+ with no value type specified in iterable type array.#" + - "#Method .+ return type has no value type specified in iterable type array.#" + - "#Method .+ return type has no value type specified in iterable type iterable.#" + - "#Property .+ type has no value type specified in iterable type array.#" + - messages: + - "#Class .+ implements generic interface .+ but does not specify its types: #" From 248ea02b1d35c088e9b0444ba1e5ddf8397effc7 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Wed, 4 Jun 2025 23:54:50 +0200 Subject: [PATCH 24/35] 4268: Updated "openid" parameters --- src/Api/Filter/ElasticSearch/BooleanFilter.php | 13 ++++++++----- src/Api/Filter/ElasticSearch/DateFilter.php | 13 ++++++++----- src/Api/Filter/ElasticSearch/IdFilter.php | 14 +++++++++----- src/Api/Filter/ElasticSearch/MatchFilter.php | 13 ++++++++----- src/Api/Filter/ElasticSearch/TagFilter.php | 14 +++++++++----- 5 files changed, 42 insertions(+), 25 deletions(-) diff --git a/src/Api/Filter/ElasticSearch/BooleanFilter.php b/src/Api/Filter/ElasticSearch/BooleanFilter.php index 862123a..0d77d94 100644 --- a/src/Api/Filter/ElasticSearch/BooleanFilter.php +++ b/src/Api/Filter/ElasticSearch/BooleanFilter.php @@ -4,6 +4,7 @@ use ApiPlatform\Elasticsearch\Filter\AbstractFilter; use ApiPlatform\Metadata\Operation; +use ApiPlatform\OpenApi\Model\Parameter; use Symfony\Component\PropertyInfo\Type; final class BooleanFilter extends AbstractFilter @@ -39,11 +40,13 @@ public function getDescription(string $resourceClass): array 'required' => false, 'description' => 'Is this a public event', 'is_collection' => false, - 'openapi' => [ - 'allowReserved' => false, - 'allowEmptyValue' => true, - 'explode' => false, - ], + 'openapi' => new Parameter( + name: $filterParameterName, + in: 'query', + allowEmptyValue: true, + explode: false, + allowReserved: false, + ), ]; } diff --git a/src/Api/Filter/ElasticSearch/DateFilter.php b/src/Api/Filter/ElasticSearch/DateFilter.php index 593b0e7..4a6dc22 100644 --- a/src/Api/Filter/ElasticSearch/DateFilter.php +++ b/src/Api/Filter/ElasticSearch/DateFilter.php @@ -7,6 +7,7 @@ use ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface; use ApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface; use ApiPlatform\Metadata\ResourceClassResolverInterface; +use ApiPlatform\OpenApi\Model\Parameter; use App\Model\DateFilterConfig; use Symfony\Component\PropertyInfo\Type; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; @@ -77,11 +78,13 @@ public function getDescription(string $resourceClass): array 'type' => Type::BUILTIN_TYPE_STRING, 'required' => false, 'description' => 'Filter base on ISO 8601 datetime (yyyy-MM-dd\'T\'HH:mm:ssz), e.g. "2004-02-12T15:19:21+00:00" ('.$this->config[$value]->limit->value.')', - 'openapi' => [ - 'allowReserved' => false, - 'allowEmptyValue' => true, - 'explode' => false, - ], + 'openapi' => new Parameter( + name: $filterParameterName, + in: 'query', + allowEmptyValue: true, + explode: false, + allowReserved: false, + ), ]; } diff --git a/src/Api/Filter/ElasticSearch/IdFilter.php b/src/Api/Filter/ElasticSearch/IdFilter.php index f28543b..dbef06b 100644 --- a/src/Api/Filter/ElasticSearch/IdFilter.php +++ b/src/Api/Filter/ElasticSearch/IdFilter.php @@ -4,6 +4,7 @@ use ApiPlatform\Elasticsearch\Filter\AbstractFilter; use ApiPlatform\Metadata\Operation; +use ApiPlatform\OpenApi\Model\Parameter; use Symfony\Component\PropertyInfo\Type; final class IdFilter extends AbstractFilter @@ -42,11 +43,14 @@ public function getDescription(string $resourceClass): array 'required' => false, 'description' => 'Filter based on given entity ids', 'is_collection' => true, - 'openapi' => [ - 'allowReserved' => false, - 'allowEmptyValue' => true, - 'explode' => false, - ], + 'openapi' => new Parameter( + name: $filterParameterName, + in: 'query', + allowEmptyValue: true, + style: 'deepObject', + explode: false, + allowReserved: false, + ), ]; } diff --git a/src/Api/Filter/ElasticSearch/MatchFilter.php b/src/Api/Filter/ElasticSearch/MatchFilter.php index 762a96d..2f5023a 100644 --- a/src/Api/Filter/ElasticSearch/MatchFilter.php +++ b/src/Api/Filter/ElasticSearch/MatchFilter.php @@ -4,6 +4,7 @@ use ApiPlatform\Elasticsearch\Filter\AbstractFilter; use ApiPlatform\Metadata\Operation; +use ApiPlatform\OpenApi\Model\Parameter; use Symfony\Component\PropertyInfo\Type; /** @@ -39,11 +40,13 @@ public function getDescription(string $resourceClass): array 'type' => Type::BUILTIN_TYPE_STRING, 'required' => false, 'description' => 'Search field based on value given', - 'openapi' => [ - 'allowReserved' => false, - 'allowEmptyValue' => true, - 'explode' => false, - ], + 'openapi' => new Parameter( + name: $filterParameterName, + in: 'query', + allowEmptyValue: true, + explode: false, + allowReserved: false, + ), ]; } diff --git a/src/Api/Filter/ElasticSearch/TagFilter.php b/src/Api/Filter/ElasticSearch/TagFilter.php index 67f2786..ef80ada 100644 --- a/src/Api/Filter/ElasticSearch/TagFilter.php +++ b/src/Api/Filter/ElasticSearch/TagFilter.php @@ -4,6 +4,7 @@ use ApiPlatform\Elasticsearch\Filter\AbstractFilter; use ApiPlatform\Metadata\Operation; +use ApiPlatform\OpenApi\Model\Parameter; use Symfony\Component\PropertyInfo\Type; final class TagFilter extends AbstractFilter @@ -39,11 +40,14 @@ public function getDescription(string $resourceClass): array 'required' => false, 'description' => 'Filter based on given tags', 'is_collection' => true, - 'openapi' => [ - 'allowReserved' => false, - 'allowEmptyValue' => true, - 'explode' => false, - ], + 'openapi' => new Parameter( + name: $filterParameterName, + in: 'query', + allowEmptyValue: true, + style: 'deepObject', + explode: false, + allowReserved: false, + ), ]; } From 81dc01ab6c79d4a444cbfcf08f148ab112917880 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Wed, 4 Jun 2025 23:55:06 +0200 Subject: [PATCH 25/35] 4268: Fixed return type --- tests/ApiPlatform/AbstractApiTestCase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ApiPlatform/AbstractApiTestCase.php b/tests/ApiPlatform/AbstractApiTestCase.php index cf3b9b0..fa0ed9c 100644 --- a/tests/ApiPlatform/AbstractApiTestCase.php +++ b/tests/ApiPlatform/AbstractApiTestCase.php @@ -4,7 +4,7 @@ use ApiPlatform\Symfony\Bundle\Test\ApiTestCase; use ApiPlatform\Symfony\Bundle\Test\Client; -use ApiPlatform\Symfony\Bundle\Test\Response; +use Symfony\Contracts\HttpClient\ResponseInterface; abstract class AbstractApiTestCase extends ApiTestCase { @@ -22,7 +22,7 @@ protected static function createAuthenticatedClient(): Client ]); } - protected function get(array $query, ?string $path = null, bool $authenticated = true): Response + protected function get(array $query, ?string $path = null, bool $authenticated = true): ResponseInterface { $path ??= static::$requestPath; From 582854f98603c1df8fd364971ce4a2cf8e7a6028 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Thu, 5 Jun 2025 00:03:31 +0200 Subject: [PATCH 26/35] 4268: Updated PHPStan config --- phpstan.dist.neon | 3 +++ 1 file changed, 3 insertions(+) diff --git a/phpstan.dist.neon b/phpstan.dist.neon index 3a65ed4..b11ebc5 100644 --- a/phpstan.dist.neon +++ b/phpstan.dist.neon @@ -7,6 +7,9 @@ parameters: - src/ - tests/ + excludePaths: + - tests/bootstrap.php + ignoreErrors: - messages: - "#Method .+ has parameter .+ with no value type specified in iterable type array.#" From d081e6cac3e548662d770c464169e630d3974787 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Thu, 5 Jun 2025 00:06:23 +0200 Subject: [PATCH 27/35] 4268: Added function parameter types --- src/Api/Filter/ElasticSearch/DateRangeFilter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Api/Filter/ElasticSearch/DateRangeFilter.php b/src/Api/Filter/ElasticSearch/DateRangeFilter.php index 8aff932..7370b08 100644 --- a/src/Api/Filter/ElasticSearch/DateRangeFilter.php +++ b/src/Api/Filter/ElasticSearch/DateRangeFilter.php @@ -80,7 +80,7 @@ public function getDescription(string $resourceClass): array return $description; } - private function getElasticSearchQueryRanges($property, $filter): array + private function getElasticSearchQueryRanges(string $property, string|array $filter): array { if (null === $this->properties) { throw new \InvalidArgumentException('The property must be defined in the filter.'); From f3569d4d3ea9092967670f689a594542258762b2 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Thu, 5 Jun 2025 00:06:56 +0200 Subject: [PATCH 28/35] 4268: Cleaned up API user provider --- src/Security/ApiUserProvider.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Security/ApiUserProvider.php b/src/Security/ApiUserProvider.php index 840c8e6..2e09fbe 100644 --- a/src/Security/ApiUserProvider.php +++ b/src/Security/ApiUserProvider.php @@ -3,6 +3,7 @@ namespace App\Security; use Symfony\Component\Security\Core\Exception\UserNotFoundException; +use Symfony\Component\Security\Core\User\UserInterface; use Symfony\Component\Security\Core\User\UserInterface as TUser; use Symfony\Component\Security\Core\User\UserProviderInterface; @@ -13,16 +14,16 @@ class ApiUserProvider implements UserProviderInterface { private array $users = []; - public function __construct(private array $apikeys = []) + public function __construct(array $apikeys = []) { foreach ($apikeys as $apikey) { $this->users[$apikey['apikey']] = new ApiUser($apikey['username']); } } - public function refreshUser(TUser $user): void + public function refreshUser(TUser $user): UserInterface { - // Do nothing + return $user; } public function supportsClass(string $class): bool From 89575456cdb7c388c4e68a8190552bd0dd7dd6db Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Thu, 5 Jun 2025 00:19:47 +0200 Subject: [PATCH 29/35] 4268: Updated PHPStan config --- phpstan.dist.neon | 3 +++ 1 file changed, 3 insertions(+) diff --git a/phpstan.dist.neon b/phpstan.dist.neon index b11ebc5..62b59e7 100644 --- a/phpstan.dist.neon +++ b/phpstan.dist.neon @@ -18,3 +18,6 @@ parameters: - "#Property .+ type has no value type specified in iterable type array.#" - messages: - "#Class .+ implements generic interface .+ but does not specify its types: #" + - messages: + # The ID properties are set by API Platform. + - "#Property App\\\\Api\\\\Dto\\\\[^\\\\]+::\\$id is unused#" From 6df3792d4d2658b86c26d031a7ea7d80001ac7be Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Thu, 5 Jun 2025 00:39:39 +0200 Subject: [PATCH 30/35] 4268: Removed superfluous property --- src/Api/Dto/Tag.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Api/Dto/Tag.php b/src/Api/Dto/Tag.php index 5b843cd..0676b1f 100644 --- a/src/Api/Dto/Tag.php +++ b/src/Api/Dto/Tag.php @@ -52,9 +52,6 @@ )] readonly class Tag { - #[ApiProperty(identifier: false)] - private ?int $id; - #[ApiProperty(identifier: true)] public string $slug; From ceaa3244aa69ba0b3d875b5c9492bf3ac91d6dc7 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Tue, 10 Jun 2025 14:51:04 +0200 Subject: [PATCH 31/35] 4268: Added more event filter tests --- tests/ApiPlatform/EventsFilterTest.php | 35 ++++++++++++++++++-------- tests/resources/events.json | 6 +++-- 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/tests/ApiPlatform/EventsFilterTest.php b/tests/ApiPlatform/EventsFilterTest.php index 2cdff85..dc5b485 100644 --- a/tests/ApiPlatform/EventsFilterTest.php +++ b/tests/ApiPlatform/EventsFilterTest.php @@ -104,17 +104,32 @@ public static function getEventsProvider(): iterable ]; // @todo Does tags filtering use the tag slug or name? - // yield [ - // ['tags' => 'for børn'], - // 0, - // 'Events tagged with "for børn"', - // ]; + // yield [ + // ['tags' => 'for børn'], + // 0, + // 'Events tagged with "for børn"', + // ]; // - // yield [ - // ['tags' => 'for-boern'], - // 1, - // 'Events tagged with "for-boern"', - // ]; + // yield [ + // ['tags' => 'for-boern'], + // 1, + // 'Events tagged with "for-boern"', + // ]; + + // @todo It seems that filtering in tags use som sort of "contains word" + // stuff, i.e. we can match the tag "for-boern" by filtering on "boern" + // or on "for" – but not on "for-boern" … + yield [ + ['tags' => 'boern'], + 1, + 'Events tagged with "boern"', + ]; + + yield [ + ['tags' => 'for'], + 2, + 'Events tagged with "for"', + ]; // Combined filters. yield [ diff --git a/tests/resources/events.json b/tests/resources/events.json index 11d4cc0..a60c872 100644 --- a/tests/resources/events.json +++ b/tests/resources/events.json @@ -55,7 +55,8 @@ "tags": [ "aros", "theoceanraceaarhus", - "ITKDev" + "ITKDev", + "for-dyr" ], "imageUrls": { "small": "media\/cache\/resolve\/small\/438d0b1f\/00bae8ff00e64832de73422f17a605ba391edc05b2458a786d4e8a11243e2162.png", @@ -224,7 +225,8 @@ "aros", "theoceanraceaarhus", "ITKDev", - "For b\u00f8rn" + "For b\u00f8rn", + "for-boern" ], "imageUrls": { "small": "media\/cache\/resolve\/small\/438d0b1f\/00bae8ff00e64832de73422f17a605ba391edc05b2458a786d4e8a11243e2162.png", From db7ea74b8aafff6623945077ba44f5f07f672181 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Tue, 10 Jun 2025 14:51:20 +0200 Subject: [PATCH 32/35] 4268: Cleaned up task file --- .github/workflows/pr.yaml | 2 +- Taskfile.yml | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 84ea1fa..b2bf280 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -83,7 +83,7 @@ jobs: - name: Export API specification run: | - task --yes apispec:export + task --yes api:spec:export - name: Check for changes in specification run: git diff --diff-filter=ACMRT --exit-code public/spec.yaml diff --git a/Taskfile.yml b/Taskfile.yml index 7da4de4..9ea978e 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -63,13 +63,6 @@ tasks: # Loading some fixtures generates an 'Warning: Undefined array key "entityId"' error. ignore_error: true - api:test: - desc: Run API tests - cmds: - - task: compose - vars: - COMPOSE_ARGS: exec phpfpm bin/phpunit - composer: desc: "Run `composer` command. Example: task composer -- normalize" cmds: @@ -189,7 +182,14 @@ tasks: COMPOSE_ARGS: exec phpfpm vendor/bin/phpstan silent: true - apispec:export: + api:test: + desc: Run API tests + cmds: + - task: compose + vars: + COMPOSE_ARGS: exec phpfpm bin/phpunit + + api:spec:export: desc: Export API spec cmds: - task: console From 6123fe91ae04775d61e7609581c82c4ab7392f0b Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Wed, 11 Jun 2025 12:31:13 +0200 Subject: [PATCH 33/35] 4268: Moved YAML action to separate workflow file --- .github/workflows/pr.yaml | 19 ------------------- .github/workflows/yaml.yaml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/yaml.yaml diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index b2bf280..8933119 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -29,25 +29,6 @@ jobs: run: | task --yes api:test - coding-standards-yaml: - name: Coding standards YAML - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - # https://taskfile.dev/installation/#github-actions - - uses: arduino/setup-task@v2 - - - run: | - docker network create frontend - - - name: Check YAML coding standards - run: | - task --yes coding-standards:yaml:check - - - name: Check that nothing has changed - run: git diff --exit-code - code-analysis-phpstan: runs-on: ubuntu-latest name: PHPStan static analysis diff --git a/.github/workflows/yaml.yaml b/.github/workflows/yaml.yaml new file mode 100644 index 0000000..89a2ad3 --- /dev/null +++ b/.github/workflows/yaml.yaml @@ -0,0 +1,33 @@ +# Do not edit this file! Make a pull request on changing +# github/workflows/symfony/yaml.yaml in +# https://github.com/itk-dev/devops_itkdev-docker if need be. + +### ### Symfony YAML +### +### Validates Symfony YAML files. +### +### #### Assumptions +### +### 1. A docker compose service named `prettier` for running +### [Prettier](https://prettier.io/) exists. + +name: YAML + +on: + pull_request: + push: + branches: + - main + - develop + +jobs: + yaml-lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - run: | + docker network create frontend + + - run: | + docker compose run --rm prettier '.github/workflows/*.{yml,yaml}' 'config/**/*.{yml,yaml}' --check From 81cdc2dc5e42cb327e3ab9e3d8be1ae51dce04b2 Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Wed, 11 Jun 2025 12:31:59 +0200 Subject: [PATCH 34/35] 4268: Linted YAML files --- CHANGELOG.md | 2 + Taskfile.yml | 2 +- config/packages/api_platform.yaml | 114 ++++++++++++------------ config/packages/cache.yaml | 28 +++--- config/packages/framework.yaml | 40 ++++----- config/packages/http_discovery.yaml | 16 ++-- config/packages/nelmio_cors.yaml | 18 ++-- config/packages/routing.yaml | 16 ++-- config/packages/security.yaml | 76 ++++++++-------- config/packages/twig.yaml | 10 +-- config/packages/validator.yaml | 18 ++-- config/packages/web_profiler.yaml | 14 +-- config/routes.yaml | 8 +- config/routes/api_platform.yaml | 6 +- config/routes/framework.yaml | 6 +- config/routes/security.yaml | 4 +- config/routes/web_profiler.yaml | 12 +-- config/services.yaml | 131 ++++++++++++++-------------- 18 files changed, 261 insertions(+), 260 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34ac90b..ee9f165 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ See [keep a changelog] for information about writing changes to this log. ## [Unreleased] +- [PR-21](https://github.com/itk-dev/event-database-api/pull/21) + Linted YAML - [PR-18](https://github.com/itk-dev/event-database-api/pull/18) - Updated docker compose setup - Added simple API tests and resolved some deprecations diff --git a/Taskfile.yml b/Taskfile.yml index 9ea978e..9646ba6 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -10,7 +10,7 @@ vars: DOCKER_COMPOSE: '{{.TASK_DOCKER_COMPOSE | default "docker compose"}}' # We're not yet ready to normalize config files … - YAML_FILES_GLOB: "Taskfile.yml .github/workflows/**.{yml,yaml} phpstan.dist.neon" + YAML_FILES_GLOB: "'.github/workflows/*.{yml,yaml}' 'config/**/*.{yml,yaml}' Taskfile.yml phpstan.dist.neon" tasks: site:update: diff --git a/config/packages/api_platform.yaml b/config/packages/api_platform.yaml index 44441f1..29f82bf 100644 --- a/config/packages/api_platform.yaml +++ b/config/packages/api_platform.yaml @@ -1,58 +1,58 @@ api_platform: - title: '%env(OPENAPI_TITLE)%' - description: '%env(OPENAPI_DESCRIPTION)%' - version: 2.0.0 - show_webby: false - - openapi: - contact: - name: '%env(OPENAPI_CONTACT_NAME)%' - url: '%env(OPENAPI_CONTACT_URL)%' - email: '%env(OPENAPI_CONTACT_EMAIL)%' - termsOfService: '%env(OPENAPI_TERMS_OF_SERVICE)%' - - formats: - jsonld: ['application/ld+json'] - - docs_formats: - jsonld: ['application/ld+json'] - jsonopenapi: ['application/vnd.openapi+json'] - html: ['text/html'] - - mapping: - paths: - - '%kernel.project_dir%/src/Api/Dto' - - doctrine: - enabled: false - - swagger: - api_keys: - ApiKeyAuth: - name: 'X-Api-Key' - type: header - - elasticsearch: - hosts: ['%env(INDEX_URL)%'] - - defaults: - stateless: true - pagination_items_per_page: '%env(int:PAGINATION_ITEMS_PER_PAGE)%' - pagination_maximum_items_per_page: '%env(int:PAGINATION_MAXIMUM_ITEMS_PER_PAGE)%' - cache_headers: - max_age: 3600 - shared_max_age: 3600 - vary: ['Content-Type', 'Authorization', 'Origin'] - extra_properties: - # Note: The api-platform/core 3.4 recipe sets `standard_put` eventhough - # https://api-platform.com/docs/core/upgrade-guide/#api-platform-34 - # (probably) tells us to remove it - # standard_put: true - # https://api-platform.com/docs/core/upgrade-guide/#api-platform-34 - rfc_7807_compliant_errors: true - # Note: The api-platform/core 3.4 recipe wants `use_symfony_listeners` to be true - use_symfony_listeners: false - - # https://api-platform.com/docs/core/upgrade-guide/#upgrade-guide - serializer: - hydra_prefix: true + title: "%env(OPENAPI_TITLE)%" + description: "%env(OPENAPI_DESCRIPTION)%" + version: 2.0.0 + show_webby: false + + openapi: + contact: + name: "%env(OPENAPI_CONTACT_NAME)%" + url: "%env(OPENAPI_CONTACT_URL)%" + email: "%env(OPENAPI_CONTACT_EMAIL)%" + termsOfService: "%env(OPENAPI_TERMS_OF_SERVICE)%" + + formats: + jsonld: ["application/ld+json"] + + docs_formats: + jsonld: ["application/ld+json"] + jsonopenapi: ["application/vnd.openapi+json"] + html: ["text/html"] + + mapping: + paths: + - "%kernel.project_dir%/src/Api/Dto" + + doctrine: + enabled: false + + swagger: + api_keys: + ApiKeyAuth: + name: "X-Api-Key" + type: header + + elasticsearch: + hosts: ["%env(INDEX_URL)%"] + + defaults: + stateless: true + pagination_items_per_page: "%env(int:PAGINATION_ITEMS_PER_PAGE)%" + pagination_maximum_items_per_page: "%env(int:PAGINATION_MAXIMUM_ITEMS_PER_PAGE)%" + cache_headers: + max_age: 3600 + shared_max_age: 3600 + vary: ["Content-Type", "Authorization", "Origin"] + extra_properties: + # Note: The api-platform/core 3.4 recipe sets `standard_put` eventhough + # https://api-platform.com/docs/core/upgrade-guide/#api-platform-34 + # (probably) tells us to remove it + # standard_put: true + # https://api-platform.com/docs/core/upgrade-guide/#api-platform-34 + rfc_7807_compliant_errors: true + # Note: The api-platform/core 3.4 recipe wants `use_symfony_listeners` to be true + use_symfony_listeners: false + + # https://api-platform.com/docs/core/upgrade-guide/#upgrade-guide + serializer: + hydra_prefix: true diff --git a/config/packages/cache.yaml b/config/packages/cache.yaml index 6899b72..72cca01 100644 --- a/config/packages/cache.yaml +++ b/config/packages/cache.yaml @@ -1,19 +1,19 @@ framework: - cache: - # Unique name of your app: used to compute stable namespaces for cache keys. - #prefix_seed: your_vendor_name/app_name + cache: + # Unique name of your app: used to compute stable namespaces for cache keys. + #prefix_seed: your_vendor_name/app_name - # The "app" cache stores to the filesystem by default. - # The data in this cache should persist between deploys. - # Other options include: + # The "app" cache stores to the filesystem by default. + # The data in this cache should persist between deploys. + # Other options include: - # Redis - #app: cache.adapter.redis - #default_redis_provider: redis://localhost + # Redis + #app: cache.adapter.redis + #default_redis_provider: redis://localhost - # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) - #app: cache.adapter.apcu + # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) + #app: cache.adapter.apcu - # Namespaced pools use the above "app" backend by default - #pools: - #my.dedicated.cache: null + # Namespaced pools use the above "app" backend by default + #pools: + #my.dedicated.cache: null diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml index 7d97622..3db7510 100644 --- a/config/packages/framework.yaml +++ b/config/packages/framework.yaml @@ -1,27 +1,27 @@ # see https://symfony.com/doc/current/reference/configuration/framework.html framework: - secret: '%env(APP_SECRET)%' - annotations: false - http_method_override: false - handle_all_throwables: true + secret: "%env(APP_SECRET)%" + annotations: false + http_method_override: false + handle_all_throwables: true - # Enables session support. Note that the session will ONLY be started if you read or write from it. - # Remove or comment this section to explicitly disable session support. - session: - handler_id: null - cookie_secure: auto - cookie_samesite: lax + # Enables session support. Note that the session will ONLY be started if you read or write from it. + # Remove or comment this section to explicitly disable session support. + session: + handler_id: null + cookie_secure: auto + cookie_samesite: lax - #esi: true - #fragments: true - php_errors: - log: true + #esi: true + #fragments: true + php_errors: + log: true - assets: - base_path: '%env(APP_PATH_PREFIX)%' + assets: + base_path: "%env(APP_PATH_PREFIX)%" when@test: - framework: - test: true - session: - storage_factory_id: session.storage.factory.mock_file + framework: + test: true + session: + storage_factory_id: session.storage.factory.mock_file diff --git a/config/packages/http_discovery.yaml b/config/packages/http_discovery.yaml index 2a789e7..3e7ef4b 100644 --- a/config/packages/http_discovery.yaml +++ b/config/packages/http_discovery.yaml @@ -1,10 +1,10 @@ services: - Psr\Http\Message\RequestFactoryInterface: '@http_discovery.psr17_factory' - Psr\Http\Message\ResponseFactoryInterface: '@http_discovery.psr17_factory' - Psr\Http\Message\ServerRequestFactoryInterface: '@http_discovery.psr17_factory' - Psr\Http\Message\StreamFactoryInterface: '@http_discovery.psr17_factory' - Psr\Http\Message\UploadedFileFactoryInterface: '@http_discovery.psr17_factory' - Psr\Http\Message\UriFactoryInterface: '@http_discovery.psr17_factory' + Psr\Http\Message\RequestFactoryInterface: "@http_discovery.psr17_factory" + Psr\Http\Message\ResponseFactoryInterface: "@http_discovery.psr17_factory" + Psr\Http\Message\ServerRequestFactoryInterface: "@http_discovery.psr17_factory" + Psr\Http\Message\StreamFactoryInterface: "@http_discovery.psr17_factory" + Psr\Http\Message\UploadedFileFactoryInterface: "@http_discovery.psr17_factory" + Psr\Http\Message\UriFactoryInterface: "@http_discovery.psr17_factory" - http_discovery.psr17_factory: - class: Http\Discovery\Psr17Factory + http_discovery.psr17_factory: + class: Http\Discovery\Psr17Factory diff --git a/config/packages/nelmio_cors.yaml b/config/packages/nelmio_cors.yaml index 8977033..12577e6 100644 --- a/config/packages/nelmio_cors.yaml +++ b/config/packages/nelmio_cors.yaml @@ -1,10 +1,10 @@ nelmio_cors: - defaults: - origin_regex: true - allow_origin: ['%env(CORS_ALLOW_ORIGIN)%'] - allow_methods: ['GET', 'OPTIONS'] - allow_headers: ['Content-Type', 'X-Api-Key'] - expose_headers: ['Link'] - max_age: 3600 - paths: - '^/': null + defaults: + origin_regex: true + allow_origin: ["%env(CORS_ALLOW_ORIGIN)%"] + allow_methods: ["GET", "OPTIONS"] + allow_headers: ["Content-Type", "X-Api-Key"] + expose_headers: ["Link"] + max_age: 3600 + paths: + "^/": null diff --git a/config/packages/routing.yaml b/config/packages/routing.yaml index 4b766ce..c0f1474 100644 --- a/config/packages/routing.yaml +++ b/config/packages/routing.yaml @@ -1,12 +1,12 @@ framework: - router: - utf8: true + router: + utf8: true - # Configure how to generate URLs in non-HTTP contexts, such as CLI commands. - # See https://symfony.com/doc/current/routing.html#generating-urls-in-commands - #default_uri: http://localhost + # Configure how to generate URLs in non-HTTP contexts, such as CLI commands. + # See https://symfony.com/doc/current/routing.html#generating-urls-in-commands + #default_uri: http://localhost when@prod: - framework: - router: - strict_requirements: null + framework: + router: + strict_requirements: null diff --git a/config/packages/security.yaml b/config/packages/security.yaml index 0d1e5f5..ee040de 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -1,44 +1,44 @@ security: - # https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords - password_hashers: - Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto' - # https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider - providers: - users_in_memory: { memory: null } - api_user_provider: - id: App\Security\ApiUserProvider - firewalls: - dev: - pattern: ^/(_(profiler|wdt)|css|images|js)/ - security: false - main: - stateless: true - custom_authenticators: - - App\Security\ApiKeyAuthenticator - provider: api_user_provider + # https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords + password_hashers: + Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: "auto" + # https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider + providers: + users_in_memory: { memory: null } + api_user_provider: + id: App\Security\ApiUserProvider + firewalls: + dev: + pattern: ^/(_(profiler|wdt)|css|images|js)/ + security: false + main: + stateless: true + custom_authenticators: + - App\Security\ApiKeyAuthenticator + provider: api_user_provider - # activate different ways to authenticate - # https://symfony.com/doc/current/security.html#the-firewall + # activate different ways to authenticate + # https://symfony.com/doc/current/security.html#the-firewall - # https://symfony.com/doc/current/security/impersonating_user.html - # switch_user: true + # https://symfony.com/doc/current/security/impersonating_user.html + # switch_user: true - # Easy way to control access for large sections of your site - # Note: Only the *first* access control that matches will be used - access_control: - - { path: ^/api/v2/docs, roles: PUBLIC_ACCESS } - - { path: ^/api, roles: IS_AUTHENTICATED_FULLY } - # - { path: ^/profile, roles: ROLE_USER } + # Easy way to control access for large sections of your site + # Note: Only the *first* access control that matches will be used + access_control: + - { path: ^/api/v2/docs, roles: PUBLIC_ACCESS } + - { path: ^/api, roles: IS_AUTHENTICATED_FULLY } + # - { path: ^/profile, roles: ROLE_USER } when@test: - security: - password_hashers: - # By default, password hashers are resource intensive and take time. This is - # important to generate secure password hashes. In tests however, secure hashes - # are not important, waste resources and increase test times. The following - # reduces the work factor to the lowest possible values. - Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: - algorithm: auto - cost: 4 # Lowest possible value for bcrypt - time_cost: 3 # Lowest possible value for argon - memory_cost: 10 # Lowest possible value for argon + security: + password_hashers: + # By default, password hashers are resource intensive and take time. This is + # important to generate secure password hashes. In tests however, secure hashes + # are not important, waste resources and increase test times. The following + # reduces the work factor to the lowest possible values. + Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: + algorithm: auto + cost: 4 # Lowest possible value for bcrypt + time_cost: 3 # Lowest possible value for argon + memory_cost: 10 # Lowest possible value for argon diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml index b46e8b3..43c7276 100644 --- a/config/packages/twig.yaml +++ b/config/packages/twig.yaml @@ -1,9 +1,9 @@ twig: - file_name_pattern: '*.twig' + file_name_pattern: "*.twig" - globals: - app_project_uri: '%env(APP_PROJECT_URI)%' + globals: + app_project_uri: "%env(APP_PROJECT_URI)%" when@test: - twig: - strict_variables: true + twig: + strict_variables: true diff --git a/config/packages/validator.yaml b/config/packages/validator.yaml index 0201281..876481d 100644 --- a/config/packages/validator.yaml +++ b/config/packages/validator.yaml @@ -1,13 +1,13 @@ framework: - validation: - email_validation_mode: html5 + validation: + email_validation_mode: html5 - # Enables validator auto-mapping support. - # For instance, basic validation constraints will be inferred from Doctrine's metadata. - #auto_mapping: - # App\Entity\: [] + # Enables validator auto-mapping support. + # For instance, basic validation constraints will be inferred from Doctrine's metadata. + #auto_mapping: + # App\Entity\: [] when@test: - framework: - validation: - not_compromised_password: false + framework: + validation: + not_compromised_password: false diff --git a/config/packages/web_profiler.yaml b/config/packages/web_profiler.yaml index 1e039b7..1e77fbc 100644 --- a/config/packages/web_profiler.yaml +++ b/config/packages/web_profiler.yaml @@ -1,11 +1,11 @@ when@dev: - web_profiler: - toolbar: true + web_profiler: + toolbar: true - framework: - profiler: - collect_serializer_data: true + framework: + profiler: + collect_serializer_data: true when@test: - framework: - profiler: { collect: false } + framework: + profiler: { collect: false } diff --git a/config/routes.yaml b/config/routes.yaml index 41ef814..2d0ef99 100644 --- a/config/routes.yaml +++ b/config/routes.yaml @@ -1,5 +1,5 @@ controllers: - resource: - path: ../src/Controller/ - namespace: App\Controller - type: attribute + resource: + path: ../src/Controller/ + namespace: App\Controller + type: attribute diff --git a/config/routes/api_platform.yaml b/config/routes/api_platform.yaml index 6dbbb2d..251216e 100644 --- a/config/routes/api_platform.yaml +++ b/config/routes/api_platform.yaml @@ -1,4 +1,4 @@ api_platform: - resource: . - type: api_platform - prefix: '%api.path_prefix%' + resource: . + type: api_platform + prefix: "%api.path_prefix%" diff --git a/config/routes/framework.yaml b/config/routes/framework.yaml index 0fc74bb..cce01c1 100644 --- a/config/routes/framework.yaml +++ b/config/routes/framework.yaml @@ -1,4 +1,4 @@ when@dev: - _errors: - resource: '@FrameworkBundle/Resources/config/routing/errors.xml' - prefix: /_error + _errors: + resource: "@FrameworkBundle/Resources/config/routing/errors.xml" + prefix: /_error diff --git a/config/routes/security.yaml b/config/routes/security.yaml index f853be1..3cb5ef0 100644 --- a/config/routes/security.yaml +++ b/config/routes/security.yaml @@ -1,3 +1,3 @@ _security_logout: - resource: security.route_loader.logout - type: service + resource: security.route_loader.logout + type: service diff --git a/config/routes/web_profiler.yaml b/config/routes/web_profiler.yaml index 8d85319..e004603 100644 --- a/config/routes/web_profiler.yaml +++ b/config/routes/web_profiler.yaml @@ -1,8 +1,8 @@ when@dev: - web_profiler_wdt: - resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml' - prefix: /_wdt + web_profiler_wdt: + resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml" + prefix: /_wdt - web_profiler_profiler: - resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml' - prefix: /_profiler + web_profiler_profiler: + resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml" + prefix: /_profiler diff --git a/config/services.yaml b/config/services.yaml index 662a287..42e9aae 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -4,71 +4,70 @@ # Put parameters here that don't need to change on each machine where the app is deployed # https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration parameters: - api.path_prefix: '%env(string:APP_PATH_PREFIX)%' + api.path_prefix: "%env(string:APP_PATH_PREFIX)%" services: - # default configuration for services in *this* file - _defaults: - autowire: true # Automatically injects dependencies in your services. - autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. - - # makes classes in src/ available to be used as services - # this creates a service per class whose id is the fully-qualified class name - App\: - resource: '../src/' - exclude: - - '../src/DependencyInjection/' - - '../src/Entity/' - - '../src/Kernel.php' - - # add more service definitions when explicit configuration is needed - # please note that last definitions always *replace* previous ones - - - App\Api\State\AbstractProvider: - arguments: - $filterLocator: '@api_platform.filter_locator' - - App\Api\State\DailyOccurrenceRepresentationProvider: - arguments: - $filterLocator: '@api_platform.filter_locator' - - App\Api\State\EventRepresentationProvider: - arguments: - $filterLocator: '@api_platform.filter_locator' - - App\Api\State\LocationRepresentationProvider: - arguments: - $filterLocator: '@api_platform.filter_locator' - - App\Api\State\OccurrenceRepresentationProvider: - arguments: - $filterLocator: '@api_platform.filter_locator' - - App\Api\State\OrganizationRepresentationProvider: - arguments: - $filterLocator: '@api_platform.filter_locator' - - App\Api\State\TagRepresentationProvider: - arguments: - $filterLocator: '@api_platform.filter_locator' - - App\Api\State\VocabularyRepresentationProvider: - arguments: - $filterLocator: '@api_platform.filter_locator' - - App\Command\FixturesLoadCommand: - arguments: - $appEnv: '%env(string:APP_ENV)%' - - App\Security\ApiUserProvider: - arguments: - $apikeys: '%env(json:APP_API_KEYS)%' - - Elastic\Elasticsearch\Client: - factory: [ '@Elastic\Elasticsearch\ClientBuilder', fromConfig ] - arguments: - $config: - hosts: [ '%env(INDEX_URL)%' ] - - Elastic\Elasticsearch\ClientBuilder: ~ + # default configuration for services in *this* file + _defaults: + autowire: true # Automatically injects dependencies in your services. + autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. + + # makes classes in src/ available to be used as services + # this creates a service per class whose id is the fully-qualified class name + App\: + resource: "../src/" + exclude: + - "../src/DependencyInjection/" + - "../src/Entity/" + - "../src/Kernel.php" + + # add more service definitions when explicit configuration is needed + # please note that last definitions always *replace* previous ones + + App\Api\State\AbstractProvider: + arguments: + $filterLocator: "@api_platform.filter_locator" + + App\Api\State\DailyOccurrenceRepresentationProvider: + arguments: + $filterLocator: "@api_platform.filter_locator" + + App\Api\State\EventRepresentationProvider: + arguments: + $filterLocator: "@api_platform.filter_locator" + + App\Api\State\LocationRepresentationProvider: + arguments: + $filterLocator: "@api_platform.filter_locator" + + App\Api\State\OccurrenceRepresentationProvider: + arguments: + $filterLocator: "@api_platform.filter_locator" + + App\Api\State\OrganizationRepresentationProvider: + arguments: + $filterLocator: "@api_platform.filter_locator" + + App\Api\State\TagRepresentationProvider: + arguments: + $filterLocator: "@api_platform.filter_locator" + + App\Api\State\VocabularyRepresentationProvider: + arguments: + $filterLocator: "@api_platform.filter_locator" + + App\Command\FixturesLoadCommand: + arguments: + $appEnv: "%env(string:APP_ENV)%" + + App\Security\ApiUserProvider: + arguments: + $apikeys: "%env(json:APP_API_KEYS)%" + + Elastic\Elasticsearch\Client: + factory: ['@Elastic\Elasticsearch\ClientBuilder', fromConfig] + arguments: + $config: + hosts: ["%env(INDEX_URL)%"] + + Elastic\Elasticsearch\ClientBuilder: ~ From 8f7f777dbb167ff06b28945c0cc9294dae98062e Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Thu, 12 Jun 2025 10:22:52 +0200 Subject: [PATCH 35/35] 4268: Re-linted YAML files --- .editorconfig | 4 + .github/workflows/yaml.yaml | 2 +- .prettierignore | 2 + .prettierrc.yaml | 8 ++ .woodpecker/prod.yml | 2 +- CHANGELOG.md | 2 + Taskfile.yml | 7 +- config/packages/api_platform.yaml | 114 ++++++++++++------------ config/packages/cache.yaml | 28 +++--- config/packages/framework.yaml | 40 ++++----- config/packages/http_discovery.yaml | 16 ++-- config/packages/nelmio_cors.yaml | 18 ++-- config/packages/routing.yaml | 16 ++-- config/packages/security.yaml | 76 ++++++++-------- config/packages/twig.yaml | 10 +-- config/packages/validator.yaml | 18 ++-- config/packages/web_profiler.yaml | 14 +-- config/routes.yaml | 8 +- config/routes/api_platform.yaml | 6 +- config/routes/framework.yaml | 6 +- config/routes/security.yaml | 4 +- config/routes/web_profiler.yaml | 12 +-- config/services.yaml | 130 ++++++++++++++-------------- docker-compose.override.yml | 8 +- docker-compose.yml | 12 +-- 25 files changed, 290 insertions(+), 273 deletions(-) create mode 100644 .prettierignore create mode 100644 .prettierrc.yaml diff --git a/.editorconfig b/.editorconfig index a337c28..28cdf62 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,3 +12,7 @@ indent_size = 4 [*.{yml,yaml}] indent_size = 2 + +# Symfony uses 4 spaces for indent +[config/**/*.{yml,yaml}] +indent_size = 4 diff --git a/.github/workflows/yaml.yaml b/.github/workflows/yaml.yaml index 89a2ad3..8283efc 100644 --- a/.github/workflows/yaml.yaml +++ b/.github/workflows/yaml.yaml @@ -30,4 +30,4 @@ jobs: docker network create frontend - run: | - docker compose run --rm prettier '.github/workflows/*.{yml,yaml}' 'config/**/*.{yml,yaml}' --check + docker compose run --rm prettier '**/*.{yml,yaml}' --check diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..b6d0eee --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +# API spec +public/spec.yaml diff --git a/.prettierrc.yaml b/.prettierrc.yaml new file mode 100644 index 0000000..1a7f750 --- /dev/null +++ b/.prettierrc.yaml @@ -0,0 +1,8 @@ +# https://prettier.io/docs/configuration +overrides: + # Symfony config + - files: + - "config/**/*.{yml,yaml}" + options: + tabWidth: 4 + singleQuote: true diff --git a/.woodpecker/prod.yml b/.woodpecker/prod.yml index 4a548e1..f1adec9 100644 --- a/.woodpecker/prod.yml +++ b/.woodpecker/prod.yml @@ -21,6 +21,6 @@ steps: from_secret: prod_path user: from_secret: user - playbook: 'release' + playbook: "release" pre_up: - itkdev-docker-compose-server run --rm phpfpm bin/console cache:clear diff --git a/CHANGELOG.md b/CHANGELOG.md index ee9f165..62b2c42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ See [keep a changelog] for information about writing changes to this log. ## [Unreleased] +- [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) Linted YAML - [PR-18](https://github.com/itk-dev/event-database-api/pull/18) diff --git a/Taskfile.yml b/Taskfile.yml index 9646ba6..db67805 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -9,9 +9,6 @@ vars: # https://taskfile.dev/reference/templating/ DOCKER_COMPOSE: '{{.TASK_DOCKER_COMPOSE | default "docker compose"}}' - # We're not yet ready to normalize config files … - YAML_FILES_GLOB: "'.github/workflows/*.{yml,yaml}' 'config/**/*.{yml,yaml}' Taskfile.yml phpstan.dist.neon" - tasks: site:update: desc: Update/install site @@ -156,7 +153,7 @@ tasks: cmds: - task: compose vars: - COMPOSE_ARGS: run --rm prettier --parser yaml {{.YAML_FILES_GLOB}} --write + COMPOSE_ARGS: run --rm prettier '**/*.{yml,yaml}' --write silent: true coding-standards:yaml:check: @@ -165,7 +162,7 @@ tasks: - task: coding-standards:yaml:apply - task: compose vars: - COMPOSE_ARGS: run --rm prettier --parser yaml {{.YAML_FILES_GLOB}} --check + COMPOSE_ARGS: run --rm prettier '**/*.{yml,yaml}' --check silent: true code-analysis: diff --git a/config/packages/api_platform.yaml b/config/packages/api_platform.yaml index 29f82bf..44441f1 100644 --- a/config/packages/api_platform.yaml +++ b/config/packages/api_platform.yaml @@ -1,58 +1,58 @@ api_platform: - title: "%env(OPENAPI_TITLE)%" - description: "%env(OPENAPI_DESCRIPTION)%" - version: 2.0.0 - show_webby: false - - openapi: - contact: - name: "%env(OPENAPI_CONTACT_NAME)%" - url: "%env(OPENAPI_CONTACT_URL)%" - email: "%env(OPENAPI_CONTACT_EMAIL)%" - termsOfService: "%env(OPENAPI_TERMS_OF_SERVICE)%" - - formats: - jsonld: ["application/ld+json"] - - docs_formats: - jsonld: ["application/ld+json"] - jsonopenapi: ["application/vnd.openapi+json"] - html: ["text/html"] - - mapping: - paths: - - "%kernel.project_dir%/src/Api/Dto" - - doctrine: - enabled: false - - swagger: - api_keys: - ApiKeyAuth: - name: "X-Api-Key" - type: header - - elasticsearch: - hosts: ["%env(INDEX_URL)%"] - - defaults: - stateless: true - pagination_items_per_page: "%env(int:PAGINATION_ITEMS_PER_PAGE)%" - pagination_maximum_items_per_page: "%env(int:PAGINATION_MAXIMUM_ITEMS_PER_PAGE)%" - cache_headers: - max_age: 3600 - shared_max_age: 3600 - vary: ["Content-Type", "Authorization", "Origin"] - extra_properties: - # Note: The api-platform/core 3.4 recipe sets `standard_put` eventhough - # https://api-platform.com/docs/core/upgrade-guide/#api-platform-34 - # (probably) tells us to remove it - # standard_put: true - # https://api-platform.com/docs/core/upgrade-guide/#api-platform-34 - rfc_7807_compliant_errors: true - # Note: The api-platform/core 3.4 recipe wants `use_symfony_listeners` to be true - use_symfony_listeners: false - - # https://api-platform.com/docs/core/upgrade-guide/#upgrade-guide - serializer: - hydra_prefix: true + title: '%env(OPENAPI_TITLE)%' + description: '%env(OPENAPI_DESCRIPTION)%' + version: 2.0.0 + show_webby: false + + openapi: + contact: + name: '%env(OPENAPI_CONTACT_NAME)%' + url: '%env(OPENAPI_CONTACT_URL)%' + email: '%env(OPENAPI_CONTACT_EMAIL)%' + termsOfService: '%env(OPENAPI_TERMS_OF_SERVICE)%' + + formats: + jsonld: ['application/ld+json'] + + docs_formats: + jsonld: ['application/ld+json'] + jsonopenapi: ['application/vnd.openapi+json'] + html: ['text/html'] + + mapping: + paths: + - '%kernel.project_dir%/src/Api/Dto' + + doctrine: + enabled: false + + swagger: + api_keys: + ApiKeyAuth: + name: 'X-Api-Key' + type: header + + elasticsearch: + hosts: ['%env(INDEX_URL)%'] + + defaults: + stateless: true + pagination_items_per_page: '%env(int:PAGINATION_ITEMS_PER_PAGE)%' + pagination_maximum_items_per_page: '%env(int:PAGINATION_MAXIMUM_ITEMS_PER_PAGE)%' + cache_headers: + max_age: 3600 + shared_max_age: 3600 + vary: ['Content-Type', 'Authorization', 'Origin'] + extra_properties: + # Note: The api-platform/core 3.4 recipe sets `standard_put` eventhough + # https://api-platform.com/docs/core/upgrade-guide/#api-platform-34 + # (probably) tells us to remove it + # standard_put: true + # https://api-platform.com/docs/core/upgrade-guide/#api-platform-34 + rfc_7807_compliant_errors: true + # Note: The api-platform/core 3.4 recipe wants `use_symfony_listeners` to be true + use_symfony_listeners: false + + # https://api-platform.com/docs/core/upgrade-guide/#upgrade-guide + serializer: + hydra_prefix: true diff --git a/config/packages/cache.yaml b/config/packages/cache.yaml index 72cca01..c3eb53d 100644 --- a/config/packages/cache.yaml +++ b/config/packages/cache.yaml @@ -1,19 +1,19 @@ framework: - cache: - # Unique name of your app: used to compute stable namespaces for cache keys. - #prefix_seed: your_vendor_name/app_name + cache: + # Unique name of your app: used to compute stable namespaces for cache keys. + #prefix_seed: your_vendor_name/app_name - # The "app" cache stores to the filesystem by default. - # The data in this cache should persist between deploys. - # Other options include: + # The "app" cache stores to the filesystem by default. + # The data in this cache should persist between deploys. + # Other options include: - # Redis - #app: cache.adapter.redis - #default_redis_provider: redis://localhost + # Redis + #app: cache.adapter.redis + #default_redis_provider: redis://localhost - # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) - #app: cache.adapter.apcu + # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) + #app: cache.adapter.apcu - # Namespaced pools use the above "app" backend by default - #pools: - #my.dedicated.cache: null + # Namespaced pools use the above "app" backend by default + #pools: + #my.dedicated.cache: null diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml index 3db7510..7d97622 100644 --- a/config/packages/framework.yaml +++ b/config/packages/framework.yaml @@ -1,27 +1,27 @@ # see https://symfony.com/doc/current/reference/configuration/framework.html framework: - secret: "%env(APP_SECRET)%" - annotations: false - http_method_override: false - handle_all_throwables: true + secret: '%env(APP_SECRET)%' + annotations: false + http_method_override: false + handle_all_throwables: true - # Enables session support. Note that the session will ONLY be started if you read or write from it. - # Remove or comment this section to explicitly disable session support. - session: - handler_id: null - cookie_secure: auto - cookie_samesite: lax + # Enables session support. Note that the session will ONLY be started if you read or write from it. + # Remove or comment this section to explicitly disable session support. + session: + handler_id: null + cookie_secure: auto + cookie_samesite: lax - #esi: true - #fragments: true - php_errors: - log: true + #esi: true + #fragments: true + php_errors: + log: true - assets: - base_path: "%env(APP_PATH_PREFIX)%" + assets: + base_path: '%env(APP_PATH_PREFIX)%' when@test: - framework: - test: true - session: - storage_factory_id: session.storage.factory.mock_file + framework: + test: true + session: + storage_factory_id: session.storage.factory.mock_file diff --git a/config/packages/http_discovery.yaml b/config/packages/http_discovery.yaml index 3e7ef4b..2a789e7 100644 --- a/config/packages/http_discovery.yaml +++ b/config/packages/http_discovery.yaml @@ -1,10 +1,10 @@ services: - Psr\Http\Message\RequestFactoryInterface: "@http_discovery.psr17_factory" - Psr\Http\Message\ResponseFactoryInterface: "@http_discovery.psr17_factory" - Psr\Http\Message\ServerRequestFactoryInterface: "@http_discovery.psr17_factory" - Psr\Http\Message\StreamFactoryInterface: "@http_discovery.psr17_factory" - Psr\Http\Message\UploadedFileFactoryInterface: "@http_discovery.psr17_factory" - Psr\Http\Message\UriFactoryInterface: "@http_discovery.psr17_factory" + Psr\Http\Message\RequestFactoryInterface: '@http_discovery.psr17_factory' + Psr\Http\Message\ResponseFactoryInterface: '@http_discovery.psr17_factory' + Psr\Http\Message\ServerRequestFactoryInterface: '@http_discovery.psr17_factory' + Psr\Http\Message\StreamFactoryInterface: '@http_discovery.psr17_factory' + Psr\Http\Message\UploadedFileFactoryInterface: '@http_discovery.psr17_factory' + Psr\Http\Message\UriFactoryInterface: '@http_discovery.psr17_factory' - http_discovery.psr17_factory: - class: Http\Discovery\Psr17Factory + http_discovery.psr17_factory: + class: Http\Discovery\Psr17Factory diff --git a/config/packages/nelmio_cors.yaml b/config/packages/nelmio_cors.yaml index 12577e6..8977033 100644 --- a/config/packages/nelmio_cors.yaml +++ b/config/packages/nelmio_cors.yaml @@ -1,10 +1,10 @@ nelmio_cors: - defaults: - origin_regex: true - allow_origin: ["%env(CORS_ALLOW_ORIGIN)%"] - allow_methods: ["GET", "OPTIONS"] - allow_headers: ["Content-Type", "X-Api-Key"] - expose_headers: ["Link"] - max_age: 3600 - paths: - "^/": null + defaults: + origin_regex: true + allow_origin: ['%env(CORS_ALLOW_ORIGIN)%'] + allow_methods: ['GET', 'OPTIONS'] + allow_headers: ['Content-Type', 'X-Api-Key'] + expose_headers: ['Link'] + max_age: 3600 + paths: + '^/': null diff --git a/config/packages/routing.yaml b/config/packages/routing.yaml index c0f1474..4b766ce 100644 --- a/config/packages/routing.yaml +++ b/config/packages/routing.yaml @@ -1,12 +1,12 @@ framework: - router: - utf8: true + router: + utf8: true - # Configure how to generate URLs in non-HTTP contexts, such as CLI commands. - # See https://symfony.com/doc/current/routing.html#generating-urls-in-commands - #default_uri: http://localhost + # Configure how to generate URLs in non-HTTP contexts, such as CLI commands. + # See https://symfony.com/doc/current/routing.html#generating-urls-in-commands + #default_uri: http://localhost when@prod: - framework: - router: - strict_requirements: null + framework: + router: + strict_requirements: null diff --git a/config/packages/security.yaml b/config/packages/security.yaml index ee040de..0d1e5f5 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -1,44 +1,44 @@ security: - # https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords - password_hashers: - Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: "auto" - # https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider - providers: - users_in_memory: { memory: null } - api_user_provider: - id: App\Security\ApiUserProvider - firewalls: - dev: - pattern: ^/(_(profiler|wdt)|css|images|js)/ - security: false - main: - stateless: true - custom_authenticators: - - App\Security\ApiKeyAuthenticator - provider: api_user_provider + # https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords + password_hashers: + Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto' + # https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider + providers: + users_in_memory: { memory: null } + api_user_provider: + id: App\Security\ApiUserProvider + firewalls: + dev: + pattern: ^/(_(profiler|wdt)|css|images|js)/ + security: false + main: + stateless: true + custom_authenticators: + - App\Security\ApiKeyAuthenticator + provider: api_user_provider - # activate different ways to authenticate - # https://symfony.com/doc/current/security.html#the-firewall + # activate different ways to authenticate + # https://symfony.com/doc/current/security.html#the-firewall - # https://symfony.com/doc/current/security/impersonating_user.html - # switch_user: true + # https://symfony.com/doc/current/security/impersonating_user.html + # switch_user: true - # Easy way to control access for large sections of your site - # Note: Only the *first* access control that matches will be used - access_control: - - { path: ^/api/v2/docs, roles: PUBLIC_ACCESS } - - { path: ^/api, roles: IS_AUTHENTICATED_FULLY } - # - { path: ^/profile, roles: ROLE_USER } + # Easy way to control access for large sections of your site + # Note: Only the *first* access control that matches will be used + access_control: + - { path: ^/api/v2/docs, roles: PUBLIC_ACCESS } + - { path: ^/api, roles: IS_AUTHENTICATED_FULLY } + # - { path: ^/profile, roles: ROLE_USER } when@test: - security: - password_hashers: - # By default, password hashers are resource intensive and take time. This is - # important to generate secure password hashes. In tests however, secure hashes - # are not important, waste resources and increase test times. The following - # reduces the work factor to the lowest possible values. - Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: - algorithm: auto - cost: 4 # Lowest possible value for bcrypt - time_cost: 3 # Lowest possible value for argon - memory_cost: 10 # Lowest possible value for argon + security: + password_hashers: + # By default, password hashers are resource intensive and take time. This is + # important to generate secure password hashes. In tests however, secure hashes + # are not important, waste resources and increase test times. The following + # reduces the work factor to the lowest possible values. + Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: + algorithm: auto + cost: 4 # Lowest possible value for bcrypt + time_cost: 3 # Lowest possible value for argon + memory_cost: 10 # Lowest possible value for argon diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml index 43c7276..b46e8b3 100644 --- a/config/packages/twig.yaml +++ b/config/packages/twig.yaml @@ -1,9 +1,9 @@ twig: - file_name_pattern: "*.twig" + file_name_pattern: '*.twig' - globals: - app_project_uri: "%env(APP_PROJECT_URI)%" + globals: + app_project_uri: '%env(APP_PROJECT_URI)%' when@test: - twig: - strict_variables: true + twig: + strict_variables: true diff --git a/config/packages/validator.yaml b/config/packages/validator.yaml index 876481d..0201281 100644 --- a/config/packages/validator.yaml +++ b/config/packages/validator.yaml @@ -1,13 +1,13 @@ framework: - validation: - email_validation_mode: html5 + validation: + email_validation_mode: html5 - # Enables validator auto-mapping support. - # For instance, basic validation constraints will be inferred from Doctrine's metadata. - #auto_mapping: - # App\Entity\: [] + # Enables validator auto-mapping support. + # For instance, basic validation constraints will be inferred from Doctrine's metadata. + #auto_mapping: + # App\Entity\: [] when@test: - framework: - validation: - not_compromised_password: false + framework: + validation: + not_compromised_password: false diff --git a/config/packages/web_profiler.yaml b/config/packages/web_profiler.yaml index 1e77fbc..1e039b7 100644 --- a/config/packages/web_profiler.yaml +++ b/config/packages/web_profiler.yaml @@ -1,11 +1,11 @@ when@dev: - web_profiler: - toolbar: true + web_profiler: + toolbar: true - framework: - profiler: - collect_serializer_data: true + framework: + profiler: + collect_serializer_data: true when@test: - framework: - profiler: { collect: false } + framework: + profiler: { collect: false } diff --git a/config/routes.yaml b/config/routes.yaml index 2d0ef99..41ef814 100644 --- a/config/routes.yaml +++ b/config/routes.yaml @@ -1,5 +1,5 @@ controllers: - resource: - path: ../src/Controller/ - namespace: App\Controller - type: attribute + resource: + path: ../src/Controller/ + namespace: App\Controller + type: attribute diff --git a/config/routes/api_platform.yaml b/config/routes/api_platform.yaml index 251216e..6dbbb2d 100644 --- a/config/routes/api_platform.yaml +++ b/config/routes/api_platform.yaml @@ -1,4 +1,4 @@ api_platform: - resource: . - type: api_platform - prefix: "%api.path_prefix%" + resource: . + type: api_platform + prefix: '%api.path_prefix%' diff --git a/config/routes/framework.yaml b/config/routes/framework.yaml index cce01c1..0fc74bb 100644 --- a/config/routes/framework.yaml +++ b/config/routes/framework.yaml @@ -1,4 +1,4 @@ when@dev: - _errors: - resource: "@FrameworkBundle/Resources/config/routing/errors.xml" - prefix: /_error + _errors: + resource: '@FrameworkBundle/Resources/config/routing/errors.xml' + prefix: /_error diff --git a/config/routes/security.yaml b/config/routes/security.yaml index 3cb5ef0..f853be1 100644 --- a/config/routes/security.yaml +++ b/config/routes/security.yaml @@ -1,3 +1,3 @@ _security_logout: - resource: security.route_loader.logout - type: service + resource: security.route_loader.logout + type: service diff --git a/config/routes/web_profiler.yaml b/config/routes/web_profiler.yaml index e004603..8d85319 100644 --- a/config/routes/web_profiler.yaml +++ b/config/routes/web_profiler.yaml @@ -1,8 +1,8 @@ when@dev: - web_profiler_wdt: - resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml" - prefix: /_wdt + web_profiler_wdt: + resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml' + prefix: /_wdt - web_profiler_profiler: - resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml" - prefix: /_profiler + web_profiler_profiler: + resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml' + prefix: /_profiler diff --git a/config/services.yaml b/config/services.yaml index 42e9aae..08139d8 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -4,70 +4,70 @@ # Put parameters here that don't need to change on each machine where the app is deployed # https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration parameters: - api.path_prefix: "%env(string:APP_PATH_PREFIX)%" + api.path_prefix: '%env(string:APP_PATH_PREFIX)%' services: - # default configuration for services in *this* file - _defaults: - autowire: true # Automatically injects dependencies in your services. - autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. - - # makes classes in src/ available to be used as services - # this creates a service per class whose id is the fully-qualified class name - App\: - resource: "../src/" - exclude: - - "../src/DependencyInjection/" - - "../src/Entity/" - - "../src/Kernel.php" - - # add more service definitions when explicit configuration is needed - # please note that last definitions always *replace* previous ones - - App\Api\State\AbstractProvider: - arguments: - $filterLocator: "@api_platform.filter_locator" - - App\Api\State\DailyOccurrenceRepresentationProvider: - arguments: - $filterLocator: "@api_platform.filter_locator" - - App\Api\State\EventRepresentationProvider: - arguments: - $filterLocator: "@api_platform.filter_locator" - - App\Api\State\LocationRepresentationProvider: - arguments: - $filterLocator: "@api_platform.filter_locator" - - App\Api\State\OccurrenceRepresentationProvider: - arguments: - $filterLocator: "@api_platform.filter_locator" - - App\Api\State\OrganizationRepresentationProvider: - arguments: - $filterLocator: "@api_platform.filter_locator" - - App\Api\State\TagRepresentationProvider: - arguments: - $filterLocator: "@api_platform.filter_locator" - - App\Api\State\VocabularyRepresentationProvider: - arguments: - $filterLocator: "@api_platform.filter_locator" - - App\Command\FixturesLoadCommand: - arguments: - $appEnv: "%env(string:APP_ENV)%" - - App\Security\ApiUserProvider: - arguments: - $apikeys: "%env(json:APP_API_KEYS)%" - - Elastic\Elasticsearch\Client: - factory: ['@Elastic\Elasticsearch\ClientBuilder', fromConfig] - arguments: - $config: - hosts: ["%env(INDEX_URL)%"] - - Elastic\Elasticsearch\ClientBuilder: ~ + # default configuration for services in *this* file + _defaults: + autowire: true # Automatically injects dependencies in your services. + autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. + + # makes classes in src/ available to be used as services + # this creates a service per class whose id is the fully-qualified class name + App\: + resource: '../src/' + exclude: + - '../src/DependencyInjection/' + - '../src/Entity/' + - '../src/Kernel.php' + + # add more service definitions when explicit configuration is needed + # please note that last definitions always *replace* previous ones + + App\Api\State\AbstractProvider: + arguments: + $filterLocator: '@api_platform.filter_locator' + + App\Api\State\DailyOccurrenceRepresentationProvider: + arguments: + $filterLocator: '@api_platform.filter_locator' + + App\Api\State\EventRepresentationProvider: + arguments: + $filterLocator: '@api_platform.filter_locator' + + App\Api\State\LocationRepresentationProvider: + arguments: + $filterLocator: '@api_platform.filter_locator' + + App\Api\State\OccurrenceRepresentationProvider: + arguments: + $filterLocator: '@api_platform.filter_locator' + + App\Api\State\OrganizationRepresentationProvider: + arguments: + $filterLocator: '@api_platform.filter_locator' + + App\Api\State\TagRepresentationProvider: + arguments: + $filterLocator: '@api_platform.filter_locator' + + App\Api\State\VocabularyRepresentationProvider: + arguments: + $filterLocator: '@api_platform.filter_locator' + + App\Command\FixturesLoadCommand: + arguments: + $appEnv: '%env(string:APP_ENV)%' + + App\Security\ApiUserProvider: + arguments: + $apikeys: '%env(json:APP_API_KEYS)%' + + Elastic\Elasticsearch\Client: + factory: ['@Elastic\Elasticsearch\ClientBuilder', fromConfig] + arguments: + $config: + hosts: ['%env(INDEX_URL)%'] + + Elastic\Elasticsearch\ClientBuilder: ~ diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 6e07ff8..a7db2a0 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -3,7 +3,7 @@ services: networks: - frontend depends_on: -# - elasticsearch + # - elasticsearch - rabbit rabbit: @@ -47,7 +47,11 @@ services: # We need to be able to wait for Elasticsearch to be ready for requests # https://www.baeldung.com/ops/elasticsearch-docker-compose healthcheck: - test: ["CMD-SHELL", "curl -fs 'http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=5s' || exit 1"] + test: + [ + "CMD-SHELL", + "curl -fs 'http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=5s' || exit 1", + ] interval: 10s timeout: 5s retries: 5 diff --git a/docker-compose.yml b/docker-compose.yml index 6edca92..b5c0894 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,9 +12,9 @@ services: networks: - app ports: - - '3306' + - "3306" healthcheck: - test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ] + test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] start_period: 10s interval: 10s timeout: 5s @@ -55,7 +55,7 @@ services: depends_on: - phpfpm ports: - - '8080' + - "8080" volumes: - ./.docker/templates:/etc/nginx/templates:ro - .:/app @@ -68,9 +68,9 @@ services: - "traefik.enable=true" - "traefik.docker.network=frontend" - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_DOMAIN}`)" -# HTTPS config - uncomment to enable redirect from :80 to :443 -# - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https" -# - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" + # HTTPS config - uncomment to enable redirect from :80 to :443 + # - "traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=redirect-to-https" + # - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" mail: image: axllent/mailpit