Skip to content

Commit ec868a6

Browse files
committed
Merge branch 'main' into feature/issue-48-mdui-chunk
2 parents 9146054 + 71b5447 commit ec868a6

14 files changed

Lines changed: 34 additions & 46 deletions

‎ci/qa/phpcpd‎

Lines changed: 0 additions & 6 deletions
This file was deleted.

‎ci/qa/rector.php‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,13 @@
88
->withPaths([
99
__DIR__ . '/../../src',
1010
])
11+
->withPhpSets()
1112
->withAttributesSets(all: true)
1213
->withComposerBased(phpunit: true, symfony: true)
1314
->withTypeCoverageLevel(10)
1415
->withDeadCodeLevel(10)
15-
->withCodeQualityLevel(10);
16+
->withCodeQualityLevel(10)
17+
->withSkip([
18+
\Rector\Php84\Rector\MethodCall\NewMethodCallWithoutParenthesesRector::class,
19+
\Rector\Php84\Rector\Class_\DeprecatedAnnotationToDeprecatedAttributeRector::class,
20+
]);

‎composer.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"ext-openssl": "*",
1212
"psr/log": "^3.0",
1313
"robrichards/xmlseclibs": "^3.1.4",
14-
"simplesamlphp/saml2": ">=4.16.16 <4.20",
14+
"simplesamlphp/saml2": "~4.19.0",
1515
"symfony/dependency-injection": "^6.3|^7.0",
1616
"symfony/framework-bundle": "^6.4|^7.4",
1717
"symfony/security-bundle": "^6.4|^7.4",
@@ -31,7 +31,7 @@
3131
"phpstan/extension-installer": "^1.4",
3232
"phpstan/phpstan": "^2.1",
3333
"phpunit/phpunit": "^11.0.0",
34-
"rector/rector": "^2.2",
34+
"rector/rector": "^2.4",
3535
"sebastian/exporter": "^6.3",
3636
"slevomat/coding-standard": "^8.24",
3737
"squizlabs/php_codesniffer": "^4.0",

‎src/DependencyInjection/SurfnetSamlExtension.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ private function parseRemoteConfiguration(array $remoteConfiguration, ContainerB
167167
*/
168168
private function parseRemoteIdentityProviderConfigurations(array $identityProviders, ContainerBuilder $container): void
169169
{
170-
$definitions = array_map(fn($config): Definition => $this->parseRemoteIdentityProviderConfiguration($config), $identityProviders);
170+
$definitions = array_map($this->parseRemoteIdentityProviderConfiguration(...), $identityProviders);
171171

172172
$definition = new Definition(StaticIdentityProviderRepository::class, [
173173
$definitions
@@ -200,7 +200,7 @@ private function parseRemoteIdentityProviderConfiguration(array $identityProvide
200200
*/
201201
private function parseRemoteServiceProviderConfigurations(array $serviceProviders, ContainerBuilder $container): void
202202
{
203-
$definitions = array_map(fn($config): Definition => $this->parseRemoteServiceProviderConfiguration($config), $serviceProviders);
203+
$definitions = array_map($this->parseRemoteServiceProviderConfiguration(...), $serviceProviders);
204204

205205
$definition = new Definition(StaticServiceProviderRepository::class, [
206206
$definitions

‎src/Http/ReceivedAuthnRequestPost.php‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,8 @@ final class ReceivedAuthnRequestPost implements SignatureVerifiable
3232

3333
private ?ReceivedAuthnRequest $receivedRequest = null;
3434

35-
private readonly string $samlRequest;
36-
37-
private function __construct(string $samlRequest)
35+
private function __construct(private readonly string $samlRequest)
3836
{
39-
$this->samlRequest = $samlRequest;
4037
}
4138

4239
public static function parse(array $parameters): self

‎src/Metadata/Metadata.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class Metadata implements Signable, Stringable
6262
*/
6363
public $spCertificate;
6464

65-
public ?DOMDocument $document;
65+
public ?DOMDocument $document = null;
6666

6767
public function getRootDomElement(): DOMElement
6868
{

‎src/Metadata/MetadataFactory.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
class MetadataFactory
3131
{
32-
private Metadata $metadata;
32+
private readonly Metadata $metadata;
3333

3434
public function __construct(
3535
private readonly Environment $templateEngine,

‎src/SAML2/Attribute/AttributeDefinition.php‎

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,27 @@
2222

2323
class AttributeDefinition
2424
{
25-
/**
26-
* @var string the name of the saml attribute
27-
*/
28-
private readonly string $name;
29-
3025
/**
3126
* @var string the urn:mace identifier of this attribute
3227
*/
33-
private ?string $urnMace = null;
28+
private readonly ?string $urnMace;
3429

3530
/**
3631
* @var string the urn:oid identifier of this attribute
3732
*/
38-
private ?string $urnOid = null;
33+
private readonly ?string $urnOid;
3934

40-
public function __construct(string $name, ?string $urnMace = null, ?string $urnOid = null)
41-
{
35+
/**
36+
* @param string $name the name of the saml attribute
37+
*/
38+
public function __construct(
39+
private readonly string $name,
40+
?string $urnMace = null,
41+
?string $urnOid = null
42+
) {
4243
if (is_null($urnOid) && is_null($urnMace)) {
4344
throw new LogicException('An AttributeDefinition should have at least either a mace or an oid urn');
4445
}
45-
46-
$this->name = $name;
4746
$this->urnMace = $urnMace;
4847
$this->urnOid = $urnOid;
4948
}

‎src/SAML2/AuthnRequest.php‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,12 @@ class AuthnRequest
3434

3535
private ?string $rawRequest = null;
3636

37-
private readonly SAML2AuthnRequest $request;
38-
3937
private ?string $signature = null;
4038

4139
private ?string $signatureAlgorithm = null;
4240

43-
private function __construct(SAML2AuthnRequest $request)
41+
private function __construct(private readonly SAML2AuthnRequest $request)
4442
{
45-
$this->request = $request;
4643
$this->loadExtensionsFromSaml2AuthNRequest();
4744
}
4845

‎src/SAML2/ReceivedAuthnRequest.php‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,8 @@ final class ReceivedAuthnRequest
3434
{
3535
use ExtensionsMapperTrait;
3636

37-
private readonly SAML2AuthnRequest $request;
38-
39-
private function __construct(SAML2AuthnRequest $request)
37+
private function __construct(private readonly SAML2AuthnRequest $request)
4038
{
41-
$this->request = $request;
4239
$this->loadExtensionsFromSaml2AuthNRequest();
4340
}
4441

0 commit comments

Comments
 (0)