diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml
index 7ac3cc8..048eacd 100644
--- a/.github/workflows/php.yml
+++ b/.github/workflows/php.yml
@@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
- php-versions: ['8.1', '8.2', '8.3']
+ php-versions: ['8.1', '8.2', '8.3', '8.4']
steps:
- name: Setup PHP, with composer and extensions
@@ -37,14 +37,14 @@ jobs:
git config --global core.autocrlf false
git config --global core.eol lf
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -57,7 +57,7 @@ jobs:
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Decide whether to run code coverage or not
- if: ${{ matrix.php-versions != '8.2' || matrix.operating-system != 'ubuntu-latest' }}
+ if: ${{ matrix.php-versions != '8.4' || matrix.operating-system != 'ubuntu-latest' }}
run: |
echo "NO_COVERAGE=--no-coverage" >> $GITHUB_ENV
@@ -67,20 +67,20 @@ jobs:
./vendor/bin/phpunit $NO_COVERAGE
- name: Save coverage data
- if: ${{ matrix.php-versions == '8.2' && matrix.operating-system == 'ubuntu-latest' }}
- uses: actions/upload-artifact@v3
+ if: ${{ matrix.php-versions == '8.4' && matrix.operating-system == 'ubuntu-latest' }}
+ uses: actions/upload-artifact@v4
with:
name: build-data
path: ${{ github.workspace }}/build
- name: List files in the workspace
- if: ${{ matrix.php-versions == '8.2' && matrix.operating-system == 'ubuntu-latest' }}
+ if: ${{ matrix.php-versions == '8.4' && matrix.operating-system == 'ubuntu-latest' }}
run: |
ls -la ${{ github.workspace }}/build
ls -la ${{ github.workspace }}/build/logs
- name: Code Coverage Report
- if: ${{ matrix.php-versions == '8.2' && matrix.operating-system == 'ubuntu-latest' }}
+ if: ${{ matrix.php-versions == '8.4' && matrix.operating-system == 'ubuntu-latest' }}
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: build/logs/cobertura.xml
@@ -100,7 +100,8 @@ jobs:
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
- php-version: '8.2'
+ # Should be the lowest supported version
+ php-version: '8.1'
extensions: mbstring, xml
tools: composer:v2
coverage: none
@@ -108,14 +109,14 @@ jobs:
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -143,21 +144,23 @@ jobs:
id: setup-php
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
- php-version: '8.2'
+ # Should be the higest supported version, so we can use the newest tools
+ php-version: '8.4'
tools: composer:v2
- extensions: mbstring, xml
+ # optional performance gain for psalm: opcache
+ extensions: mbstring, opcache, xml
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -166,7 +169,7 @@ jobs:
- name: Install Composer dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- - uses: actions/download-artifact@v3
+ - uses: actions/download-artifact@v4
with:
name: build-data
path: ${{ github.workspace }}/build
diff --git a/psalm.xml b/psalm.xml
index 1b29b26..442685c 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -36,7 +36,6 @@
-
diff --git a/src/Controller/ErrorController.php b/src/Controller/ErrorController.php
index cd0622a..2aaf22d 100644
--- a/src/Controller/ErrorController.php
+++ b/src/Controller/ErrorController.php
@@ -23,7 +23,7 @@ class ErrorController
*
* @throws \Exception
*/
- public function __construct(Configuration $config = null)
+ public function __construct(?Configuration $config = null)
{
$this->config = $config ?? Configuration::getInstance();
}
diff --git a/src/Controller/OIDCLogoutController.php b/src/Controller/OIDCLogoutController.php
index 22b1f5d..9258ab0 100644
--- a/src/Controller/OIDCLogoutController.php
+++ b/src/Controller/OIDCLogoutController.php
@@ -46,7 +46,7 @@ class OIDCLogoutController
*
* @throws \Exception
*/
- public function __construct(Configuration $config = null)
+ public function __construct(?Configuration $config = null)
{
$this->config = $config ?? Configuration::getInstance();
}
diff --git a/tests/lib/Auth/Source/MicrosoftHybridAuthTest.php b/tests/lib/Auth/Source/MicrosoftHybridAuthTest.php
index 6d5389e..4d7cf07 100644
--- a/tests/lib/Auth/Source/MicrosoftHybridAuthTest.php
+++ b/tests/lib/Auth/Source/MicrosoftHybridAuthTest.php
@@ -119,18 +119,22 @@ public static function combineOidcAndGraphProfileProvider(): array
'microsoft.@odata.context' => ['https://graph.microsoft.com/v1.0/$metadata#directoryObjects'],
'microsoft.value.0.@odata.type' => ['#microsoft.graph.group'],
'microsoft.value.0.id' => ['11111111-1111-1111-1111-111111111111'],
- ]
+ 'microsoft.tid' => ['9188040d-6c67-4c5b-b11236a304b66dad'],
+ ],
],
- [$validIdToken, $conflictedRequestAttributes, [
- 'microsoft.name' => ['Steve Stratus'],
- 'microsoft.mail' => ['steve.stratus@outlook.com'],
- 'microsoft.id' => ['11111111'],
- 'microsoft.@odata.context' => ['https://graph.microsoft.com/v1.0/$metadata#directoryObjects'],
- 'microsoft.value.0.@odata.type' => ['#microsoft.graph.group'],
- 'microsoft.value.0.id' => ['11111111-1111-1111-1111-111111111111'],
- ]
+ [
+ $validIdToken,
+ $conflictedRequestAttributes,
+ [
+ 'microsoft.name' => ['Steve Stratus'],
+ 'microsoft.mail' => ['steve.stratus@outlook.com'],
+ 'microsoft.id' => ['11111111'],
+ 'microsoft.@odata.context' => ['https://graph.microsoft.com/v1.0/$metadata#directoryObjects'],
+ 'microsoft.value.0.@odata.type' => ['#microsoft.graph.group'],
+ 'microsoft.value.0.id' => ['11111111-1111-1111-1111-111111111111'],
+ 'microsoft.tid' => ['9188040d-6c67-4c5b-b11236a304b66dad'],
+ ],
],
-
];
}
}