diff --git a/.github/workflows/php-package.yml b/.github/workflows/php-package.yml index 7840700a..6321b7ef 100644 --- a/.github/workflows/php-package.yml +++ b/.github/workflows/php-package.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: operating-system: ['ubuntu-latest'] - php-versions: [7.3, 7.4, 8.0, 8.1, 8.2, 8.3] + php-versions: [7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4] steps: - name: Setup PHP, with composer and extensions uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php @@ -46,9 +46,9 @@ jobs: php vendor/bin/phploc src/. mkdir -p tests/build/dependences php vendor/bin/pdepend --summary-xml=tests/build/logs/dependence-summary.xml --jdepend-chart=tests/build/dependences/jdepend.svg --overview-pyramid=tests/build/dependences/pyramid.svg src/. - + - name: PHP Code Sniffer run: php vendor/bin/phpcs --standard=tests/ZendModStandard src/Saml2 demo1 demo2 endpoints tests/src - + - name: Run unit tests run: vendor/bin/phpunit --verbose --debug diff --git a/src/Saml2/Auth.php b/src/Saml2/Auth.php index 35037031..a860b358 100644 --- a/src/Saml2/Auth.php +++ b/src/Saml2/Auth.php @@ -171,7 +171,7 @@ class Auth * @throws Exception * @throws Error */ - public function __construct(array $settings = null, bool $spValidationOnly = false) + public function __construct(?array $settings = null, bool $spValidationOnly = false) { $this->_settings = new Settings($settings, $spValidationOnly); } diff --git a/src/Saml2/Settings.php b/src/Saml2/Settings.php index 0ca095a9..c750608e 100644 --- a/src/Saml2/Settings.php +++ b/src/Saml2/Settings.php @@ -120,7 +120,7 @@ class Settings * @throws Error If any settings parameter is invalid * @throws Exception If Settings is incorrectly supplied */ - public function __construct(array $settings = null,bool $spValidationOnly = false) + public function __construct(?array $settings = null,bool $spValidationOnly = false) { $this->_spValidationOnly = $spValidationOnly; $this->_loadPaths(); diff --git a/src/Saml2/Utils.php b/src/Saml2/Utils.php index eea057ff..5742a063 100644 --- a/src/Saml2/Utils.php +++ b/src/Saml2/Utils.php @@ -954,7 +954,7 @@ public static function getExpireTime($cacheDuration = null, $validUntil = null) * * @return DOMNodeList The queried nodes */ - public static function query(DOMDocument $dom, $query, DOMElement $context = null) + public static function query(DOMDocument $dom, $query, ?DOMElement $context = null) { $xpath = new DOMXPath($dom); $xpath->registerNamespace('samlp', Constants::NS_SAMLP);