Skip to content

Commit bf29d51

Browse files
committed
rework
- add automated license check - fix composer.json
1 parent ffdf160 commit bf29d51

File tree

12 files changed

+54
-10
lines changed

12 files changed

+54
-10
lines changed

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+

composer.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"require-dev": {
2222
"ext-libxml": "*",
2323
"ext-zlib": "*",
24+
"malukenho/docheader": "^1.1",
2425
"mockery/mockery": "^1.5",
2526
"overtrue/phplint": "*",
2627
"phpmd/phpmd": "^2.6",
@@ -36,14 +37,16 @@
3637
"scripts": {
3738
"check": [
3839
"@check-ci",
39-
"@phpstan"
40+
"@rector"
4041
],
4142
"check-ci": [
4243
"@composer-validate",
44+
"@license-headers",
4345
"@phplint",
4446
"@phpcs",
4547
"@phpmd",
4648
"@test",
49+
"@phpstan",
4750
"@composer audit"
4851
],
4952
"composer-validate": "./ci/qa/validate",
@@ -54,6 +57,7 @@
5457
"phpstan": "./ci/qa/phpstan",
5558
"phpstan-baseline": "./ci/qa/phpstan-update-baseline",
5659
"test": "./ci/qa/phpunit",
60+
"license-headers": "./ci/qa/docheader",
5761
"phpcbf": "./ci/qa/phpcbf",
5862
"rector": "./ci/qa/rector.sh --dry-run",
5963
"rector-fix": "./ci/qa/rector.sh"
@@ -74,7 +78,8 @@
7478
"sort-packages": true,
7579
"allow-plugins": {
7680
"dealerdirect/phpcodesniffer-composer-installer": true,
77-
"phpstan/extension-installer": true
81+
"phpstan/extension-installer": true,
82+
"simplesamlphp/composer-xmlprovider-installer": true
7883
}
7984
}
8085
}

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

src/SAML2/Extensions/GsspUserAttributesChunk.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright 2021 SURF B.V.
3+
* Copyright 2025 SURFnet bv
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.

src/Tests/Component/Extensions/AuthnRequestExtensionsTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php declare(strict_types=1);
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\Tests\Component\Extensions;
2021

2122
use DOMDocument;

src/Tests/Component/Extensions/ChunkSerializationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php declare(strict_types=1);
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/Tests/Component/Metadata/MetadataFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php declare(strict_types=1);
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/Tests/Component/Metadata/XsdValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php declare(strict_types=1);
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.

0 commit comments

Comments
 (0)