Skip to content

Commit da73fe2

Browse files
committed
Merge master into release-5.x
1 parent 804c8e4 commit da73fe2

File tree

380 files changed

+4026
-5801
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

380 files changed

+4026
-5801
lines changed
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
3+
name: Interoperability
4+
5+
on: # yamllint disable-line rule:truthy
6+
push:
7+
branches: ['**']
8+
paths-ignore:
9+
- '**.md'
10+
- '**.yml'
11+
pull_request:
12+
branches: [master, release-*]
13+
paths-ignore:
14+
- '**.md'
15+
- '**.yml'
16+
workflow_dispatch:
17+
18+
jobs:
19+
edugain:
20+
name: "Interoperability tests, PHP ${{ matrix.php-versions }}, ${{ matrix.operating-system }}"
21+
runs-on: ${{ matrix.operating-system }}
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
operating-system: [ubuntu-latest]
26+
php-versions: ['8.2']
27+
28+
steps:
29+
- name: Setup PHP, with composer and extensions
30+
# https://github.com/shivammathur/setup-php
31+
uses: shivammathur/setup-php@v2
32+
with:
33+
php-version: ${{ matrix.php-versions }}
34+
extensions: ctype, date, dom, hash, mbstring, openssl, pcre, spl, xml
35+
tools: composer:v2
36+
ini-values: error_reporting=E_ALL, memory_limit=-1
37+
coverage: none
38+
39+
- name: Setup problem matchers for PHP
40+
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
41+
42+
- name: Setup problem matchers for PHPUnit
43+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
44+
45+
- name: Set git to use LF
46+
run: |
47+
git config --global core.autocrlf false
48+
git config --global core.eol lf
49+
50+
- uses: actions/checkout@v4
51+
52+
- name: Cache composer dependencies
53+
uses: actions/cache@v4
54+
with:
55+
path: $(composer config cache-files-dir)
56+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
57+
restore-keys: ${{ runner.os }}-composer-
58+
59+
- name: Validate composer.json and composer.lock
60+
run: composer validate
61+
62+
- name: Install Composer dependencies
63+
run: composer install --no-progress --prefer-dist --optimize-autoloader
64+
65+
- name: Get current date
66+
id: date
67+
run: |
68+
echo "{date}={$(date +'%Y-%m-%d')}" >> "$GITHUB_STATE"
69+
70+
- name: Cache metadata
71+
id: cache-metadata
72+
uses: actions/cache@v4
73+
with:
74+
path: /tmp/metadata
75+
key: ${{ runner.os }}-metadata-${{ env.date }}
76+
restore-keys: ${{ runner.os }}-metadata-
77+
78+
- name: Download eduGAIN metadata & public key
79+
if: steps.cache-metadata.outputs.cache-hit != 'true'
80+
run: |
81+
mkdir -p /tmp/metadata
82+
wget https://mds.edugain.org/edugain-v2.xml -O /tmp/metadata/edugain.xml
83+
wget https://technical.edugain.org/mds-v2.cer -O /tmp/metadataedugain-pub.crt
84+
85+
86+
- name: Download GRNET metadata
87+
if: steps.cache-metadata.outputs.cache-hit != 'true'
88+
run: |
89+
mkdir -p /tmp/metadata
90+
wget https://md.aai.grnet.gr/aggregates/grnet-metadata.xml -O /tmp/metadata/grnet.xml
91+
92+
- name: Download MicrosoftOnline metadata
93+
if: steps.cache-metadata.outputs.cache-hit != 'true'
94+
run: |
95+
mkdir -p /tmp/metadata
96+
wget https://nexus.microsoftonline-p.com/federationmetadata/saml20/federationmetadata.xml \
97+
-O /tmp/metadata/microsoftonline.xml
98+
99+
- name: Run unit tests
100+
run: |
101+
./vendor/bin/phpunit -c phpunit-interoperability.xml

.github/workflows/php.yml

Lines changed: 40 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,28 @@ on: # yamllint disable-line rule:truthy
1111
branches: [master, release-*]
1212
paths-ignore:
1313
- '**.md'
14+
workflow_dispatch:
1415

1516
jobs:
1617
linter:
1718
name: Linter
1819
runs-on: ['ubuntu-latest']
1920

2021
steps:
21-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2223
with:
24+
# super-linter needs the full git history to get the
25+
# list of files that changed across commits
2326
fetch-depth: 0
2427

2528
- name: Lint Code Base
26-
uses: github/super-linter/slim@v5
29+
uses: super-linter/super-linter/slim@v6
2730
env:
31+
# To report GitHub Actions status checks
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
LINTER_RULES_PATH: 'tools/linters'
2834
LOG_LEVEL: NOTICE
2935
VALIDATE_ALL_CODEBASE: true
30-
LINTER_RULES_PATH: 'tools/linters'
3136
VALIDATE_BASH: true
3237
VALIDATE_BASH_EXEC: true
3338
VALIDATE_JSON: true
@@ -47,21 +52,20 @@ jobs:
4752
with:
4853
# Should be the higest supported version, so we can use the newest tools
4954
php-version: '8.3'
50-
tools: composer, composer-require-checker, composer-unused, phpcs, psalm
51-
# optional performance gain for psalm: opcache
52-
extensions: ctype, date, dom, filter, hash, mbstring, opcache, openssl, pcre, soap, spl, xml
55+
tools: composer, composer-require-checker, composer-unused, phpcs, phpstan
56+
extensions: ctype, date, dom, filter, hash, mbstring, openssl, pcre, soap, spl, xml
5357
coverage: none
5458

