--- /dev/null
+/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
*~
*.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
--- /dev/null
+{
+ "default": true,
+ "MD013": false
+}
+++ /dev/null
-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
+++ /dev/null
-#!/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
coverage:
status:
- project: yes
-
+ project:
+ default:
+ target: 0%
+ threshold: 2%
+ patch: off
comment:
layout: "diff"
behavior: once
require_base: no
require_head: yes
branches: null
+
+github_checks:
+ annotations: false
"preferred-install": {
"simplesamlphp/simplesamlphp": "source",
"*": "dist"
+ },
+ "allow-plugins": {
+ "composer/package-versions-deprecated": true,
+ "simplesamlphp/composer-module-installer": true
}
},
"autoload": {
}
},
"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"
}
}
--- /dev/null
+<?xml version="1.0"?>
+<ruleset name="SimpleSAMLphp SAML2 ruleset">
+ <description>
+ By default it is less stringent about long lines than other coding standards
+ </description>
+
+ <file>src</file>
+ <file>tests</file>
+ <!-- Use this to exclude paths. You can have multiple patterns -->
+ <!--<exclude-pattern>*/tests/*</exclude-pattern>-->
+ <!--<exclude-pattern>*/other/*</exclude-pattern>-->
+
+ <!-- This is the rule we inherit from. If you want to exclude some specific rules, see the docs on how to do that -->
+ <rule ref="PSR12"/>
+</ruleset>
-<?xml version="1.0" encoding="utf-8" ?>
-<phpunit bootstrap="tests/bootstrap.php">
- <testsuites>
- <testsuite name="The project's test suite">
- <directory>tests/</directory>
- </testsuite>
- </testsuites>
- <filter>
- <whitelist processUncoveredFilesFromWhitelist="true">
- <directory suffix=".php">./lib</directory>
- </whitelist>
- </filter>
- <logging>
- <log type="coverage-text" target="php://stdout" showUncoveredFiles="true" />
- <log type="coverage-html" target="build/coverage" title="PHP Coveralls" charset="UTF-8" yui="true" highlight="true" lowUpperBound="35" highLowerBound="70" />
- <log type="coverage-clover" target="build/logs/clover.xml" />
- </logging>
+<?xml version="1.0" encoding="utf-8"?>
+<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="tests/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
+ <coverage processUncoveredFiles="true">
+ <include>
+ <directory suffix=".php">./lib</directory>
+ </include>
+ <report>
+ <clover outputFile="build/logs/clover.xml"/>
+ <html outputDirectory="build/coverage" lowUpperBound="35" highLowerBound="70"/>
+ <text outputFile="php://stdout" showUncoveredFiles="true"/>
+ </report>
+ </coverage>
+ <testsuites>
+ <testsuite name="The project's test suite">
+ <directory>./vendor/simplesamlphp/simplesamlphp-test-framework/src</directory>
+ <directory>./tests</directory>
+ </testsuite>
+ </testsuites>
+ <logging/>
</phpunit>
-
<psalm
name="The SimpleSAMLphp sqlauth module"
useDocblockTypes="true"
- totallyTyped="false"
+ errorLevel="2"
+ reportMixedIssues="false"
>
<projectFiles>
- <directory name="lib" />
+ <directory name="src" />
</projectFiles>
<issueHandlers>
<MissingReturnType errorLevel="info" />
<MissingPropertyType errorLevel="info" />
<InvalidDocblock errorLevel="info" />
- <MisplacedRequiredParam errorLevel="info" />
<PropertyNotSetInConstructor errorLevel="info" />
<MissingConstructor errorLevel="info" />
<?php
+declare(strict_types=1);
+
$projectRoot = dirname(__DIR__);
-require_once($projectRoot.'/vendor/autoload.php');
+require_once($projectRoot . '/vendor/autoload.php');
// Symlink module into ssp vendor lib so that templates and urls can resolve correctly
-$linkPath = $projectRoot.'/vendor/simplesamlphp/simplesamlphp/modules/sqlauth';
+$linkPath = $projectRoot . '/vendor/simplesamlphp/simplesamlphp/modules/sqlauth';
if (file_exists($linkPath) === false) {
echo "Linking '$linkPath' to '$projectRoot'\n";
symlink($projectRoot, $linkPath);