diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9794fe3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,16 @@ +name: CI + +on: + push: + pull_request: + workflow_dispatch: + # Every Thursday at 11:30am UTC + schedule: + - cron: '30 11 * * 4' + +jobs: + ci: + name: CI + # Only run cron on the silverstripe account + if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule') + uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bfab8f1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -language: php - -env: - global: - - COMPOSER_ROOT_VERSION="1.0.x-dev" - -matrix: - include: - - php: 5.6 - env: DB=MYSQL PHPCS_TEST=1 PHPUNIT_TEST=1 - - php: 7.0 - env: DB=PGSQL PHPUNIT_TEST=1 - - php: 7.1 - env: DB=MYSQL PHPUNIT_COVERAGE_TEST=1 - -before_script: - - phpenv rehash - - phpenv config-rm xdebug.ini - - - composer validate - - composer require --no-update silverstripe/recipe-cms:4.4.x-dev - - if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.1.x-dev; fi - - composer install --prefer-dist --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; fi diff --git a/README.md b/README.md index 3ea8bfb..ee1dd1f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # SilverStripe SAML module -[![Build Status](https://travis-ci.org/silverstripe/silverstripe-saml.svg)](https://travis-ci.org/silverstripe/silverstripe-saml) +[![Build Status](https://github.com/silverstripe/silverstripe-saml/actions/workflows/ci.yml/badge.svg)](https://github.com/silverstripe/silverstripe-saml/actions/workflows/ci.yml) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/silverstripe/silverstripe-saml/badges/quality-score.png)](https://scrutinizer-ci.com/g/silverstripe/silverstripe-saml/) [![codecov](https://codecov.io/gh/silverstripe/silverstripe-saml/branch/master/graph/badge.svg)](https://codecov.io/gh/silverstripe/silverstripe-saml) diff --git a/composer.json b/composer.json index 97da8d3..5712358 100644 --- a/composer.json +++ b/composer.json @@ -15,15 +15,13 @@ } ], "require": { - "php": ">=5.6", + "php": ">=7.4", "silverstripe/framework": "^4@dev", "silverstripe/cms": "^4@dev", - "zendframework/zend-authentication": "^2.5.1", - "zendframework/zend-session": "^2.5.1", - "onelogin/php-saml": "^3.0.0" + "onelogin/php-saml": "^4.1.0" }, "require-dev": { - "phpunit/phpunit": "^5.7", + "phpunit/phpunit": "^9.5", "squizlabs/php_codesniffer": "^3.0" }, "extra": { diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 9979fd7..fbf5558 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -2,9 +2,15 @@ CodeSniffer ruleset for SilverStripe coding conventions. - - + src + tests + + + - + + + + diff --git a/src/Services/SAMLConfiguration.php b/src/Services/SAMLConfiguration.php index 2e5b387..8eebb3d 100644 --- a/src/Services/SAMLConfiguration.php +++ b/src/Services/SAMLConfiguration.php @@ -77,7 +77,7 @@ class SAMLConfiguration * @var bool Decide if GUID should be exposed as an attribute mappable using `GUID` as the claim. This is a feature * that is found in other SAML libraries but in an ideal world should not be utilised in favour of the IdP offering * the nameid data as another "more stable" attribute. - * + * * Note that this data will be effected by: * - The expect_binary_nameid configuration value * - The extension point `updateGuid` on SAMLController