From da220714f26fb1c398a60484f17d27664254bcf7 Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Wed, 2 Aug 2023 14:32:24 -0400 Subject: [PATCH] update most ancillary files, based on upstream commit: 781489f663c1832c35af332f6ad5a709dfdceb8d https://github.com/simplesamlphp/simplesamlphp-module-sqlauth.git --- .gitattributes | 13 +++++++++++++ .gitignore | 9 +++++++++ .markdownlintignore | 1 + .markdownlintrc | 4 ++++ .travis.yml | 31 ------------------------------- bin/check-syntax.sh | 15 --------------- .codecov.yml => codecov.yml | 10 ++++++++-- composer.json | 14 +++++++++----- phpcs.xml | 15 +++++++++++++++ phpunit.xml | 37 +++++++++++++++++++------------------ psalm.xml | 6 +++--- tests/bootstrap.php | 6 ++++-- 12 files changed, 85 insertions(+), 76 deletions(-) create mode 100644 .gitattributes create mode 100644 .markdownlintignore create mode 100644 .markdownlintrc delete mode 100644 .travis.yml delete mode 100755 bin/check-syntax.sh rename .codecov.yml => codecov.yml (54%) create mode 100644 phpcs.xml diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..3d472ad --- /dev/null +++ b/.gitattributes @@ -0,0 +1,13 @@ +/tools/ export-ignore +/tests/ export-ignore +codecov.yml export-ignore +.editorconfig export-ignore +.gitattributes export-ignore +.gitignore export-ignore +psalm.xml export-ignore +psalm-dev.xml export-ignore +phpcs.xml export-ignore +phpunit.xml export-ignore +.php_cs.dist export-ignore +.markdownlintignore export-ignore +.markdownlintrc export-ignore diff --git a/.gitignore b/.gitignore index e9517ad..5af2d50 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,12 @@ *~ *.swo *.swp + +.phpunit.result.cache +composer.lock +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +# composer.lock diff --git a/.markdownlintignore b/.markdownlintignore new file mode 100644 index 0000000..140fada --- /dev/null +++ b/.markdownlintignore @@ -0,0 +1 @@ +vendor/* diff --git a/.markdownlintrc b/.markdownlintrc new file mode 100644 index 0000000..b077f0e --- /dev/null +++ b/.markdownlintrc @@ -0,0 +1,4 @@ +{ + "default": true, + "MD013": false +} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fec43ab..0000000 --- a/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -sudo: required - -language: php - -php: - - 5.6 - - 7.0 - - 7.1 - - 7.2 - - 7.3 - -env: - - SIMPLESAMLPHP_VERSION=1.17.* - -before_script: - - composer require "simplesamlphp/simplesamlphp:${SIMPLESAMLPHP_VERSION}" --no-update - - composer update --no-interaction - - if [[ "$TRAVIS_PHP_VERSION" == "7.3" ]]; then composer require --dev vimeo/psalm:1.1.9; fi - -script: - - bin/check-syntax.sh - - if [[ "$TRAVIS_PHP_VERSION" == "5.6" ]]; then php vendor/phpunit/phpunit/phpunit; else php vendor/phpunit/phpunit/phpunit --no-coverage; fi - - if [[ "$TRAVIS_PHP_VERSION" == "7.3" ]]; then vendor/bin/psalm; fi - -after_success: - # Codecov, need to edit bash uploader for incorrect TRAVIS_PYTHON_VERSION environment variable matching, at least until codecov/codecov-bash#133 is resolved - - curl -s https://codecov.io/bash > .codecov - - sed -i -e 's/TRAVIS_.*_VERSION/^TRAVIS_.*_VERSION=/' .codecov - - chmod +x .codecov - - if [[ $TRAVIS_PHP_VERSION == "5.6" ]]; then ./.codecov -X gcov; fi -# - if [[ "$TRAVIS_PHP_VERSION" == "5.6" ]]; then bash <(curl -s https://codecov.io/bash); fi diff --git a/bin/check-syntax.sh b/bin/check-syntax.sh deleted file mode 100755 index db6dc4b..0000000 --- a/bin/check-syntax.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -PHP='/usr/bin/env php' -RETURN=0 - -# check PHP files -for FILE in `find lib tests -name "*.php"`; do - $PHP -l $FILE > /dev/null 2>&1 - if [ $? -ne 0 ]; then - echo "Syntax check failed for ${FILE}" - RETURN=`expr ${RETURN} + 1` - fi -done - -exit $RETURN diff --git a/.codecov.yml b/codecov.yml similarity index 54% rename from .codecov.yml rename to codecov.yml index f7f39e1..d01dd7d 100644 --- a/.codecov.yml +++ b/codecov.yml @@ -1,7 +1,10 @@ coverage: status: - project: yes - + project: + default: + target: 0% + threshold: 2% + patch: off comment: layout: "diff" behavior: once @@ -9,3 +12,6 @@ comment: require_base: no require_head: yes branches: null + +github_checks: + annotations: false diff --git a/composer.json b/composer.json index 14afd78..dffd959 100644 --- a/composer.json +++ b/composer.json @@ -18,6 +18,10 @@ "preferred-install": { "simplesamlphp/simplesamlphp": "source", "*": "dist" + }, + "allow-plugins": { + "composer/package-versions-deprecated": true, + "simplesamlphp/composer-module-installer": true } }, "autoload": { @@ -31,12 +35,12 @@ } }, "require": { - "php": ">=5.6", - "simplesamlphp/composer-module-installer": "~1.1" + "php": "^7.4", + "simplesamlphp/assert": "^1.0.0", + "simplesamlphp/composer-module-installer": "^1.3.2", + "simplesamlphp/simplesamlphp": "*" }, "require-dev": { - "phpunit/phpunit": "~5.7", - "simplesamlphp/simplesamlphp": "^1.17", - "webmozart/assert": "^1.4" + "simplesamlphp/simplesamlphp-test-framework": "^1.5.4" } } diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 0000000..dd28f7e --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,15 @@ + + + + By default it is less stringent about long lines than other coding standards + + + src + tests + + + + + + + diff --git a/phpunit.xml b/phpunit.xml index c0985fd..af9cf95 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,19 +1,20 @@ - - - - - tests/ - - - - - ./lib - - - - - - - + + + + + ./lib + + + + + + + + + + ./vendor/simplesamlphp/simplesamlphp-test-framework/src + ./tests + + + - diff --git a/psalm.xml b/psalm.xml index a9cae34..32626a6 100644 --- a/psalm.xml +++ b/psalm.xml @@ -2,10 +2,11 @@ - + @@ -18,7 +19,6 @@ - diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 28efee1..d3b131a 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,10 +1,12 @@