diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml
index 7db50bd..8ffa2dd 100644
--- a/.github/workflows/php.yml
+++ b/.github/workflows/php.yml
@@ -19,9 +19,9 @@ jobs:
strategy:
fail-fast: false
matrix:
- php-version: ['8.1', '8.2', '8.3', '8.4']
+ php-version: ['8.2', '8.3', '8.4']
- uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_phplinter.yml@v1.10.0
+ uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_phplinter.yml@v1.10.1
with:
php-version: ${{ matrix.php-version }}
@@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: false
- uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_linter.yml@v1.10.0
+ uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_linter.yml@v1.10.1
with:
enable_eslinter: false
enable_jsonlinter: true
@@ -45,7 +45,7 @@ jobs:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
- php-versions: ['8.1', '8.2', '8.3', '8.4']
+ php-versions: ['8.2', '8.3', '8.4']
steps:
- name: Setup PHP, with composer and extensions
@@ -107,7 +107,7 @@ jobs:
fail-fast: true
matrix:
operating-system: [windows-latest]
- php-versions: ['8.1', '8.2', '8.3', '8.4']
+ php-versions: ['8.2', '8.3', '8.4']
steps:
- name: Setup PHP, with composer and extensions
@@ -115,7 +115,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, spl, xml
+ extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, spl, xml, zip
tools: composer
ini-values: error_reporting=E_ALL
coverage: none
@@ -161,9 +161,8 @@ jobs:
with:
# Should be the higest supported version, so we can use the newest tools
php-version: '8.4'
- tools: composer, composer-require-checker, composer-unused, phpcs, psalm
- # optional performance gain for psalm: opcache
- extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, opcache, openssl, pcre, posix, spl, xml
+ tools: composer, composer-require-checker, composer-unused
+ extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, spl, xml
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
@@ -193,29 +192,15 @@ jobs:
run: composer-unused
- name: PHP Code Sniffer
- run: phpcs
-
- - name: Psalm
- continue-on-error: true
- run: |
- psalm -c psalm.xml \
- --show-info=true \
- --shepherd \
- --php-version=${{ steps.setup-php.outputs.php-version }}
+ run: vendor/bin/phpcs
- - name: Psalm (testsuite)
+ - name: PHPStan
run: |
- psalm -c psalm-dev.xml \
- --show-info=true \
- --shepherd \
- --php-version=${{ steps.setup-php.outputs.php-version }}
+ vendor/bin/phpstan analyze -c phpstan.neon --debug
- - name: Psalter
+ - name: PHPStan (testsuite)
run: |
- psalm --alter \
- --issues=UnnecessaryVarAnnotation \
- --dry-run \
- --php-version=${{ steps.setup-php.outputs.php-version }}
+ vendor/bin/phpstan analyze -c phpstan-dev.neon --debug
security:
name: Security checks
@@ -226,7 +211,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
# Should be the lowest supported version
- php-version: '8.1'
+ php-version: '8.2'
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, spl, xml
tools: composer
coverage: none
diff --git a/composer.json b/composer.json
index 39e3572..9270a65 100644
--- a/composer.json
+++ b/composer.json
@@ -20,14 +20,14 @@
}
},
"require": {
- "php": "^8.1",
+ "php": "^8.2",
"ext-zlib": "*",
- "simplesamlphp/simplesamlphp": "^2.2.0",
+ "simplesamlphp/simplesamlphp": "^2.4.0",
"symfony/http-foundation": "^6.4.0"
},
"require-dev": {
- "simplesamlphp/simplesamlphp-test-framework": "^1.7.0"
+ "simplesamlphp/simplesamlphp-test-framework": "^1.10.2"
},
"config": {
"allow-plugins": {
diff --git a/phpcs.xml b/phpcs.xml
index bae358b..a83fd44 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -12,6 +12,17 @@
templates
tests
+
+
+
+
+
+
+
+
+ tests/src/Controller/DebugTest.php
+
+
diff --git a/phpstan-dev.neon b/phpstan-dev.neon
new file mode 100644
index 0000000..4d29b8b
--- /dev/null
+++ b/phpstan-dev.neon
@@ -0,0 +1,4 @@
+parameters:
+ level: 9
+ paths:
+ - tests
diff --git a/phpstan.neon b/phpstan.neon
new file mode 100644
index 0000000..db37782
--- /dev/null
+++ b/phpstan.neon
@@ -0,0 +1,4 @@
+parameters:
+ level: 6
+ paths:
+ - src
diff --git a/psalm-dev.xml b/psalm-dev.xml
deleted file mode 100644
index 95c5632..0000000
--- a/psalm-dev.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/psalm.xml b/psalm.xml
deleted file mode 100644
index ba38ecb..0000000
--- a/psalm.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Controller/Debug.php b/src/Controller/Debug.php
index b3e9479..873e389 100644
--- a/src/Controller/Debug.php
+++ b/src/Controller/Debug.php
@@ -107,9 +107,9 @@ public function encode(Request $request): Template
/**
* @param string $raw
- * @return string
+ * @return string[]|string
*/
- private function getValue(string $raw): string
+ private function getValue(string $raw): array|string
{
$val = $raw;
diff --git a/tests/src/Controller/DebugTest.php b/tests/src/Controller/DebugTest.php
index 048d2c6..2ab02aa 100644
--- a/tests/src/Controller/DebugTest.php
+++ b/tests/src/Controller/DebugTest.php
@@ -28,6 +28,7 @@ final class DebugTest extends TestCase
/** @var string */
protected static string $encoded = 'SAMLRequest=pVJNjxMxDP0ro9yn88FOtRu1lcpWiEoLVNvCgQtKE6eNlHGG2IHl35OZLmLZQy%2BcrNh%2Bz88vXpDq%2FSDXic%2F4CN8TEBdPvUeSU2EpUkQZFDmSqHogyVru1x8eZDur5RADBx28eAG5jlBEENkFFMV2sxTfzO0dmKa11namPuoc39hba%2BfqpqlbM6%2Fb5mZ%2B1LWtj6L4ApEycikyUYYTJdgisULOqbrpyqYt67tD28iulV33VRSbvI1DxRPqzDyQrCrAk0OYUYpWB4QnnqGvVN4fkJ2emitnhoocnjyU5E5YjnrXf6TfB6TUQ9xD%2FOE0fH58%2BEueHbHOv2Yn1w8eRneqPpiU68M5DxjfdIltqTRNWQNWJc8lDaLYPfv71qHJaq5be7w0kXx%2FOOzK3af9QawWI7ecrIqr%2F9HYAyujWL2SuKheDlhcbuljlrbd7IJ3%2BlfxLsRe8XXlY8aZ0k6tkqNCcvkzsuXeh5%2F3ERTDUnBMIKrVZeS%2FF7v6DQ%3D%3D';
+
/**
* Set up for each test.
*/