Skip to content

Commit 64925e0

Browse files
committed
Update symfony 6 > 7
1 parent e469156 commit 64925e0

17 files changed

Lines changed: 87 additions & 65 deletions

.github/workflows/test-integration.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,9 @@ jobs:
66
continue-on-error: ${{ matrix.experimental }}
77
strategy:
88
matrix:
9-
php-versions: [ '8.2']
9+
php-versions: [ '8.2', '8.4']
1010
experimental: [false]
11-
include:
12-
- php-versions: '8.1'
13-
experimental: true
14-
- php-versions: '8.3'
15-
experimental: true
16-
- php-versions: '8.4'
17-
experimental: true
18-
timeout-minutes: 30
11+
timeout-minutes: 15
1912
name: PHP ${{ matrix.php-versions }} on Ubuntu latest. Experimental == ${{ matrix.experimental }}
2013
steps:
2114
- name: Install PHP
@@ -29,7 +22,7 @@ jobs:
2922
continue-on-error: ${{ matrix.experimental }}
3023
- id: checks
3124
name: Run CI tests
32-
run: composer check
25+
run: composer check-ci
3326
continue-on-error: ${{ matrix.experimental }}
3427
- name: Output log files on failure
3528
if: failure()

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 7.0.0
2+
- Add SF 7 support
3+
- Upgrade dev & qa tooling
4+
15
# 6.0.0
26
- Add SF 6 support
37
- Require PHP 8.1

ci/qa/docheader

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
cd $(dirname $0)/../../
4+
5+
./vendor/bin/docheader --no-ansi --docheader=ci/qa/docheader.template check src/
6+

ci/qa/docheader.template

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* Copyright %regexp:\d{4}% SURFnet %regexp:(B.V.|bv)%
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+

ci/qa/phpcpd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
cd $(dirname $0)/../../
4+
5+
# https://github.com/sebastianbergmann/phpcpd
6+
vendor/bin/phpcpd ./src

ci/qa/phpunit.xml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

33
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.6/phpunit.xsd"
4+
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/11.5/phpunit.xsd"
55
backupGlobals="false"
66
colors="true"
77
bootstrap="../../vendor/autoload.php"
8+
cacheDirectory="../../var/qa/phpunit.cache"
89
>
910
<php>
1011
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
@@ -18,16 +19,4 @@
1819
<directory>../../src/Tests/Component</directory>
1920
</testsuite>
2021
</testsuites>
21-
<coverage processUncoveredFiles="true">
22-
<include>
23-
<directory>../../src</directory>
24-
</include>
25-
<exclude>
26-
<directory>../../src/Tests</directory>
27-
</exclude>
28-
</coverage>
29-
<listeners>
30-
<listener class="\Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
31-
<listener class="\Mockery\Adapter\Phpunit\TestListener"/>
32-
</listeners>
3322
</phpunit>

composer.json

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "surfnet/stepup-saml-bundle",
33
"type": "symfony-bundle",
4-
"description": "A Symfony 6 bundle that integrates the simplesamlphp\\saml2 library with Symfony.",
4+
"description": "A Symfony 7 bundle that integrates the simplesamlphp\\saml2 library with Symfony.",
55
"keywords": ["surfnet", "StepUp", "simplesamlphp", "SAML", "SAML2"],
66
"license": "Apache-2.0",
77
"minimum-stability": "stable",
@@ -12,15 +12,17 @@
1212
"psr/log": "^3.0",
1313
"robrichards/xmlseclibs": "^3.1.1",
1414
"simplesamlphp/saml2": "^4.6",
15-
"symfony/dependency-injection": "^6.3",
16-
"symfony/framework-bundle": "^6.3",
17-
"symfony/security-bundle": "^6.3",
18-
"symfony/templating": "^6.3",
15+
"symfony/dependency-injection": "^6.3|^7.0",
16+
"symfony/framework-bundle": "^6.3|^7.0",
17+
"symfony/security-bundle": "^6.3|^7.0",
18+
"symfony/templating": "^6.3|7.0",
1919
"twig/twig": "^3"
2020
},
2121
"require-dev": {
2222
"ext-libxml": "*",
2323
"ext-zlib": "*",
24+
"irstea/phpcpd-shim": "^6.0",
25+
"malukenho/docheader": "^1.1",
2426
"mockery/mockery": "^1.5",
2527
"overtrue/phplint": "*",
2628
"phpmd/phpmd": "^2.6",
@@ -31,16 +33,23 @@
3133
"sebastian/exporter": "^6.3",
3234
"slevomat/coding-standard": "^8.24",
3335
"squizlabs/php_codesniffer": "^4.0",
34-
"symfony/phpunit-bridge": "^6.3"
36+
"symfony/phpunit-bridge": "^7.3.4"
3537
},
3638
"scripts": {
3739
"check": [
38-
"@composer-validate",
39-
"@phplint",
40-
"@phpcs",
41-
"@phpmd",
42-
"@phpstan",
43-
"@test"
40+
"@check-ci",
41+
"@rector"
42+
],
43+
"check-ci": [
44+
"@composer-validate",
45+
"@license-headers",
46+
"@phplint",
47+
"@phpcpd",
48+
"@phpcs",
49+
"@phpmd",
50+
"@test",
51+
"@phpstan",
52+
"@composer audit"
4453
],
4554
"composer-validate": "./ci/qa/validate",
4655
"phplint": "./ci/qa/phplint",
@@ -50,6 +59,7 @@
5059
"phpstan": "./ci/qa/phpstan",
5160
"phpstan-baseline": "./ci/qa/phpstan-update-baseline",
5261
"test": "./ci/qa/phpunit",
62+
"license-headers": "./ci/qa/docheader",
5363
"phpcbf": "./ci/qa/phpcbf",
5464
"rector": "./ci/qa/rector.sh --dry-run",
5565
"rector-fix": "./ci/qa/rector.sh"
@@ -70,7 +80,8 @@
7080
"sort-packages": true,
7181
"allow-plugins": {
7282
"dealerdirect/phpcodesniffer-composer-installer": true,
73-
"phpstan/extension-installer": true
83+
"phpstan/extension-installer": true,
84+
"simplesamlphp/composer-xmlprovider-installer": true
7485
}
7586
}
7687
}

src/SAML2/Attribute/ConfigurableAttributeSetFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static function configureWhichAttributeSetToCreate(mixed $attributeSetCla
3131
throw InvalidArgumentException::invalidType('non-empty string', 'attributeSetClassName', $attributeSetClassName);
3232
}
3333

34-
if (!is_a($attributeSetClassName, '\Surfnet\SamlBundle\SAML2\Attribute\AttributeSetFactory', true)) {
34+
if (!is_a($attributeSetClassName, AttributeSetFactory::class, true)) {
3535
throw new InvalidArgumentException(sprintf(
3636
'Cannot use class "%s": it must implement "%s"',
3737
$attributeSetClassName,

src/SAML2/Extensions/Chunk.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* Copyright 2021 SURF B.V.
4+
* Copyright 2025 SURFnet bv
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.

src/SAML2/Extensions/Extensions.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* Copyright 2021 SURF B.V.
4+
* Copyright 2025 SURFnet bv
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
1616
* limitations under the License.
1717
*/
1818

19+
1920
namespace Surfnet\SamlBundle\SAML2\Extensions;
2021

2122
class Extensions

0 commit comments

Comments
 (0)