From 15aff1bf7febfd332d2e080b178c637b7dcd13b5 Mon Sep 17 00:00:00 2001 From: Maxime Rainville Date: Thu, 28 Oct 2021 13:04:33 +1300 Subject: [PATCH 1/2] API Migrate to PHPUnit 9 --- .travis.yml | 34 +++------------------------------- composer.json | 6 +++--- phpunit.xml.dist | 25 ++++++++++++++----------- 3 files changed, 20 insertions(+), 45 deletions(-) diff --git a/.travis.yml b/.travis.yml index a469eeb..74b9cbd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,32 +1,4 @@ -language: php +version: ~> 1.0 -services: - - mysql - -env: - global: - - TRAVIS_NODE_VERSION="10" - -matrix: - include: - - php: 7.2 - env: DB=MYSQL SYMFONY_VERSION=^4 FRAMEWORK_VERSION=4.5.1 PHPUNIT_TEST=1 - - php: 7.3 - env: DB=MYSQL FRAMEWORK_VERSION=4.x-dev PHPUNIT_TEST=1 PHPCS_TEST=1 - -before_script: - - phpenv rehash - - phpenv config-rm xdebug.ini - - - composer validate - - composer require --no-update silverstripe/framework:"$FRAMEWORK_VERSION" - - if [[ $SYMFONY_VERSION ]]; then composer require --no-update symfony/event-dispatcher:$SYMFONY_VERSION; fi - - composer install --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile - -script: - - if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi - - if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi - - if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs src/ tests/; fi - -after_success: - - if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml -F php; fi +import: + - silverstripe/silverstripe-travis-shared:config/provision/standard-jobs-fixed.yml diff --git a/composer.json b/composer.json index 1f53ee6..2c2dde7 100644 --- a/composer.json +++ b/composer.json @@ -9,13 +9,13 @@ ], "license": "BSD-3-Clause", "require": { - "silverstripe/framework": "^4.5.1", + "silverstripe/framework": "^4.10", "symfony/event-dispatcher": "^4.4 || ^5", "psr/event-dispatcher": "^1", - "php": "^7.2" + "php": "^7.3 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^5.7", + "phpunit/phpunit": "^9.5", "squizlabs/php_codesniffer": "^3.0" }, "autoload": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index e801060..3c62d7c 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,13 +1,16 @@ - - - tests/ - - - + + + + src/ - - tests/ - - - + + + tests/ + + + + + tests/ + + From cbd408d985ffb1f49f7c004d53eb5410eebe795f Mon Sep 17 00:00:00 2001 From: Maxime Rainville Date: Thu, 28 Oct 2021 13:16:26 +1300 Subject: [PATCH 2/2] MNT Update linting config --- phpcs.xml.dist | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/phpcs.xml.dist b/phpcs.xml.dist index fe58f6f..703c06f 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -2,10 +2,12 @@ CodeSniffer ruleset for SilverStripe coding conventions. - - + src + tests + + + - - +