5559
- name: Setup problem matchers for PHP
5660
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
5761

58-
- uses: actions/checkout@v3
62+
- uses: actions/checkout@v4
5963

6064
- name: Get composer cache directory
6165
run: echo COMPOSER_CACHE="$(composer config cache-files-dir)" >> "$GITHUB_ENV"
6266

6367
- name: Cache composer dependencies
64-
uses: actions/cache@v3
68+
uses: actions/cache@v4
6569
with:
6670
path: $COMPOSER_CACHE
6771
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -83,28 +87,13 @@ jobs:
8387
- name: PHP Code Sniffer
8488
run: phpcs
8589

86-
- name: Psalm
87-
continue-on-error: true
88-
run: |
89-
psalm -c psalm.xml \
90-
--show-info=true \
91-
--shepherd \
92-
--php-version=${{ steps.setup-php.outputs.php-version }}
93-
94-
- name: Psalm (testsuite)
95-
continue-on-error: true
90+
- name: PHPStan
9691
run: |
97-
psalm -c psalm-dev.xml \
98-
--show-info=true \
99-
--shepherd \
100-
--php-version=${{ steps.setup-php.outputs.php-version }}
92+
phpstan analyze -c phpstan.neon
10193
102-
- name: Psalter
94+
- name: PHPStan (testsuite)
10395
run: |
104-
psalm --alter \
105-
--issues=UnnecessaryVarAnnotation \
106-
--dry-run \
107-
--php-version=${{ steps.setup-php.outputs.php-version }}
96+
phpstan analyze -c phpstan-dev.neon
10897
10998
security:
11099
name: Security checks
@@ -123,13 +112,13 @@ jobs:
123112
- name: Setup problem matchers for PHP
124113
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
125114

126-
- uses: actions/checkout@v3
115+
- uses: actions/checkout@v4
127116

128117
- name: Get composer cache directory
129118
run: echo COMPOSER_CACHE="$(composer config cache-files-dir)" >> "$GITHUB_ENV"
130119

131120
- name: Cache composer dependencies
132-
uses: actions/cache@v3
121+
uses: actions/cache@v4
133122
with:
134123
path: $COMPOSER_CACHE
135124
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -179,13 +168,13 @@ jobs:
179168
git config --global core.autocrlf false
180169
git config --global core.eol lf
181170
182-
- uses: actions/checkout@v3
171+
- uses: actions/checkout@v4
183172

184173
- name: Get composer cache directory
185174
run: echo COMPOSER_CACHE="$(composer config cache-files-dir)" >> "$GITHUB_ENV"
186175

187176
- name: Cache composer dependencies
188-
uses: actions/cache@v3
177+
uses: actions/cache@v4
189178
with:
190179
path: $COMPOSER_CACHE
191180
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -204,7 +193,7 @@ jobs:
204193

205194
- name: Save coverage data
206195
if: ${{ matrix.php-versions == '8.3' }}
207-
uses: actions/upload-artifact@v3
196+
uses: actions/upload-artifact@v4
208197
with:
209198
name: coverage-data
210199
path: ${{ github.workspace }}/build
@@ -241,13 +230,13 @@ jobs:
241230
git config --global core.autocrlf false
242231
git config --global core.eol lf
243232
244-
- uses: actions/checkout@v3
233+
- uses: actions/checkout@v4
245234

246235
- name: Get composer cache directory
247236
run: echo COMPOSER_CACHE="$(composer config cache-files-dir)" >> "$env:GITHUB_ENV"
248237

249238
- name: Cache composer dependencies
250-
uses: actions/cache@v3
239+
uses: actions/cache@v4
251240
with:
252241
path: $COMPOSER_CACHE
253242
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -264,16 +253,30 @@ jobs:
264253
runs-on: [ubuntu-latest]
265254
needs: [unit-tests-linux]
266255
steps:
267-
- uses: actions/checkout@v3
256+
- uses: actions/checkout@v4
268257

269-
- uses: actions/download-artifact@v3
258+
- uses: actions/download-artifact@v4
270259
with:
271260
name: coverage-data
272261
path: ${{ github.workspace }}/build
273262

274263
- name: Codecov
275-
uses: codecov/codecov-action@v3
264+
uses: codecov/codecov-action@v4
276265
with:
277266
token: ${{ secrets.CODECOV_TOKEN }}
278267
fail_ci_if_error: true
279268
verbose: true
269+
270+
cleanup:
271+
name: Cleanup artifacts
272+
needs: [unit-tests-linux, coverage]
273+
runs-on: [ubuntu-latest]
274+
if: |
275+
always() &&
276+
needs.coverage.result == 'success' ||
277+
(needs.unit-tests-linux == 'success' && needs.coverage == 'skipped')
278+
279+
steps:
280+
- uses: geekyeggo/delete-artifact@v5
281+
with:
282+
name: coverage-data

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
"ext-zlib": "*",
2121

2222
"nyholm/psr7": "^1.8",
23+
"psr/clock": "^1.0",
2324
"psr/http-message": "^2.0",
2425
"psr/log": "^2.0 || ^3.0",
25-
"robrichards/xmlseclibs": "^3.1",
26-
"simplesamlphp/assert": "^1.0",
27-
"simplesamlphp/xml-common": "^1.12",
26+
"simplesamlphp/assert": "^1.1",
27+
"simplesamlphp/xml-common": "^1.16",
2828
"simplesamlphp/xml-security": "^1.6",
2929
"simplesamlphp/xml-soap": "^1.3"
3030
},

0 commit comments

Comments
 (0)