diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 44e040a9be6f5fee92ad3875509da4d8d4140b8a..9c67d05b963030db852b38760956d6634ed6d869 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,8 +14,6 @@ cache: stages: - test - - deploy - - e2e .test_defaults: &test_defaults script: @@ -41,55 +39,26 @@ test-php8.0: PHP: "php8.0" <<: *test_defaults -linting: +psalm: stage: test allow_failure: true script: - sudo update-alternatives --set php /usr/bin/php7.4 - composer install - - result=0 - - composer run cs || result=1 - - composer run phpstan || result=1 - - composer run psalm || result=1 - - exit $result + - composer run psalm -.deploy_defaults: &deploy_defaults - needs: ["test-php7.3", "test-php7.4"] - except: - - schedules - stage: deploy +phpstan: + stage: test + allow_failure: true script: - - sudo update-alternatives --set php /usr/bin/php7.3 - # Add ssh key - - mkdir -p ~/.ssh - - echo "${DEPLOY_KEY}" | tr -d '\r' > ~/.ssh/id_rsa - - chmod 700 ~/.ssh && chmod 600 ~/.ssh/id_rsa - - ssh-keyscan -t rsa "${DEPLOY_HOST}" >> ~/.ssh/known_hosts - # Deploy - - dep deploy --file ./.gitlab-ci/deploy.php "${CI_ENVIRONMENT_NAME}" - - echo "Deployed to ${CI_ENVIRONMENT_URL}" - # Simple health check - - curl --max-time 10 --retry 3 --output /dev/null --silent --show-error --fail --location "${CI_ENVIRONMENT_URL}" - -deploy_development: - only: - refs: - - main - environment: - name: development - url: https://api-template-dev.tugraz.at/ - variables: - DEPLOY_HOST: mw01-dev.tugraz.at - DEPLOY_KEY: "$DEPLOY_SSH_KEY" - <<: *deploy_defaults + - sudo update-alternatives --set php /usr/bin/php7.4 + - composer install + - composer run phpstan -e2e_tests: - only: - refs: - - main - variables: - E2E_PROJECT: rest - stage: e2e - trigger: - project: dbp/e2e-tests - strategy: depend +cs-fixer: + stage: test + allow_failure: true + script: + - sudo update-alternatives --set php /usr/bin/php7.4 + - composer install + - composer run cs diff --git a/.gitlab-ci/.gitignore b/.gitlab-ci/.gitignore deleted file mode 100644 index 49ce3c193f83295e932ffb427c3d515c19b50b18..0000000000000000000000000000000000000000 --- a/.gitlab-ci/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/vendor \ No newline at end of file diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile deleted file mode 100644 index 9054e4f78eab76f46ccd31fd883eb81c63372db8..0000000000000000000000000000000000000000 --- a/.gitlab-ci/Dockerfile +++ /dev/null @@ -1,94 +0,0 @@ -FROM debian:bullseye - -ENV LANG C.UTF-8 -ENV DEBIAN_FRONTEND noninteractive - -# Basics -RUN apt-get update && apt-get install -y \ - composer \ - php-zip \ - rsync \ - sudo \ - wget \ - curl \ - lsb-release \ - && rm -rf /var/lib/apt/lists/* - -# PHP Repo -RUN wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg -RUN echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list - -# PHP 7.3 -RUN apt-get update && apt-get install -y \ - php7.3 \ - php7.3-curl \ - php7.3-soap \ - php7.3-xml \ - php7.3-ldap \ - php7.3-zip \ - php7.3-gmp \ - php7.3-xdebug \ - php7.3-gd \ - php7.3-mysql \ - php7.3-mbstring \ - && rm -rf /var/lib/apt/lists/* -COPY ./php-ini-overrides.ini /etc/php/7.3/cli/conf.d/ - -# PHP 7.4 -RUN apt-get update && apt-get install -y \ - php7.4 \ - php7.4-curl \ - php7.4-soap \ - php7.4-xml \ - php7.4-ldap \ - php7.4-zip \ - php7.4-gmp \ - php7.4-xdebug \ - php7.4-gd \ - php7.4-mysql \ - php7.4-mbstring \ - && rm -rf /var/lib/apt/lists/* -COPY ./php-ini-overrides.ini /etc/php/7.4/cli/conf.d/ - -# PHP 8.0 -RUN apt-get update && apt-get install -y \ - php8.0 \ - php8.0-curl \ - php8.0-soap \ - php8.0-xml \ - php8.0-ldap \ - php8.0-zip \ - php8.0-gmp \ - php8.0-xdebug \ - php8.0-gd \ - php8.0-mysql \ - php8.0-mbstring \ - && rm -rf /var/lib/apt/lists/* -COPY ./php-ini-overrides.ini /etc/php/8.0/cli/conf.d/ - -# Default to PHP 7.3 -RUN sudo update-alternatives --set php /usr/bin/php7.3 -RUN sudo update-alternatives --set phar /usr/bin/phar7.3 -RUN sudo update-alternatives --set phar.phar /usr/bin/phar.phar7.3 - -# Add a normal user and enable sudo -RUN useradd -u 1000 -ms /bin/bash user -RUN echo 'user ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers -USER user - -# Install deployer globally and add it to PATH -ENV COMPOSER_HOME="/home/user/.composer" -RUN mkdir -p "${COMPOSER_HOME}" -ADD composer.lock "${COMPOSER_HOME}" -ADD composer.json "${COMPOSER_HOME}" -RUN composer global install -ENV PATH "${COMPOSER_HOME}/vendor/bin:${PATH}" - -# Install a newer composer -RUN mkdir -p /home/user/.local/bin -WORKDIR /home/user/.local/bin -RUN wget https://raw.githubusercontent.com/composer/getcomposer.org/bfd95e2a4383ee9cf7c058c2df29d7acb5f86d77/web/installer -O - -q | php -- -RUN mv composer.phar composer -ENV PATH "/home/user/.local/bin:$PATH" - -WORKDIR /home/user \ No newline at end of file diff --git a/.gitlab-ci/README.md b/.gitlab-ci/README.md deleted file mode 100644 index 9a2853a96792dd0ef4cbf7fb49b38d51a8439ba8..0000000000000000000000000000000000000000 --- a/.gitlab-ci/README.md +++ /dev/null @@ -1,4 +0,0 @@ -* In case of an incompatible change increase the tag version number in build.sh -* ./build.sh -* (first time) sudo docker login registry.gitlab.tugraz.at -* sudo docker push registry.gitlab.tugraz.at/dbp/dbp-api/dbp-relay-server-template/main:v2 \ No newline at end of file diff --git a/.gitlab-ci/build.sh b/.gitlab-ci/build.sh deleted file mode 100755 index 739e6fd194db6a46bfcdae17a536b1029d166eeb..0000000000000000000000000000000000000000 --- a/.gitlab-ci/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -set -e -TAG="registry.gitlab.tugraz.at/dbp/relay/dbp-relay-server-template/main:v2" -sudo docker build --tag "${TAG}" --file "Dockerfile" . -sudo docker run --rm --security-opt label=disable \ - --volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \ - --tty --interactive "${TAG}" bash -echo "Now run: sudo docker push '$TAG'" diff --git a/.gitlab-ci/composer.json b/.gitlab-ci/composer.json deleted file mode 100644 index 9e39f35581a291659dadb97d4289b1bb82be5cd9..0000000000000000000000000000000000000000 --- a/.gitlab-ci/composer.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "require": { - "symfony/process": " ^5.0", - "symfony/console": " ^5.0", - "symfony/yaml": " ^5.0", - "deployer/deployer": " ^6.4", - "deployer/recipes": " ^6.2" - }, - "config": { - "platform": { - "php": "7.3" - } - } -} diff --git a/.gitlab-ci/composer.lock b/.gitlab-ci/composer.lock deleted file mode 100644 index 70bda21c244568793b5df2c595b77c8499f8213a..0000000000000000000000000000000000000000 --- a/.gitlab-ci/composer.lock +++ /dev/null @@ -1,1274 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "5648af569c512182216eb14dd25c05de", - "packages": [ - { - "name": "deployer/deployer", - "version": "v6.8.0", - "source": { - "type": "git", - "url": "https://github.com/deployphp/deployer.git", - "reference": "4e243a64ed61e779fbb31c5a74e258a8e52fdaff" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/deployphp/deployer/zipball/4e243a64ed61e779fbb31c5a74e258a8e52fdaff", - "reference": "4e243a64ed61e779fbb31c5a74e258a8e52fdaff", - "shasum": "" - }, - "require": { - "deployer/phar-update": "~2.2", - "php": "^7.2", - "pimple/pimple": "~3.0", - "symfony/console": "~2.7|~3.0|~4.0|~5.0", - "symfony/process": "~2.7|~3.0|~4.0|~5.0", - "symfony/yaml": "~2.7|~3.0|~4.0|~5.0" - }, - "require-dev": { - "phpunit/phpunit": "^8" - }, - "bin": [ - "bin/dep" - ], - "type": "library", - "autoload": { - "psr-4": { - "Deployer\\": "src/" - }, - "files": [ - "src/Support/helpers.php", - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Anton Medvedev", - "email": "anton@medv.io" - } - ], - "description": "Deployment Tool", - "homepage": "https://deployer.org", - "support": { - "docs": "https://deployer.org/docs", - "issues": "https://github.com/deployphp/deployer/issues", - "source": "https://github.com/deployphp/deployer" - }, - "funding": [ - { - "url": "https://github.com/antonmedv", - "type": "github" - }, - { - "url": "https://www.patreon.com/deployer", - "type": "patreon" - } - ], - "time": "2020-04-25T16:05:31+00:00" - }, - { - "name": "deployer/phar-update", - "version": "v2.2.0", - "source": { - "type": "git", - "url": "https://github.com/deployphp/phar-update.git", - "reference": "9ad07422f2cd43a1382ee8e134bdcd3a374848e3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/deployphp/phar-update/zipball/9ad07422f2cd43a1382ee8e134bdcd3a374848e3", - "reference": "9ad07422f2cd43a1382ee8e134bdcd3a374848e3", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "symfony/console": "~2.7|~3.0|~4.0|~5.0" - }, - "require-dev": { - "mikey179/vfsstream": "1.1.0", - "phpunit/phpunit": "3.7.*", - "symfony/process": "~2.7|~3.0|~4.0|~5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Deployer\\Component\\PharUpdate\\": "src/", - "Deployer\\Component\\PHPUnit\\": "src/PHPUnit/", - "Deployer\\Component\\Version\\": "src/Version/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kevin Herrera", - "email": "kevin@herrera.io", - "homepage": "http://kevin.herrera.io" - }, - { - "name": "Anton Medvedev", - "email": "anton@medv.io", - "homepage": "https://medv.io" - } - ], - "description": "Integrates Phar Update to Symfony Console.", - "homepage": "https://github.com/deployphp/phar-update", - "keywords": [ - "console", - "phar", - "update" - ], - "support": { - "issues": "https://github.com/deployphp/phar-update/issues", - "source": "https://github.com/deployphp/phar-update/tree/v2.2.0" - }, - "abandoned": true, - "time": "2019-12-12T13:45:57+00:00" - }, - { - "name": "deployer/recipes", - "version": "6.2.2", - "source": { - "type": "git", - "url": "https://github.com/deployphp/recipes.git", - "reference": "84b3229c518c094a950e1fe785b7b8f9598770fe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/deployphp/recipes/zipball/84b3229c518c094a950e1fe785b7b8f9598770fe", - "reference": "84b3229c518c094a950e1fe785b7b8f9598770fe", - "shasum": "" - }, - "require": { - "php": "~7.0" - }, - "require-dev": { - "deployer/deployer": "^6.3" - }, - "type": "library", - "autoload": { - "files": [ - "autoload.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Anton Medvedev", - "email": "anton@medv.io" - } - ], - "description": "3rd party deployer recipes", - "homepage": "https://github.com/deployphp/recipes", - "keywords": [ - "cachetool", - "cloudflare", - "deploy", - "deployer", - "deployment", - "hipchat", - "newrelic", - "rabbit", - "recipes", - "sentry", - "slack", - "yarn" - ], - "support": { - "issues": "https://github.com/deployphp/recipes/issues", - "source": "https://github.com/deployphp/recipes" - }, - "abandoned": true, - "time": "2019-06-27T06:47:18+00:00" - }, - { - "name": "pimple/pimple", - "version": "v3.5.0", - "source": { - "type": "git", - "url": "https://github.com/silexphp/Pimple.git", - "reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/silexphp/Pimple/zipball/a94b3a4db7fb774b3d78dad2315ddc07629e1bed", - "reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1 || ^2.0" - }, - "require-dev": { - "symfony/phpunit-bridge": "^5.4@dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4.x-dev" - } - }, - "autoload": { - "psr-0": { - "Pimple": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Pimple, a simple Dependency Injection Container", - "homepage": "https://pimple.symfony.com", - "keywords": [ - "container", - "dependency injection" - ], - "support": { - "source": "https://github.com/silexphp/Pimple/tree/v3.5.0" - }, - "time": "2021-10-28T11:13:42+00:00" - }, - { - "name": "psr/container", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" - }, - "time": "2021-03-05T17:36:06+00:00" - }, - { - "name": "symfony/console", - "version": "v5.4.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "a2c6b7ced2eb7799a35375fb9022519282b5405e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a2c6b7ced2eb7799a35375fb9022519282b5405e", - "reference": "a2c6b7ced2eb7799a35375fb9022519282b5405e", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" - }, - "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" - }, - "provide": { - "psr/log-implementation": "1.0|2.0" - }, - "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "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 the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", - "keywords": [ - "cli", - "command line", - "console", - "terminal" - ], - "support": { - "source": "https://github.com/symfony/console/tree/v5.4.2" - }, - "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": "2021-12-20T16:11:12+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.5.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.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": "2021-07-12T14:48:14+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.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": "2021-10-20T20:35:02+00:00" - }, - { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/81b86b50cf841a64252b439e738e97f4a34e2783", - "reference": "81b86b50cf841a64252b439e738e97f4a34e2783", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's grapheme_* functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "grapheme", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.24.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": "2021-11-23T21:10:46+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.24.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": "2021-02-19T12:13:01+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.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": "2021-11-30T18:21:41+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.24.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": "2021-06-05T21:20:04+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.24.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9", - "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.24.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": "2021-09-13T13:58:33+00:00" - }, - { - "name": "symfony/process", - "version": "v5.4.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "2b3ba8722c4aaf3e88011be5e7f48710088fb5e4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/2b3ba8722c4aaf3e88011be5e7f48710088fb5e4", - "reference": "2b3ba8722c4aaf3e88011be5e7f48710088fb5e4", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "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": "Executes commands in sub-processes", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/process/tree/v5.4.2" - }, - "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": "2021-12-27T21:01:00+00:00" - }, - { - "name": "symfony/service-contracts", - "version": "v2.5.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "suggest": { - "symfony/service-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.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": "2021-11-04T16:48:04+00:00" - }, - { - "name": "symfony/string", - "version": "v5.4.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "e6a5d5ecf6589c5247d18e0e74e30b11dfd51a3d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/e6a5d5ecf6589c5247d18e0e74e30b11dfd51a3d", - "reference": "e6a5d5ecf6589c5247d18e0e74e30b11dfd51a3d", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" - }, - "conflict": { - "symfony/translation-contracts": ">=3.0" - }, - "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\String\\": "" - }, - "files": [ - "Resources/functions.php" - ], - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", - "homepage": "https://symfony.com", - "keywords": [ - "grapheme", - "i18n", - "string", - "unicode", - "utf-8", - "utf8" - ], - "support": { - "source": "https://github.com/symfony/string/tree/v5.4.2" - }, - "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": "2021-12-16T21:52:00+00:00" - }, - { - "name": "symfony/yaml", - "version": "v5.4.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "b9eb163846a61bb32dfc147f7859e274fab38b58" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/b9eb163846a61bb32dfc147f7859e274fab38b58", - "reference": "b9eb163846a61bb32dfc147f7859e274fab38b58", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "symfony/console": "<5.3" - }, - "require-dev": { - "symfony/console": "^5.3|^6.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "bin": [ - "Resources/bin/yaml-lint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "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": "Loads and dumps YAML files", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.2" - }, - "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": "2021-12-16T21:58:21+00:00" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [], - "platform-overrides": { - "php": "7.3" - }, - "plugin-api-version": "2.2.0" -} diff --git a/.gitlab-ci/deploy.php b/.gitlab-ci/deploy.php deleted file mode 100644 index 8568fb25c405937c11b30fa4078c9801bbbce88d..0000000000000000000000000000000000000000 --- a/.gitlab-ci/deploy.php +++ /dev/null @@ -1,112 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Deployer; - -require 'recipe/common.php'; -require 'recipe/rsync.php'; -require 'recipe/cachetool.php'; - -// Global config -set('allow_anonymous_stats', false); - -$rsync_config = [ - 'exclude' => [ - '.git', - 'deploy.php', - '_composer_cache', - ], - 'exclude-file' => false, - 'include' => [], - 'include-file' => false, - 'filter' => [], - 'filter-file' => false, - 'filter-perdir' => false, - 'flags' => 'rz', - 'options' => ['delete', 'links'], - 'timeout' => 60, -]; - -// Hosts -host('development') - ->stage('development') - ->hostname('mw@mw01-dev.tugraz.at') - ->set('deploy_path', '/home/mw/dev01/deploy/api-server-template') - ->set('shared_dirs', ['var/log', 'var/sessions']) - ->set('APP_ENV', 'prod') - ->set('APP_DEBUG', '0') - ->set('AUTH_SERVER_URL', 'https://auth-dev.tugraz.at/auth/realms/tugraz-vpu') - ->set('AUTH_APIDOCS_KEYCLOAK_SERVER', 'https://auth-dev.tugraz.at/auth') - ->set('AUTH_APIDOCS_KEYCLOAK_REALM', 'tugraz-vpu') - ->set('AUTH_APIDOCS_KEYCLOAK_CLIENT_ID', 'dbp-api-template-frontend') - ->set('rsync', $rsync_config) - ->set('rsync_src', __DIR__.'/../') - ->set('rsync_dest', '{{release_path}}') - ->set('cachetool', '127.0.0.1:9001') - ->set('bin/cachetool', '/home/mw/bin/cachetool'); - -// Build task -task('build-custom', function () { - $APP_ENV = get('APP_ENV'); - - $vars = [ - 'APP_ENV' => $APP_ENV, - 'APP_DEBUG' => get('APP_DEBUG'), - 'AUTH_SERVER_URL' => get('AUTH_SERVER_URL'), - 'AUTH_APIDOCS_KEYCLOAK_SERVER' => get('AUTH_APIDOCS_KEYCLOAK_SERVER'), - 'AUTH_APIDOCS_KEYCLOAK_REALM' => get('AUTH_APIDOCS_KEYCLOAK_REALM'), - 'AUTH_APIDOCS_KEYCLOAK_CLIENT_ID' => get('AUTH_APIDOCS_KEYCLOAK_CLIENT_ID'), - ]; - - // build .env.local file - runLocally('rm -f .env.local'); - foreach ($vars as $key => $value) { - if (!isset($value) || $value === '') { - throw new \Exception("'${key}' is not set"); - } - runLocally("echo '${key}=${value}' >> .env.local"); - } - - // Add build commit - $commit = runLocally('git rev-parse --short HEAD'); - runLocally("echo \"CORE_API_BUILDINFO=${commit}\" >> .env.local"); - - // Add commit url to gitlab - $remote = runLocally('git config --get remote.origin.url'); - $parts = parse_url($remote); - $parts['path'] = substr($parts['path'], 0, (strrpos($parts['path'], '.'))); - $base_url = $parts['scheme'].'://'.$parts['host'].$parts['path']; - $build_url = $base_url.'/'.rawurlencode('commit').'/'.rawurlencode($commit); - runLocally("echo \"CORE_API_BUILDINFO_URL=${build_url}\" >> .env.local"); - - // composer install and optimize - runLocally('composer install --no-dev --classmap-authoritative'); - - // build .env.local.php file - runLocally('rm -f .env.local.php'); - runLocally("composer dump-env '$APP_ENV'"); - runLocally('rm -f .env.local'); - - // Cache clear/warmup - runLocally('php bin/console cache:clear'); -}); - -// Deploy task -task('deploy', [ - 'deploy:info', - 'build-custom', - 'deploy:prepare', - 'deploy:lock', - 'deploy:release', - 'rsync', - 'deploy:shared', - 'deploy:symlink', - 'deploy:unlock', - 'cleanup', - 'success', -]); -after('deploy:failed', 'deploy:unlock'); - -// Clear opcache -after('deploy:symlink', 'cachetool:clear:opcache'); diff --git a/.gitlab-ci/php-ini-overrides.ini b/.gitlab-ci/php-ini-overrides.ini deleted file mode 100644 index fe804da1502bdad9f5be6982fcc1e147cb94e8f0..0000000000000000000000000000000000000000 --- a/.gitlab-ci/php-ini-overrides.ini +++ /dev/null @@ -1,2 +0,0 @@ -zend.assertions = 1 -date.timezone = "Europe/Vienna"