From 32f58687eb2229b1653cd4680aaa29ed49773c8b Mon Sep 17 00:00:00 2001 From: shaky212 Date: Wed, 21 Dec 2022 14:58:53 +0100 Subject: [PATCH] Migrate travis ci/cd to github actions --- .github/workflows/main.yml | 2 +- .github/workflows/test-integration.yml | 141 +++++++------ .travis.yml | 47 ----- build.xml | 175 ---------------- .docheader => ci/qa/.docheader | 0 ci/qa/attrdc | 7 + ci/qa/attrsc | 7 + ci/qa/createtestdb | 5 + ci/qa/cvalidate | 5 + ci/qa/cypress | 6 + ci/qa/disabledebug | 6 + ci/qa/docheader | 9 + ci/qa/droptestdb | 5 + ci/qa/jscpd | 9 + ci/qa/parallel-lint | 6 + ci/qa/phpcov | 8 + ci/qa/phpcpd | 6 + ci/qa/phpcs | 6 + phpcs.xml => ci/qa/phpcs.xml | 0 ci/qa/phpcs_tests | 6 + phpcs_tests.xml => ci/qa/phpcs_tests.xml | 2 +- ci/qa/phpmd | 5 + phpmd.xml => ci/qa/phpmd.xml | 0 ci/qa/phpunit | 10 + phpunit.xml => ci/qa/phpunit.xml | 17 +- ci/qa/style-lint | 6 + ci/qa/translations | 7 + ci/qa/ts-lint | 6 + tslint.json => ci/qa/tslint.json | 0 ci/qa/yaml-lint | 5 + ci/qa/yarn-audit | 5 + composer.json | 247 +++++++++++++---------- docker/Dockerfiledev | 8 +- travis.php.ini | 1 - tsconfig.json | 2 +- 35 files changed, 376 insertions(+), 401 deletions(-) delete mode 100644 .travis.yml delete mode 100644 build.xml rename .docheader => ci/qa/.docheader (100%) create mode 100755 ci/qa/attrdc create mode 100755 ci/qa/attrsc create mode 100755 ci/qa/createtestdb create mode 100755 ci/qa/cvalidate create mode 100755 ci/qa/cypress create mode 100755 ci/qa/disabledebug create mode 100755 ci/qa/docheader create mode 100755 ci/qa/droptestdb create mode 100755 ci/qa/jscpd create mode 100755 ci/qa/parallel-lint create mode 100755 ci/qa/phpcov create mode 100755 ci/qa/phpcpd create mode 100755 ci/qa/phpcs rename phpcs.xml => ci/qa/phpcs.xml (100%) create mode 100755 ci/qa/phpcs_tests rename phpcs_tests.xml => ci/qa/phpcs_tests.xml (92%) create mode 100755 ci/qa/phpmd rename phpmd.xml => ci/qa/phpmd.xml (100%) create mode 100755 ci/qa/phpunit rename phpunit.xml => ci/qa/phpunit.xml (64%) create mode 100755 ci/qa/style-lint create mode 100755 ci/qa/translations create mode 100755 ci/qa/ts-lint rename tslint.json => ci/qa/tslint.json (100%) create mode 100755 ci/qa/yaml-lint create mode 100755 ci/qa/yarn-audit delete mode 100644 travis.php.ini diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b9263a1b8..b9eb20eab 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index d3f23e843..d02dd7285 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -9,64 +9,89 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 + timeout-minutes: 30 + env: + DOCKER_COMPOSE: docker-compose -f docker-compose.yml -f docker-compose-ci.yml + DOCKER_COMPOSE_PHP_FPM: docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T php-fpm + DOCKER_COMPOSE_OPENCONEXT: docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T openconext + DOCKER_COMPOSE_CYPRESS: docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T cypress steps: - - name: Check out the repo - uses: actions/checkout@v2 - - - name: Start the docker images for Cypress testing - run: docker-compose -f docker-compose.yml -f docker-compose-ci.yml up -d - - - name: Import the certificate on the Cypress docker machine - run: docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T cypress sh /e2e/docker/conf/cypress_import_cert.sh - - - name: Run composer - run: | - docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T php-fpm /usr/local/bin/composer install -n --prefer-dist -o --ignore-platform-reqs - env: - SYMFONY_ENV: dev - - - name: Run yarn - run: | - docker run -v ${PWD}:/var/www/html -w /var/www/html node:14 yarn install - env: - SYMFONY_ENV: dev - - - name: Create front end dependencies (yarn encore production) - run: | - docker run -v ${PWD}:/var/www/html -w /var/www/html node:14 yarn run encore production - env: - SYMFONY_ENV: dev - - - name: Get the database up and running - run: | - docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T php-fpm bin/console doctrine:migrations:migrate - env: - SYMFONY_ENV: dev - - - name: Remove leftover files - run: | - docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T php-fpm /bin/rm -rf /tmp/sp-dashboard/ /tmp/sp-dashboard-sessions/ - - - name: Make the log and cache dir writable - run: | - docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T php-fpm chmod 777 /var/www/html/var/{logs,cache} - - - name: Copy parameters.yml.dist to parameters.yml - run: | - docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T php-fpm cp /var/www/html/app/config/parameters.yml.dist /var/www/html/app/config/parameters.yml - - - name: Wait until the spdashboard is accessable - run: | - docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T openconext sh /usr/local/sbin/spdup.sh - - - name: Disable Symfony debug mode - run: | - docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T php-fpm sed -i s/\'dev\',\ true/\'dev\',\ false/g /var/www/html/web/app_dev.php - - - name: Run cypress tests - run: docker-compose -f docker-compose.yml -f docker-compose-ci.yml exec -T cypress cypress run --browser chrome - continue-on-error: true - + - name: Check out the repo + uses: actions/checkout@v2 + + - name: Start the docker images for Cypress testing + run: ${DOCKER_COMPOSE} up -d + + - name: Import the certificate on the Cypress docker machine + run: ${DOCKER_COMPOSE_CYPRESS} sh /e2e/docker/conf/cypress_import_cert.sh + + - name: Run composer + run: | + ${DOCKER_COMPOSE_PHP_FPM} /usr/local/bin/composer install -n --prefer-dist -o --ignore-platform-reqs + env: + SYMFONY_ENV: dev + + - name: Run yarn + run: | + docker run -v ${PWD}:/var/www/html -w /var/www/html node:14 yarn install + env: + SYMFONY_ENV: dev + + - name: Create front end dependencies (yarn encore production) + run: | + docker run -v ${PWD}:/var/www/html -w /var/www/html node:14 yarn run encore production + env: + SYMFONY_ENV: dev + + - name: Get the database up and running + run: | + ${DOCKER_COMPOSE_PHP_FPM} bin/console doctrine:migrations:migrate + env: + SYMFONY_ENV: dev + + - name: Remove leftover files + run: | + ${DOCKER_COMPOSE_PHP_FPM} /bin/rm -rf /tmp/sp-dashboard/ /tmp/sp-dashboard-sessions/ + + - name: Make the log and cache dir writable + run: | + ${DOCKER_COMPOSE_PHP_FPM} chmod 777 /var/www/html/var/{logs,cache} + + - name: Copy parameters.yml.dist to parameters.yml + run: | + ${DOCKER_COMPOSE_PHP_FPM} cp /var/www/html/app/config/parameters.yml.dist /var/www/html/app/config/parameters.yml + + - name: Wait until the spdashboard is accessable + run: | + ${DOCKER_COMPOSE_OPENCONEXT} sh /usr/local/sbin/spdup.sh + + - name: Disable Symfony debug mode + run: | + ${DOCKER_COMPOSE_PHP_FPM} sh -c 'composer disabledebug' + + - name: Run Copy Paste Detector + run: | + ${DOCKER_COMPOSE_PHP_FPM} sh -c 'composer jscpd' + continue-on-error: true + + - name: Run CI tests + run: | + ${DOCKER_COMPOSE_PHP_FPM} sh -c 'composer check' + + - name: Run Audit + run: | + ${DOCKER_COMPOSE_PHP_FPM} sh -c 'composer yarn-audit' + continue-on-error: true + + - name: Run Cypress tests + run: | + ${DOCKER_COMPOSE_PHP_FPM} sh -c 'composer cypress' + continue-on-error: true + + - name: Run translations + run: | + ${DOCKER_COMPOSE_PHP_FPM} sh -c 'composer translations' + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 89b56abec..000000000 --- a/.travis.yml +++ /dev/null @@ -1,47 +0,0 @@ -language: php - -addons: - apt: - packages: - - ant -php: - - 7.2 - - 7.3 - - 7.4 - -matrix: - allow_failures: - - php: 7.3 - - php: 7.4 - -cache: - directories: - - ~/.composer/cache/files - -before_install: - - sudo rm -rf ~/.nvm - curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - - - sudo apt-get install -y nodejs - -before_script: - - phpenv config-add travis.php.ini - - composer self-update --1 - - composer install --no-interaction - - curl -o- -L https://yarnpkg.com/install.sh | bash - - export PATH="$HOME/.yarn/bin:$PATH" - - nvm install 16 - - yarn install - - yarn encore production - -after_failure: - - cat /home/travis/build/SURFnet/sp-dashboard/var/logs/test.log - -script: - - ant - -branches: - only: - - develop - - master - - /^feature\/(.*)$/ - - /^bugfix\/(.*)$/ - - /^release\/(.*)$/ diff --git a/build.xml b/build.xml deleted file mode 100644 index 6af83909b..000000000 --- a/build.xml +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.docheader b/ci/qa/.docheader similarity index 100% rename from .docheader rename to ci/qa/.docheader diff --git a/ci/qa/attrdc b/ci/qa/attrdc new file mode 100755 index 000000000..f395d9606 --- /dev/null +++ b/ci/qa/attrdc @@ -0,0 +1,7 @@ +#!/usr/bin/env sh +# attributes data check + +cd $(dirname $0)/../../ + +# https://www.npmjs.com/package/ajv-cli +./node_modules/.bin/ajv validate -s app/Resources/schemas/attributes.scheme.json -d app/config/attributes.json diff --git a/ci/qa/attrsc b/ci/qa/attrsc new file mode 100755 index 000000000..cffc51d45 --- /dev/null +++ b/ci/qa/attrsc @@ -0,0 +1,7 @@ +#!/usr/bin/env sh +# attributes scheme check + +cd $(dirname $0)/../../ + +# https://www.npmjs.com/package/ajv-cli +./node_modules/.bin/ajv compile -s app/Resources/schemas/attributes.scheme.json diff --git a/ci/qa/createtestdb b/ci/qa/createtestdb new file mode 100755 index 000000000..7a3feb481 --- /dev/null +++ b/ci/qa/createtestdb @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +cd $(dirname $0)/../../ + +./bin/console doctrine:schema:create --env=test diff --git a/ci/qa/cvalidate b/ci/qa/cvalidate new file mode 100755 index 000000000..9286b924c --- /dev/null +++ b/ci/qa/cvalidate @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +cd $(dirname $0)/../../ + +composer validate diff --git a/ci/qa/cypress b/ci/qa/cypress new file mode 100755 index 000000000..e7f5dd02a --- /dev/null +++ b/ci/qa/cypress @@ -0,0 +1,6 @@ +#!/usr/bin/env sh +# attributes data check + +cd $(dirname $0)/../../ + +./node_modules/.bin/cypress run --browser chrome diff --git a/ci/qa/disabledebug b/ci/qa/disabledebug new file mode 100755 index 000000000..442439a81 --- /dev/null +++ b/ci/qa/disabledebug @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +cd $(dirname $0)/../../ + +sed s/\'dev\',\ true/\'dev\',\ false/g /var/www/html/web/app_dev.php + diff --git a/ci/qa/docheader b/ci/qa/docheader new file mode 100755 index 000000000..529508f24 --- /dev/null +++ b/ci/qa/docheader @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +cd $(dirname $0)/../../ + +./vendor/bin/docheader \ + check \ + --docheader ci/qa/.docheader \ + src/ \ + tests $1 diff --git a/ci/qa/droptestdb b/ci/qa/droptestdb new file mode 100755 index 000000000..f5afeb304 --- /dev/null +++ b/ci/qa/droptestdb @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +cd $(dirname $0)/../../ + +./bin/console doctrine:schema:drop --force --env=test diff --git a/ci/qa/jscpd b/ci/qa/jscpd new file mode 100755 index 000000000..d1df1df5b --- /dev/null +++ b/ci/qa/jscpd @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +cd $(dirname $0)/../../ + +# Run the JS CPD tool: +# - allowing for 30 lines of duplicate code +# - and setting a total copy paste limit to 1% project wide +# More info about jscpd usage: https://github.com/kucherenko/jscpd/tree/master/packages/jscpd#usage +./node_modules/.bin/jscpd src -l 30 -t 1 diff --git a/ci/qa/parallel-lint b/ci/qa/parallel-lint new file mode 100755 index 000000000..fcb4211c9 --- /dev/null +++ b/ci/qa/parallel-lint @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +cd $(dirname $0)/../../ + +# https://github.com/JakubOnderka/PHP-Parallel-Lint +./vendor/bin/parallel-lint app src tests web $1 diff --git a/ci/qa/phpcov b/ci/qa/phpcov new file mode 100755 index 000000000..fe7847b05 --- /dev/null +++ b/ci/qa/phpcov @@ -0,0 +1,8 @@ +#!/usr/bin/env sh + +cd $(dirname $0)/../../ + +php ./bin/console cache:clear --env=test +./vendor/bin/phpunit -c ci/qa/phpunit.xml --testsuite unit --coverage-php /tmp/sp-dashboard-coverage/unit.cov +./vendor/bin/phpunit -c ci/qa/phpunit.xml --testsuite integration --coverage-php /tmp/sp-dashboard-coverage/integration.cov +./vendor/bin/phpunit -c ci/qa/phpunit.xml --testsuite webtests --coverage-php /tmp/sp-dashboard-coverage/webtests.cov diff --git a/ci/qa/phpcpd b/ci/qa/phpcpd new file mode 100755 index 000000000..356c5ee15 --- /dev/null +++ b/ci/qa/phpcpd @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +cd $(dirname $0)/../../ + +# https://github.com/sebastianbergmann/phpcpd +./vendor/bin/phpcpd --names=*.php src $1 diff --git a/ci/qa/phpcs b/ci/qa/phpcs new file mode 100755 index 000000000..5716d9e59 --- /dev/null +++ b/ci/qa/phpcs @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +cd $(dirname $0)/../../ + +# https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage +./vendor/bin/phpcs --runtime-set ignore_warnings_on_exit 1 --standard=ci/qa/phpcs.xml --warning-severity=6 --error-severity=1 src diff --git a/phpcs.xml b/ci/qa/phpcs.xml similarity index 100% rename from phpcs.xml rename to ci/qa/phpcs.xml diff --git a/ci/qa/phpcs_tests b/ci/qa/phpcs_tests new file mode 100755 index 000000000..ebf60ebaa --- /dev/null +++ b/ci/qa/phpcs_tests @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +cd $(dirname $0)/../../ + +# https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage +./vendor/bin/phpcs --runtime-set ignore_warnings_on_exit 1 --standard=ci/qa/phpcs_tests.xml --warning-severity=6 --error-severity=1 src diff --git a/phpcs_tests.xml b/ci/qa/phpcs_tests.xml similarity index 92% rename from phpcs_tests.xml rename to ci/qa/phpcs_tests.xml index 8a96d06c6..bc8eaac6a 100644 --- a/phpcs_tests.xml +++ b/ci/qa/phpcs_tests.xml @@ -5,7 +5,7 @@ - + diff --git a/ci/qa/phpmd b/ci/qa/phpmd new file mode 100755 index 000000000..beb460596 --- /dev/null +++ b/ci/qa/phpmd @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +cd $(dirname $0)/../../ + +./vendor/bin/phpmd src text ci/qa/phpmd.xml diff --git a/phpmd.xml b/ci/qa/phpmd.xml similarity index 100% rename from phpmd.xml rename to ci/qa/phpmd.xml diff --git a/ci/qa/phpunit b/ci/qa/phpunit new file mode 100755 index 000000000..beba334b5 --- /dev/null +++ b/ci/qa/phpunit @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +cd $(dirname $0)/../../ + +# PHPUnit Bridge should always be used in Symfony applications. (https://symfony.com/doc/current/components/phpunit_bridge.html) +# This will create a phpunit executable in /bin/ instead of /vendor/bin/ +php ./bin/console cache:clear --env=test +./vendor/bin/phpunit -c ci/qa/phpunit.xml --testsuite unit +./vendor/bin/phpunit -c ci/qa/phpunit.xml --testsuite integration +./vendor/bin/phpunit -c ci/qa/phpunit.xml --testsuite webtests diff --git a/phpunit.xml b/ci/qa/phpunit.xml similarity index 64% rename from phpunit.xml rename to ci/qa/phpunit.xml index 3c438b34b..8a75d8e7d 100644 --- a/phpunit.xml +++ b/ci/qa/phpunit.xml @@ -5,37 +5,38 @@ xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.7/phpunit.xsd" backupGlobals="false" colors="true" - bootstrap="app/autoload.php" + bootstrap="../../app/autoload.php" beStrictAboutTestsThatDoNotTestAnything="true" failOnRisky="true"> + - tests/unit + ../../tests/unit - tests/integration + ../../tests/integration - tests/webtests + ../../tests/webtests - src + ../../src - src/*Bundle/Resources - src/*/*Bundle/Resources - src/*/Bundle/*Bundle/Resources + ../../src/*Bundle/Resources + ../../src/*/*Bundle/Resources + ../../src/*/Bundle/*Bundle/Resources diff --git a/ci/qa/style-lint b/ci/qa/style-lint new file mode 100755 index 000000000..c0def1068 --- /dev/null +++ b/ci/qa/style-lint @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +cd $(dirname $0)/../../ + +# tsconfig should be in the root +./node_modules/stylelint/bin/stylelint.js app/scss/**/*.scss -f unix $1 diff --git a/ci/qa/translations b/ci/qa/translations new file mode 100755 index 000000000..4cd42078f --- /dev/null +++ b/ci/qa/translations @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +cd $(dirname $0)/../../ + +./bin/console lexik:translations:import +./bin/console lexik:translations:import DashboardBundle +./bin/console lexik:translations:import DashboardSamlBundle diff --git a/ci/qa/ts-lint b/ci/qa/ts-lint new file mode 100755 index 000000000..ca42585af --- /dev/null +++ b/ci/qa/ts-lint @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +cd $(dirname $0)/../../ + +# tsconfig should be in the root +./node_modules/tslint/bin/tslint --project tsconfig.json $1 diff --git a/tslint.json b/ci/qa/tslint.json similarity index 100% rename from tslint.json rename to ci/qa/tslint.json diff --git a/ci/qa/yaml-lint b/ci/qa/yaml-lint new file mode 100755 index 000000000..76c474e40 --- /dev/null +++ b/ci/qa/yaml-lint @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +cd $(dirname $0)/../../ + +./bin/console lint:yaml app/config $i diff --git a/ci/qa/yarn-audit b/ci/qa/yarn-audit new file mode 100755 index 000000000..cca9b425d --- /dev/null +++ b/ci/qa/yarn-audit @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +cd $(dirname $0)/../../ + +yarn audit diff --git a/composer.json b/composer.json index 1301af402..4db63a804 100644 --- a/composer.json +++ b/composer.json @@ -1,109 +1,150 @@ { - "name": "surfnet/sp-dashboard", - "description": "Dashboard application for SURFconext Service Providers", - "license": "Apache-2.0", - "type": "project", - "autoload": { - "psr-4": { - "Surfnet\\": "src/Surfnet" - }, - "classmap": [ - "app/AppKernel.php", - "app/AppCache.php" - ] + "name": "surfnet/sp-dashboard", + "description": "Dashboard application for SURFconext Service Providers", + "license": "Apache-2.0", + "type": "project", + "autoload": { + "psr-4": { + "Surfnet\\": "src/Surfnet" }, - "autoload-dev": { - "psr-4": { - "Surfnet\\": "src\\Surfnet", - "Surfnet\\ServiceProviderDashboard\\Webtests\\": "tests/webtests" - }, - "files": [ - "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php" - ] + "classmap": [ + "app/AppKernel.php", + "app/AppCache.php" + ] + }, + "autoload-dev": { + "psr-4": { + "Surfnet\\": "src\\Surfnet", + "Surfnet\\ServiceProviderDashboard\\Webtests\\": "tests/webtests" }, - "require": { - "php": "7.2.*", - "ext-curl": "*", - "ext-gd": "*", - "ext-json": "*", - "ext-mbstring": "*", - "ext-mysqli": "*", - "ext-soap": "*", - "ext-xml": "*", - "doctrine/dbal": "~2.5.12", - "doctrine/doctrine-bundle": "^1.6", - "doctrine/doctrine-cache-bundle": "^1.2", - "doctrine/doctrine-migrations-bundle": "^1.0", - "doctrine/orm": "~2.5.0", - "guzzlehttp/guzzle": "^6.3", - "incenteev/composer-parameter-handler": "^2.1", - "jeremykendall/php-domain-parser": "~1.3.1", - "knplabs/knp-menu-bundle": "^2.1", - "league/tactician-bundle": "^0.4.1", - "lesstif/php-jira-rest-client": "^1.33", - "lexik/translation-bundle": "^4.0", - "nelmio/security-bundle": "^2.9", - "openconext/monitor-bundle": "^1.0", - "ramsey/uuid": "^3.7", - "sensio/distribution-bundle": "^5.0", - "sensio/framework-extra-bundle": "^3.0", - "stfalcon/tinymce-bundle": "^2.1", - "stof/doctrine-extensions-bundle": "^1.2", - "surfnet/stepup-saml-bundle": "^4.0", - "symfony/monolog-bundle": "^3.1.0", - "symfony/polyfill-apcu": "^1.0", - "symfony/swiftmailer-bundle": "^2.3.10", - "symfony/symfony": "3.4.*", - "twig/twig": "^1.34.4", - "xemlock/htmlpurifier-html5": "^0.1.10" + "files": [ + "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php" + ] + }, + "require": { + "php": "7.2.*", + "ext-curl": "*", + "ext-gd": "*", + "ext-json": "*", + "ext-mbstring": "*", + "ext-mysqli": "*", + "ext-soap": "*", + "ext-xml": "*", + "doctrine/dbal": "~2.5.12", + "doctrine/doctrine-bundle": "^1.6", + "doctrine/doctrine-cache-bundle": "^1.2", + "doctrine/doctrine-migrations-bundle": "^1.0", + "doctrine/orm": "~2.5.0", + "guzzlehttp/guzzle": "^6.3", + "incenteev/composer-parameter-handler": "^2.1", + "jeremykendall/php-domain-parser": "~1.3.1", + "knplabs/knp-menu-bundle": "^2.1", + "league/tactician-bundle": "^0.4.1", + "lesstif/php-jira-rest-client": "^1.33", + "lexik/translation-bundle": "^4.0", + "nelmio/security-bundle": "^2.9", + "openconext/monitor-bundle": "^1.0", + "ramsey/uuid": "^3.7", + "sensio/distribution-bundle": "^5.0", + "sensio/framework-extra-bundle": "^3.0", + "stfalcon/tinymce-bundle": "^2.1", + "stof/doctrine-extensions-bundle": "^1.2", + "surfnet/stepup-saml-bundle": "^4.0", + "symfony/monolog-bundle": "^3.1.0", + "symfony/polyfill-apcu": "^1.0", + "symfony/swiftmailer-bundle": "^2.3.10", + "symfony/symfony": "3.4.*", + "twig/twig": "^1.34.4", + "xemlock/htmlpurifier-html5": "^0.1.10" + }, + "require-dev": { + "doctrine/doctrine-fixtures-bundle": "^2.4", + "jakub-onderka/php-parallel-lint": "^0.9.2", + "malukenho/docheader": "^0.1.6", + "mockery/mockery": "^1.2", + "phpmd/phpmd": "~2.8.0", + "phpunit/phpcov": "~5.0", + "phpunit/phpunit": "~7.5", + "sebastian/phpcpd": "^4.1", + "sensio/generator-bundle": "^3.0", + "squizlabs/php_codesniffer": "^2.8", + "symfony/phpunit-bridge": "^3.0" + }, + "scripts": { + "symfony-scripts": [ + "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" + ], + "post-install-cmd": [ + "@symfony-scripts" + ], + "post-update-cmd": [ + "@symfony-scripts" + ], + "check": [ + "@phpcs", + "@phpcs_tests", + "@phpmd", + "@docheader", + "@parallel-lint", + "@yaml-lint", + "@ts-lint", + "@style-lint", + "@cvalidate", + "@attrsc", + "@attrdc", + "@droptestdb", + "@createtestdb", + "@test" + ], + "test-db": [ + "@droptestdb", + "@createtestdb" + ], + "disabledebug": "./ci/qa/disabledebug", + "jscpd": "./ci/qa/jscpd", + "phpcs": "./ci/qa/phpcs", + "phpcs_tests": "./ci/qa/phpcs_tests", + "phpmd": "./ci/qa/phpmd", + "docheader": "./ci/qa/docheader", + "parallel-lint": "./ci/qa/parallel-lint", + "yaml-lint": "./ci/qa/yaml-lint", + "ts-lint": "./ci/qa/ts-lint", + "style-lint": "./ci/qa/style-lint", + "cvalidate": "./ci/qa/cvalidate", + "attrdc": "./ci/qa/attrdc", + "attrsc": "./ci/qa/attrsc", + "droptestdb": "./ci/qa/droptestdb", + "createtestdb": "./ci/qa/createtestdb", + "phpcov": "./ci/qa/phpcov", + "test": "./ci/qa/phpunit", + "cypress": "./ci/qa/cypress", + "yarn-audit": "./ci/qa/yarn-audit", + "translations": "./ci/qa/translations" + }, + "config": { + "optimize-autoloader": true, + "sort-packages": true, + "platform": { + "php": "7.2" }, - "require-dev": { - "doctrine/doctrine-fixtures-bundle": "^2.4", - "jakub-onderka/php-parallel-lint": "^0.9.2", - "malukenho/docheader": "^0.1.6", - "mockery/mockery": "^1.2", - "phpmd/phpmd": "~2.8.0", - "phpunit/phpcov": "~5.0", - "phpunit/phpunit": "~7.5", - "sebastian/phpcpd": "^4.1", - "sensio/generator-bundle": "^3.0", - "squizlabs/php_codesniffer": "^2.8", - "symfony/phpunit-bridge": "^3.0" - }, - "scripts": { - "symfony-scripts": [ - "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", - "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", - "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", - "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile" - ], - "post-install-cmd": [ - "@symfony-scripts" - ], - "post-update-cmd": [ - "@symfony-scripts" - ] - }, - "config": { - "optimize-autoloader": true, - "sort-packages": true, - "platform": { - "php": "7.2" - }, - "allow-plugins": { - "ocramius/package-versions": true - } - }, - "extra": { - "symfony-app-dir": "app", - "symfony-bin-dir": "bin", - "symfony-var-dir": "var", - "symfony-web-dir": "web", - "symfony-tests-dir": "tests", - "symfony-assets-install": "relative", - "incenteev-parameters": { - "file": "app/config/parameters.yml" - }, - "branch-alias": null + "allow-plugins": { + "ocramius/package-versions": true, + "symfony/flex": false } + }, + "extra": { + "symfony-app-dir": "app", + "symfony-bin-dir": "bin", + "symfony-var-dir": "var", + "symfony-web-dir": "web", + "symfony-tests-dir": "tests", + "symfony-assets-install": "relative", + "incenteev-parameters": { + "file": "app/config/parameters.yml" + }, + "branch-alias": null + } } diff --git a/docker/Dockerfiledev b/docker/Dockerfiledev index 6a6edf713..afc894fbe 100644 --- a/docker/Dockerfiledev +++ b/docker/Dockerfiledev @@ -9,17 +9,13 @@ CMD ["/usr/local/sbin/start.sh"] FROM ghcr.io/openconext/openconext-containers/openconext-phpfpm-dev:latest AS spdphpfpm WORKDIR /var/www/html/ -COPY --from=composer:1 /usr/bin/composer /usr/local/bin/composer +COPY --from=composer:2.2.9 /usr/bin/composer /usr/local/bin/composer COPY --from=openconext /etc/pki/ca-trust/source/anchors/star.vm.openconext.org.pem /usr/local/share/ca-certificates/star.vm.openconext.org.pem COPY ./conf/10-timezone-openconext.ini /usr/local/etc/php/conf.d/ RUN /usr/sbin/update-ca-certificates && \ rm -rf /tmp/sp-dashboard/ /tmp/sp-dashboard-sessions/ && \ - apk --update --no-cache add yarn autoconf g++ make && \ - docker-php-ext-install mysqli && \ - pecl install -f xdebug && \ - docker-php-ext-enable xdebug && \ - apk del --purge autoconf g++ make + apk --update --no-cache add yarn CMD ["/usr/local/sbin/php-fpm" , "-F"] diff --git a/travis.php.ini b/travis.php.ini deleted file mode 100644 index e6336951a..000000000 --- a/travis.php.ini +++ /dev/null @@ -1 +0,0 @@ -date.timezone = "Europe/Amsterdam" diff --git a/tsconfig.json b/tsconfig.json index effb94f89..e0c85e0ba 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "exclude": [ - "node_modules", + "./node_modules", "vendor", "**/*.test.ts" ],