diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8d891be0a..2497131ed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,133 +1,133 @@ name: Docker Image CI Release on: - push: - branches: - - main - - development - - version-* - - feature-* + push: + branches: + - main + - development + - version-* + - feature-* jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - - name: Default Environment Variables - run: - echo "https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables"; - echo "GITHUB_WORKFLOW is $GITHUB_WORKFLOW"; - echo "GITHUB_WORKFLOW_REF is $GITHUB_WORKFLOW_REF"; - echo "GITHUB_RUN_ATTEMPT is $GITHUB_RUN_ATTEMPT"; - echo "GITHUB_REF is $GITHUB_REF"; - echo "GITHUB_REF_NAME is $GITHUB_REF_NAME"; - echo "GITHUB_REF_PROTECTED is $GITHUB_REF_PROTECTED"; - - name: Export release code - if: (success() || failure()) - id: releasecode #version number in a more comprehensible format: 0.1.YearMonthDay in UTC - run: | - export VERSION=$(grep APP_VERSION= .env | cut -d '=' -f2) - export RELEASE=$VERSION.$(date --utc +%y%m%d) - echo "RELEASE=$RELEASE" >> $GITHUB_ENV - - name: Create vendor folder - run: | - mkdir api/vendor - chmod +777 api/vendor - chmod +777 -R api/public - - name: Setting APP_NAME - run: | - export NAME=$(grep APP_NAME= .env | cut -d '=' -f2) - echo "APP_NAME=$NAME" >> $GITHUB_ENV - - name: Print app name - run: echo "APP_NAME = $APP_NAME" - - name: Setting APP_ENV to dev - run: | - echo "APP_ENV=dev">> $GITHUB_ENV - echo "set APP_ENV to dev, see Print definitive APP_ENV" - - name: Setting APP_ENV to prod - if: contains( github.ref, 'main' ) - run: | - echo "APP_ENV=prod">> $GITHUB_ENV - echo "settin APP_ENV to prod, see Print definitive APP_ENV" - - name: Setting APP_ENV to version or feature - if: contains( github.ref, 'version-' ) || contains( github.ref, 'feature-') - run: | - GENERAL_TAG=$GITHUB_REF_NAME - export GENERAL_TAG=${GENERAL_TAG//-/} - echo "APP_ENV=$GENERAL_TAG">> $GITHUB_ENV - echo "setting APP_ENV to $GENERAL_TAG, see Print definitive APP_ENV" - - name: Print definitive APP_ENV - run: echo "APP_ENV is now $APP_ENV" - - name: Build the Docker image - run: docker-compose build --build-arg APP_ENV=$APP_ENV --build-arg APP_BUILD_ALL_FIXTURES=true - - name: Run the docker image - run: docker-compose up -d - - name: Taking some sleep (for containers to come up) - run: sleep 120 - - name: Check if all containers are running - run: docker ps - - name: Dumping the logs - run: docker-compose logs - - name: Database Update - run: docker-compose exec -T php bin/console doctrine:schema:update --force - - if: (github.ref == 'refs/heads/main') - name: Add docker tag latest - run: | - images=$(docker-compose images -q | xargs docker inspect --format='{{ index .RepoTags 0}}' | cut -d':' -f1 | grep $APP_NAME) - for image in $images - do - docker tag "${image}":${APP_ENV} "${image}":"latest" - done - echo 'IMAGES=$images' >> $GITHUB_ENV - - name: Add docker tags - run: | - images=$(docker-compose images -q | xargs docker inspect --format='{{ index .RepoTags 0}}' | cut -d':' -f1 | grep $APP_NAME) - for image in $images - do - docker tag "${image}":${APP_ENV} "${image}":"$GITHUB_REF_NAME.$RELEASE" - done - echo 'IMAGES=$images' >> $GITHUB_ENV - - name: Show all images - run: docker images - - name: Login to Container Registry - id: containerregistry-login - run: | - if [ "${{ secrets.GITHUB_TOKEN }}" != "" ]; then - echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $(cut -d'/' -f1 <<< $GITHUB_REPOSITORY) --password-stdin - echo "##[set-output name=success;]true" - else - echo "##[set-output name=success;]false" - fi - - if: steps.containerregistry-login.outputs.success == 'true' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/development' || contains(github.ref, 'version-' ) || contains( github.ref, 'feature-')) - name: Push to Container Registry - run: docker-compose push + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + - name: Default Environment Variables + run: + echo "https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables"; + echo "GITHUB_WORKFLOW is $GITHUB_WORKFLOW"; + echo "GITHUB_WORKFLOW_REF is $GITHUB_WORKFLOW_REF"; + echo "GITHUB_RUN_ATTEMPT is $GITHUB_RUN_ATTEMPT"; + echo "GITHUB_REF is $GITHUB_REF"; + echo "GITHUB_REF_NAME is $GITHUB_REF_NAME"; + echo "GITHUB_REF_PROTECTED is $GITHUB_REF_PROTECTED"; + - name: Export release code + if: (success() || failure()) + id: releasecode #version number in a more comprehensible format: 0.1.YearMonthDay in UTC + run: | + export VERSION=$(grep APP_VERSION= .env | cut -d '=' -f2) + export RELEASE=$VERSION.$(date --utc +%y%m%d) + echo "RELEASE=$RELEASE" >> $GITHUB_ENV + - name: Create vendor folder + run: | + mkdir api/vendor + chmod +777 api/vendor + chmod +777 -R api/public + - name: Setting APP_NAME + run: | + export NAME=$(grep APP_NAME= .env | cut -d '=' -f2) + echo "APP_NAME=$NAME" >> $GITHUB_ENV + - name: Print app name + run: echo "APP_NAME = $APP_NAME" + - name: Setting APP_ENV to dev + run: | + echo "APP_ENV=dev">> $GITHUB_ENV + echo "set APP_ENV to dev, see Print definitive APP_ENV" + - name: Setting APP_ENV to prod + if: contains( github.ref, 'main' ) + run: | + echo "APP_ENV=prod">> $GITHUB_ENV + echo "settin APP_ENV to prod, see Print definitive APP_ENV" + - name: Setting APP_ENV to version or feature + if: contains( github.ref, 'version-' ) || contains( github.ref, 'feature-') + run: | + GENERAL_TAG=$GITHUB_REF_NAME + export GENERAL_TAG=${GENERAL_TAG//-/} + echo "APP_ENV=$GENERAL_TAG">> $GITHUB_ENV + echo "setting APP_ENV to $GENERAL_TAG, see Print definitive APP_ENV" + - name: Print definitive APP_ENV + run: echo "APP_ENV is now $APP_ENV" + - name: Build the Docker image + run: docker-compose build --build-arg APP_ENV=$APP_ENV --build-arg APP_BUILD_ALL_FIXTURES=true + - name: Run the docker image + run: docker-compose up -d + - name: Taking some sleep (for containers to come up) + run: sleep 120 + - name: Check if all containers are running + run: docker ps + - name: Dumping the logs + run: docker-compose logs + - name: Database Update + run: docker-compose exec -T php bin/console doctrine:schema:update --force + - if: (github.ref == 'refs/heads/main') + name: Add docker tag latest + run: | + images=$(docker-compose images -q | xargs docker inspect --format='{{ index .RepoTags 0}}' | cut -d':' -f1 | grep $APP_NAME) + for image in $images + do + docker tag "${image}":${APP_ENV} "${image}":"latest" + done + echo 'IMAGES=$images' >> $GITHUB_ENV + - name: Add docker tags + run: | + images=$(docker-compose images -q | xargs docker inspect --format='{{ index .RepoTags 0}}' | cut -d':' -f1 | grep $APP_NAME) + for image in $images + do + docker tag "${image}":${APP_ENV} "${image}":"$GITHUB_REF_NAME.$RELEASE" + done + echo 'IMAGES=$images' >> $GITHUB_ENV + - name: Show all images + run: docker images + - name: Login to Container Registry + id: containerregistry-login + run: | + if [ "${{ secrets.GITHUB_TOKEN }}" != "" ]; then + echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $(cut -d'/' -f1 <<< $GITHUB_REPOSITORY) --password-stdin + echo "##[set-output name=success;]true" + else + echo "##[set-output name=success;]false" + fi + - if: steps.containerregistry-login.outputs.success == 'true' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/development' || contains(github.ref, 'version-' ) || contains( github.ref, 'feature-')) + name: Push to Container Registry + run: docker-compose push - - if: steps.containerregistry-login.outputs.success == 'true' && (github.ref == 'refs/heads/main') - name: Push latest container to Container Registry - run: | - images=$(docker-compose images -q | xargs docker inspect --format='{{ index .RepoTags 0}}' | cut -d':' -f1 | grep $APP_NAME) - for image in $images - do - docker push "${image}":"latest" - done - - if: steps.containerregistry-login.outputs.success == 'true' && (contains(github.ref, 'version-' ) || contains( github.ref, 'feature-') || (github.ref == 'refs/heads/main')) - name: Push versioned containers to Container Registry - run: | - images=$(docker-compose images -q | xargs docker inspect --format='{{ index .RepoTags 0}}' | cut -d':' -f1 | grep $APP_NAME) - for image in $images - do - docker push "${image}":"$GITHUB_REF_NAME.$RELEASE" - done - - name: Create kube config - id: kubeconfig - if: contains( github.ref, 'development' ) - run: | - if [ "${{ secrets.KUBECONFIG }}" != "" ]; then - printf "${{ secrets.KUBECONFIG }}" > kubeconfig.yaml - echo "##[set-output name=success]true" - else - echo "##[set-output name=success]false" - fi - - name: Chores - if: (success() || failure()) - run: docker-compose down + - if: steps.containerregistry-login.outputs.success == 'true' && (github.ref == 'refs/heads/main') + name: Push latest container to Container Registry + run: | + images=$(docker-compose images -q | xargs docker inspect --format='{{ index .RepoTags 0}}' | cut -d':' -f1 | grep $APP_NAME) + for image in $images + do + docker push "${image}":"latest" + done + - if: steps.containerregistry-login.outputs.success == 'true' && (contains(github.ref, 'version-' ) || contains( github.ref, 'feature-') || (github.ref == 'refs/heads/main')) + name: Push versioned containers to Container Registry + run: | + images=$(docker-compose images -q | xargs docker inspect --format='{{ index .RepoTags 0}}' | cut -d':' -f1 | grep $APP_NAME) + for image in $images + do + docker push "${image}":"$GITHUB_REF_NAME.$RELEASE" + done + - name: Create kube config + id: kubeconfig + if: contains( github.ref, 'development' ) + run: | + if [ "${{ secrets.KUBECONFIG }}" != "" ]; then + printf "${{ secrets.KUBECONFIG }}" > kubeconfig.yaml + echo "##[set-output name=success]true" + else + echo "##[set-output name=success]false" + fi + - name: Chores + if: (success() || failure()) + run: docker-compose down diff --git a/api/.dockerignore b/api/.dockerignore index 7908bb741..b5b43833e 100644 --- a/api/.dockerignore +++ b/api/.dockerignore @@ -15,5 +15,6 @@ .php_cs.cache bin/* !bin/console +!bin/phpunit docker/db/data/ var/* diff --git a/api/composer.lock b/api/composer.lock index bfea379c4..3884a16fd 100644 --- a/api/composer.lock +++ b/api/composer.lock @@ -130,16 +130,16 @@ }, { "name": "api-platform/core", - "version": "v2.7.16", + "version": "v2.7.18", "source": { "type": "git", "url": "https://github.com/api-platform/core.git", - "reference": "e6f77e20b4ed9cb3e44c7398d6cda971d32190b0" + "reference": "6ff3e05d97602cdaa3b329112ca21f7e916a504d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/api-platform/core/zipball/e6f77e20b4ed9cb3e44c7398d6cda971d32190b0", - "reference": "e6f77e20b4ed9cb3e44c7398d6cda971d32190b0", + "url": "https://api.github.com/repos/api-platform/core/zipball/6ff3e05d97602cdaa3b329112ca21f7e916a504d", + "reference": "6ff3e05d97602cdaa3b329112ca21f7e916a504d", "shasum": "" }, "require": { @@ -287,15 +287,9 @@ ], "support": { "issues": "https://github.com/api-platform/core/issues", - "source": "https://github.com/api-platform/core/tree/v2.7.16" + "source": "https://github.com/api-platform/core/tree/v2.7.18" }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/api-platform/core", - "type": "tidelift" - } - ], - "time": "2023-10-06T10:13:25+00:00" + "time": "2024-03-19T07:17:43+00:00" }, { "name": "bacon/bacon-qr-code", @@ -766,16 +760,16 @@ }, { "name": "composer/pcre", - "version": "3.1.2", + "version": "3.1.3", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "4775f35b2d70865807c89d32c8e7385b86eb0ace" + "reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/4775f35b2d70865807c89d32c8e7385b86eb0ace", - "reference": "4775f35b2d70865807c89d32c8e7385b86eb0ace", + "url": "https://api.github.com/repos/composer/pcre/zipball/5b16e25a5355f1f3afdfc2f954a0a80aec4826a8", + "reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8", "shasum": "" }, "require": { @@ -817,7 +811,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.2" + "source": "https://github.com/composer/pcre/tree/3.1.3" }, "funding": [ { @@ -833,7 +827,7 @@ "type": "tidelift" } ], - "time": "2024-03-07T15:38:35+00:00" + "time": "2024-03-19T10:26:25+00:00" }, { "name": "composer/semver", @@ -918,16 +912,16 @@ }, { "name": "composer/xdebug-handler", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "ced299686f41dce890debac69273b47ffe98a40c" + "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", - "reference": "ced299686f41dce890debac69273b47ffe98a40c", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/4f988f8fdf580d53bdb2d1278fe93d1ed5462255", + "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255", "shasum": "" }, "require": { @@ -938,7 +932,7 @@ "require-dev": { "phpstan/phpstan": "^1.0", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^6.0" + "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" }, "type": "library", "autoload": { @@ -962,9 +956,9 @@ "performance" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.4" }, "funding": [ { @@ -980,7 +974,7 @@ "type": "tidelift" } ], - "time": "2022-02-25T21:32:43+00:00" + "time": "2024-03-26T18:29:49+00:00" }, { "name": "dasprid/enum", @@ -1608,16 +1602,16 @@ }, { "name": "doctrine/doctrine-bundle", - "version": "2.11.3", + "version": "2.12.0", "source": { "type": "git", "url": "https://github.com/doctrine/DoctrineBundle.git", - "reference": "492725310ae9a1b5b20d6ae09fb5ae6404616e68" + "reference": "5418e811a14724068e95e0ba43353b903ada530f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/492725310ae9a1b5b20d6ae09fb5ae6404616e68", - "reference": "492725310ae9a1b5b20d6ae09fb5ae6404616e68", + "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/5418e811a14724068e95e0ba43353b903ada530f", + "reference": "5418e811a14724068e95e0ba43353b903ada530f", "shasum": "" }, "require": { @@ -1655,6 +1649,7 @@ "symfony/property-info": "^5.4 || ^6.0 || ^7.0", "symfony/proxy-manager-bridge": "^5.4 || ^6.0 || ^7.0", "symfony/security-bundle": "^5.4 || ^6.0 || ^7.0", + "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0", "symfony/string": "^5.4 || ^6.0 || ^7.0", "symfony/twig-bridge": "^5.4 || ^6.0 || ^7.0", "symfony/validator": "^5.4 || ^6.0 || ^7.0", @@ -1672,7 +1667,7 @@ "type": "symfony-bundle", "autoload": { "psr-4": { - "Doctrine\\Bundle\\DoctrineBundle\\": "" + "Doctrine\\Bundle\\DoctrineBundle\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1707,7 +1702,7 @@ ], "support": { "issues": "https://github.com/doctrine/DoctrineBundle/issues", - "source": "https://github.com/doctrine/DoctrineBundle/tree/2.11.3" + "source": "https://github.com/doctrine/DoctrineBundle/tree/2.12.0" }, "funding": [ { @@ -1723,7 +1718,7 @@ "type": "tidelift" } ], - "time": "2024-02-10T20:56:20+00:00" + "time": "2024-03-19T07:20:37+00:00" }, { "name": "doctrine/doctrine-fixtures-bundle", @@ -2338,16 +2333,16 @@ }, { "name": "doctrine/orm", - "version": "2.19.0", + "version": "2.19.3", "source": { "type": "git", "url": "https://github.com/doctrine/orm.git", - "reference": "a809a71aa6a233a6c82e68ebaaf8954adc4998dc" + "reference": "1a5a4c674a416b4fdf76833c627c5e7f58bbb890" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/orm/zipball/a809a71aa6a233a6c82e68ebaaf8954adc4998dc", - "reference": "a809a71aa6a233a6c82e68ebaaf8954adc4998dc", + "url": "https://api.github.com/repos/doctrine/orm/zipball/1a5a4c674a416b4fdf76833c627c5e7f58bbb890", + "reference": "1a5a4c674a416b4fdf76833c627c5e7f58bbb890", "shasum": "" }, "require": { @@ -2433,9 +2428,9 @@ ], "support": { "issues": "https://github.com/doctrine/orm/issues", - "source": "https://github.com/doctrine/orm/tree/2.19.0" + "source": "https://github.com/doctrine/orm/tree/2.19.3" }, - "time": "2024-03-03T17:43:41+00:00" + "time": "2024-03-21T11:01:42+00:00" }, { "name": "doctrine/persistence", @@ -3114,16 +3109,16 @@ }, { "name": "friendsofphp/proxy-manager-lts", - "version": "v1.0.16", + "version": "v1.0.18", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/proxy-manager-lts.git", - "reference": "ecadbdc9052e4ad08c60c8a02268712e50427f7c" + "reference": "2c8a6cffc3220e99352ad958fe7cf06bf6f7690f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/proxy-manager-lts/zipball/ecadbdc9052e4ad08c60c8a02268712e50427f7c", - "reference": "ecadbdc9052e4ad08c60c8a02268712e50427f7c", + "url": "https://api.github.com/repos/FriendsOfPHP/proxy-manager-lts/zipball/2c8a6cffc3220e99352ad958fe7cf06bf6f7690f", + "reference": "2c8a6cffc3220e99352ad958fe7cf06bf6f7690f", "shasum": "" }, "require": { @@ -3180,7 +3175,7 @@ ], "support": { "issues": "https://github.com/FriendsOfPHP/proxy-manager-lts/issues", - "source": "https://github.com/FriendsOfPHP/proxy-manager-lts/tree/v1.0.16" + "source": "https://github.com/FriendsOfPHP/proxy-manager-lts/tree/v1.0.18" }, "funding": [ { @@ -3192,7 +3187,7 @@ "type": "tidelift" } ], - "time": "2023-05-24T07:17:17+00:00" + "time": "2024-03-20T12:50:41+00:00" }, { "name": "gedmo/doctrine-extensions", @@ -4668,16 +4663,16 @@ }, { "name": "mongodb/mongodb", - "version": "1.17.0", + "version": "1.17.1", "source": { "type": "git", "url": "https://github.com/mongodb/mongo-php-library.git", - "reference": "9d9c917cf7ff275ed6bd63c596efeb6e49fd0e53" + "reference": "01d0840bf0678f519e72dc71b69c8a50a0856c2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/9d9c917cf7ff275ed6bd63c596efeb6e49fd0e53", - "reference": "9d9c917cf7ff275ed6bd63c596efeb6e49fd0e53", + "url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/01d0840bf0678f519e72dc71b69c8a50a0856c2d", + "reference": "01d0840bf0678f519e72dc71b69c8a50a0856c2d", "shasum": "" }, "require": { @@ -4692,7 +4687,7 @@ }, "require-dev": { "doctrine/coding-standard": "^12.0", - "rector/rector": "^0.18", + "rector/rector": "^0.19", "squizlabs/php_codesniffer": "^3.7", "symfony/phpunit-bridge": "^5.2", "vimeo/psalm": "^5.13" @@ -4739,9 +4734,9 @@ ], "support": { "issues": "https://github.com/mongodb/mongo-php-library/issues", - "source": "https://github.com/mongodb/mongo-php-library/tree/1.17.0" + "source": "https://github.com/mongodb/mongo-php-library/tree/1.17.1" }, - "time": "2023-11-15T09:21:50+00:00" + "time": "2024-03-14T10:33:11+00:00" }, { "name": "monolog/monolog", @@ -5803,16 +5798,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.26.0", + "version": "1.27.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "231e3186624c03d7e7c890ec662b81e6b0405227" + "reference": "86e4d5a4b036f8f0be1464522f4c6b584c452757" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/231e3186624c03d7e7c890ec662b81e6b0405227", - "reference": "231e3186624c03d7e7c890ec662b81e6b0405227", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/86e4d5a4b036f8f0be1464522f4c6b584c452757", + "reference": "86e4d5a4b036f8f0be1464522f4c6b584c452757", "shasum": "" }, "require": { @@ -5844,9 +5839,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.26.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.27.0" }, - "time": "2024-02-23T16:05:55+00:00" + "time": "2024-03-21T13:14:53+00:00" }, { "name": "psr/cache", @@ -6725,16 +6720,16 @@ }, { "name": "respect/validation", - "version": "2.3.4", + "version": "2.3.6", "source": { "type": "git", "url": "https://github.com/Respect/Validation.git", - "reference": "788939e35909cbc3dcd72202d616e04dd553b572" + "reference": "263ae118fb9b0d3bc6692eb2154cd851deff7932" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Respect/Validation/zipball/788939e35909cbc3dcd72202d616e04dd553b572", - "reference": "788939e35909cbc3dcd72202d616e04dd553b572", + "url": "https://api.github.com/repos/Respect/Validation/zipball/263ae118fb9b0d3bc6692eb2154cd851deff7932", + "reference": "263ae118fb9b0d3bc6692eb2154cd851deff7932", "shasum": "" }, "require": { @@ -6787,9 +6782,9 @@ ], "support": { "issues": "https://github.com/Respect/Validation/issues", - "source": "https://github.com/Respect/Validation/tree/2.3.4" + "source": "https://github.com/Respect/Validation/tree/2.3.6" }, - "time": "2024-03-11T21:14:03+00:00" + "time": "2024-03-24T18:49:24+00:00" }, { "name": "sabberworm/php-css-parser", @@ -12827,16 +12822,16 @@ }, { "name": "theofidry/alice-data-fixtures", - "version": "1.7.0", + "version": "1.7.1", "source": { "type": "git", "url": "https://github.com/theofidry/AliceDataFixtures.git", - "reference": "34e4751103f869da06163d91a9a7ace1b47d5d06" + "reference": "c05882a3ba35f8858de189aec0029b0598de7dce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/AliceDataFixtures/zipball/34e4751103f869da06163d91a9a7ace1b47d5d06", - "reference": "34e4751103f869da06163d91a9a7ace1b47d5d06", + "url": "https://api.github.com/repos/theofidry/AliceDataFixtures/zipball/c05882a3ba35f8858de189aec0029b0598de7dce", + "reference": "c05882a3ba35f8858de189aec0029b0598de7dce", "shasum": "" }, "require": { @@ -12911,7 +12906,7 @@ ], "support": { "issues": "https://github.com/theofidry/AliceDataFixtures/issues", - "source": "https://github.com/theofidry/AliceDataFixtures/tree/1.7.0" + "source": "https://github.com/theofidry/AliceDataFixtures/tree/1.7.1" }, "funding": [ { @@ -12919,7 +12914,7 @@ "type": "github" } ], - "time": "2023-12-03T21:49:12+00:00" + "time": "2024-03-18T12:41:21+00:00" }, { "name": "twig/twig", @@ -12995,16 +12990,16 @@ }, { "name": "web-token/jwt-framework", - "version": "3.3.1", + "version": "3.3.4", "source": { "type": "git", "url": "https://github.com/web-token/jwt-framework.git", - "reference": "1dbef13afb91a576d5ce431e5f9570183b19c0dd" + "reference": "734744207ae4f8e0dd5cd6463c8535155e61b92e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/web-token/jwt-framework/zipball/1dbef13afb91a576d5ce431e5f9570183b19c0dd", - "reference": "1dbef13afb91a576d5ce431e5f9570183b19c0dd", + "url": "https://api.github.com/repos/web-token/jwt-framework/zipball/734744207ae4f8e0dd5cd6463c8535155e61b92e", + "reference": "734744207ae4f8e0dd5cd6463c8535155e61b92e", "shasum": "" }, "require": { @@ -13147,7 +13142,7 @@ ], "support": { "issues": "https://github.com/web-token/jwt-framework/issues", - "source": "https://github.com/web-token/jwt-framework/tree/3.3.1" + "source": "https://github.com/web-token/jwt-framework/tree/3.3.4" }, "funding": [ { @@ -13159,7 +13154,7 @@ "type": "patreon" } ], - "time": "2024-02-28T09:04:35+00:00" + "time": "2024-03-24T09:57:06+00:00" }, { "name": "webmozart/assert", @@ -13774,16 +13769,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.17", + "version": "9.6.18", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "1a156980d78a6666721b7e8e8502fe210b587fcd" + "reference": "32c2c2d6580b1d8ab3c10b1e9e4dc263cc69bb04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1a156980d78a6666721b7e8e8502fe210b587fcd", - "reference": "1a156980d78a6666721b7e8e8502fe210b587fcd", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/32c2c2d6580b1d8ab3c10b1e9e4dc263cc69bb04", + "reference": "32c2c2d6580b1d8ab3c10b1e9e4dc263cc69bb04", "shasum": "" }, "require": { @@ -13857,7 +13852,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.17" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.18" }, "funding": [ { @@ -13873,7 +13868,7 @@ "type": "tidelift" } ], - "time": "2024-02-23T13:14:51+00:00" + "time": "2024-03-21T12:07:32+00:00" }, { "name": "sebastian/cli-parser", @@ -14904,7 +14899,7 @@ } ], "aliases": [], - "minimum-stability": "dev", + "minimum-stability": "stable", "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, diff --git a/api/docker/nginx/conf.d/default.conf b/api/docker/nginx/conf.d/default.conf index 9a38eac52..0e4c58db5 100644 --- a/api/docker/nginx/conf.d/default.conf +++ b/api/docker/nginx/conf.d/default.conf @@ -1,6 +1,6 @@ server { root /srv/api/public; - add_header Content-Security-Policy "default-src 'self'"; + add_header Content-Security-Policy "default-src 'self'; frame-ancestors 'self'; base-uri 'self'; form-action 'self'"; add_header Permissions-Policy "accelerometer=(), ambient-light-sensor=(), autoplay=(), battery=(), camera=(), cross-origin-isolated=(), display-capture=(), document-domain=(), encrypted-media=(), execution-while-not-rendered=(), execution-while-out-of-viewport=(), fullscreen=(self), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), midi=(), navigation-override=(), payment=(self), picture-in-picture=(), publickey-credentials-get=(), screen-wake-lock=(), sync-xhr=(), usb=(), web-share=(), xr-spatial-tracking=(), conversion-measurement=(self),focus-without-user-activation=(), hid=(), idle-detection=(), serial=(),sync-script=(), trust-token-redemption=(), vertical-scroll=(self)"; client_max_body_size 51M; diff --git a/api/migrations/Version20231108140645.php b/api/migrations/Version20231108140645.php new file mode 100644 index 000000000..17e0919d7 --- /dev/null +++ b/api/migrations/Version20231108140645.php @@ -0,0 +1,31 @@ +addSql('ALTER TABLE entity ADD soft_delete BOOLEAN DEFAULT \'false\''); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE entity DROP soft_delete'); + } +} diff --git a/api/public/.well-known/security.txt b/api/public/.well-known/security.txt new file mode 100644 index 000000000..4890493b6 --- /dev/null +++ b/api/public/.well-known/security.txt @@ -0,0 +1,22 @@ +# Information related to reporting security vulnerabilities of this site. + +# How to communicate about security issues. +Contact: mailto:info@conduction.nl + +# Date and time after which this data is considered stale +Expires: 2024-12-31T23:00:00.000Z + +# Encryption + +# Acknowledgements + +# Preferred languages for communication. +Preferred-Languages: nl, en + +# Canonical + +# Policy + +# Hiring + +# Please see https://securitytxt.org/ for details of the specification of this file. diff --git a/api/src/Entity/Entity.php b/api/src/Entity/Entity.php index 437286337..b2294f398 100644 --- a/api/src/Entity/Entity.php +++ b/api/src/Entity/Entity.php @@ -472,6 +472,15 @@ class Entity */ private ?Source $defaultSource = null; + /** + * @var bool Whether objects of this entity should be soft deleted or not. + * + * @Groups({"read", "write"}) + * + * @ORM\Column(type="boolean", options={"default": false}, nullable=true) + */ + private bool $softDelete = false; + public function __toString() { return $this->getName().' ('.$this->getId().')'; @@ -1367,4 +1376,16 @@ public function setDefaultSource(?Source $defaultSource): self return $this; } + + public function getSoftDelete(): ?bool + { + return $this->softDelete; + } + + public function setSoftDelete(bool $softDelete): self + { + $this->softDelete = $softDelete; + + return $this; + } } diff --git a/api/src/Entity/ObjectEntity.php b/api/src/Entity/ObjectEntity.php index a4659124f..f2a300666 100644 --- a/api/src/Entity/ObjectEntity.php +++ b/api/src/Entity/ObjectEntity.php @@ -1127,6 +1127,7 @@ public function toArray(array $configuration = []): array 'level' => $configuration['level'], 'dateCreated' => $this->getDateCreated() ? $this->getDateCreated()->format('c') : null, 'dateModified' => $this->getDateModified() ? $this->getDateModified()->format('c') : null, + 'dateDeleted' => null, 'database' => [ 'id' => $this->getOrganization() && $this->getOrganization()->getDatabase() ? $this->getOrganization()->getDatabase()->getId()->toString() : null, 'name' => $this->getOrganization() && $this->getOrganization()->getDatabase() ? $this->getOrganization()->getDatabase()->getName() : null, diff --git a/publiccode.yaml b/publiccode.yaml index 0c6fcab70..b4ccb95ed 100644 --- a/publiccode.yaml +++ b/publiccode.yaml @@ -14,7 +14,7 @@ categories: - collaboration - it-development developmentStatus: beta -softwareType: !!! +softwareType: gateway description: en: localisedName: CommonGateway