Skip to content

Commit a104180

Browse files
committed
Bump test-framework and fix codesniffer issues
1 parent 1c44ecc commit a104180

File tree

166 files changed

+250
-74
lines changed

Some content is hidden

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

166 files changed

+250
-74
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"beste/clock": "~3.0.0",
4242
"mockery/mockery": "~1.6.12",
4343
"simplesamlphp/composer-xmlprovider-installer": "~1.0.2",
44-
"simplesamlphp/simplesamlphp-test-framework": "~1.9.2"
44+
"simplesamlphp/simplesamlphp-test-framework": "~1.10.2"
4545
},
4646
"suggest": {
4747
"ext-soap": "*"

phpstan-baseline-dev.neon

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,91 @@
11
parameters:
22
ignoreErrors:
33
-
4-
message: "#^PHPDoc tag @var for property SimpleSAML\\\\Test\\\\SAML2\\\\Assertion\\\\Transformer\\\\NameIdDecryptionTransformerTest\\:\\:\\$validator with type SimpleSAML\\\\SAML2\\\\Response\\\\Validation\\\\Validator is incompatible with native type SimpleSAML\\\\SAML2\\\\Signature\\\\Validator\\.$#"
4+
message: '#^PHPDoc tag @var for property SimpleSAML\\Test\\SAML2\\Assertion\\Transformer\\NameIdDecryptionTransformerTest\:\:\$validator with type SimpleSAML\\SAML2\\Response\\Validation\\Validator is incompatible with native type SimpleSAML\\SAML2\\Signature\\Validator\.$#'
5+
identifier: property.phpDocType
56
count: 1
67
path: tests/SAML2/Assertion/Transformer/NameIdDecryptionTransformerTest.php
78

89
-
9-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
10+
message: '#^Unreachable statement \- code above always terminates\.$#'
11+
identifier: deadCode.unreachable
1012
count: 2
1113
path: tests/SAML2/Assertion/Transformer/NameIdDecryptionTransformerTest.php
1214

1315
-
14-
message: "#^PHPDoc tag @var for property SimpleSAML\\\\Test\\\\SAML2\\\\Assertion\\\\Validation\\\\AssertionValidatorTest\\:\\:\\$validator with type SimpleSAML\\\\SAML2\\\\Response\\\\Validation\\\\Validator is incompatible with native type SimpleSAML\\\\SAML2\\\\Signature\\\\Validator\\.$#"
16+
message: '#^PHPDoc tag @var for property SimpleSAML\\Test\\SAML2\\Assertion\\Validation\\AssertionValidatorTest\:\:\$validator with type SimpleSAML\\SAML2\\Response\\Validation\\Validator is incompatible with native type SimpleSAML\\SAML2\\Signature\\Validator\.$#'
17+
identifier: property.phpDocType
1518
count: 1
1619
path: tests/SAML2/Assertion/Validation/AssertionValidatorTest.php
1720

1821
-
19-
message: "#^Parameter \\#1 \\$xml of static method SimpleSAML\\\\SAML2\\\\XML\\\\saml\\\\Assertion\\:\\:fromXML\\(\\) expects DOMElement, DOMNode\\|null given\\.$#"
22+
message: '#^Parameter \#1 \$xml of static method SimpleSAML\\SAML2\\XML\\saml\\Assertion\:\:fromXML\(\) expects DOMElement, DOMNode\|null given\.$#'
23+
identifier: argument.type
2024
count: 2
2125
path: tests/SAML2/Assertion/Validation/AssertionValidatorTest.php
2226

2327
-
24-
message: "#^Result of method SimpleSAML\\\\SAML2\\\\Assertion\\\\Processor\\:\\:validateAssertion\\(\\) \\(void\\) is used\\.$#"
25-
count: 2
28+
message: '#^Result of method SimpleSAML\\SAML2\\Assertion\\Processor\:\:validateAssertion\(\) \(void\) is used\.$#'
29+
identifier: method.void
30+
count: 1
2631
path: tests/SAML2/Assertion/Validation/AssertionValidatorTest.php
2732

2833
-
29-
message: "#^Parameter \\#1 \\$serviceProvider of method SimpleSAML\\\\SAML2\\\\Assertion\\\\Validation\\\\ConstraintValidator\\\\SpIsValidAudience\\:\\:setServiceProvider\\(\\) expects SimpleSAML\\\\SAML2\\\\Configuration\\\\ServiceProvider, Mockery\\\\MockInterface given\\.$#"
34+
message: '#^Parameter \#1 \$serviceProvider of method SimpleSAML\\SAML2\\Assertion\\Validation\\ConstraintValidator\\SpIsValidAudience\:\:setServiceProvider\(\) expects SimpleSAML\\SAML2\\Configuration\\ServiceProvider, Mockery\\MockInterface given\.$#'
35+
identifier: argument.type
3036
count: 3
3137
path: tests/SAML2/Assertion/Validation/ConstraintValidator/SpIsValidAudienceTest.php
3238

3339
-
34-
message: "#^Parameter \\#1 \\$response of class SimpleSAML\\\\SAML2\\\\Assertion\\\\Validation\\\\ConstraintValidator\\\\SubjectConfirmationResponseToMatches constructor expects SimpleSAML\\\\SAML2\\\\XML\\\\samlp\\\\Response, Mockery\\\\MockInterface given\\.$#"
40+
message: '#^Parameter \#1 \$response of class SimpleSAML\\SAML2\\Assertion\\Validation\\ConstraintValidator\\SubjectConfirmationResponseToMatches constructor expects SimpleSAML\\SAML2\\XML\\samlp\\Response, Mockery\\MockInterface given\.$#'
41+
identifier: argument.type
3542
count: 5
3643
path: tests/SAML2/Assertion/Validation/ConstraintValidator/SubjectConfirmationResponseToMatchesTest.php
3744

3845
-
39-
message: "#^PHPDoc tag @var for property SimpleSAML\\\\Test\\\\SAML2\\\\XML\\\\saml\\\\SubjectConfirmationValidatorTest\\:\\:\\$validator with type SimpleSAML\\\\SAML2\\\\Response\\\\Validation\\\\Validator is incompatible with native type SimpleSAML\\\\SAML2\\\\Signature\\\\Validator\\.$#"
46+
message: '#^PHPDoc tag @var for property SimpleSAML\\Test\\SAML2\\XML\\saml\\SubjectConfirmationValidatorTest\:\:\$validator with type SimpleSAML\\SAML2\\Response\\Validation\\Validator is incompatible with native type SimpleSAML\\SAML2\\Signature\\Validator\.$#'
47+
identifier: property.phpDocType
4048
count: 1
4149
path: tests/SAML2/Assertion/Validation/SubjectConfirmationValidatorTest.php
4250

4351
-
44-
message: "#^Result of method SimpleSAML\\\\SAML2\\\\Assertion\\\\Processor\\:\\:validateAssertion\\(\\) \\(void\\) is used\\.$#"
45-
count: 1
46-
path: tests/SAML2/Assertion/Validation/SubjectConfirmationValidatorTest.php
47-
48-
-
49-
message: "#^Parameter \\#1 \\$element of method SimpleSAML\\\\SAML2\\\\Certificate\\\\KeyCollection\\:\\:add\\(\\) expects SimpleSAML\\\\SAML2\\\\Certificate\\\\Key, string given\\.$#"
52+
message: '#^Parameter \#1 \$element of method SimpleSAML\\SAML2\\Certificate\\KeyCollection\:\:add\(\) expects SimpleSAML\\SAML2\\Certificate\\Key, string given\.$#'
53+
identifier: argument.type
5054
count: 1
5155
path: tests/SAML2/Certificate/KeyCollectionTest.php
5256

5357
-
54-
message: "#^Call to an undefined method Mockery\\\\Expectation\\:\\:shouldReceive\\(\\)\\.$#"
58+
message: '#^Call to an undefined method Mockery\\Expectation\:\:shouldReceive\(\)\.$#'
59+
identifier: method.notFound
5560
count: 3
5661
path: tests/SAML2/Certificate/KeyLoaderTest.php
5762

5863
-
59-
message: "#^Parameter \\#1 \\$config of method SimpleSAML\\\\SAML2\\\\Certificate\\\\KeyLoader\\:\\:loadKeysFromConfiguration\\(\\) expects SimpleSAML\\\\SAML2\\\\Configuration\\\\CertificateProvider, Mockery\\\\MockInterface given\\.$#"
64+
message: '#^Parameter \#1 \$config of method SimpleSAML\\SAML2\\Certificate\\KeyLoader\:\:loadKeysFromConfiguration\(\) expects SimpleSAML\\SAML2\\Configuration\\CertificateProvider, Mockery\\MockInterface given\.$#'
65+
identifier: argument.type
6066
count: 3
6167
path: tests/SAML2/Certificate/KeyLoaderTest.php
6268

6369
-
64-
message: "#^Parameter \\#1 \\$response of method SimpleSAML\\\\SAML2\\\\Response\\\\Validation\\\\ConstraintValidator\\\\DestinationMatches\\:\\:validate\\(\\) expects SimpleSAML\\\\SAML2\\\\XML\\\\samlp\\\\Response, Mockery\\\\MockInterface given\\.$#"
70+
message: '#^Parameter \#1 \$response of method SimpleSAML\\SAML2\\Response\\Validation\\ConstraintValidator\\DestinationMatches\:\:validate\(\) expects SimpleSAML\\SAML2\\XML\\samlp\\Response, Mockery\\MockInterface given\.$#'
71+
identifier: argument.type
6572
count: 2
6673
path: tests/SAML2/Response/Validation/ConstraintValidator/DestinationMatchesTest.php
6774

6875
-
69-
message: "#^Parameter \\#1 \\$response of method SimpleSAML\\\\SAML2\\\\Response\\\\Validation\\\\ConstraintValidator\\\\IsSuccessful\\:\\:validate\\(\\) expects SimpleSAML\\\\SAML2\\\\XML\\\\samlp\\\\Response, Mockery\\\\MockInterface given\\.$#"
76+
message: '#^Parameter \#1 \$response of method SimpleSAML\\SAML2\\Response\\Validation\\ConstraintValidator\\IsSuccessful\:\:validate\(\) expects SimpleSAML\\SAML2\\XML\\samlp\\Response, Mockery\\MockInterface given\.$#'
77+
identifier: argument.type
7078
count: 2
7179
path: tests/SAML2/Response/Validation/ConstraintValidator/IsSuccessfulTest.php
7280

7381
-
74-
message: "#^Parameter \\#1 \\$xml of static method SimpleSAML\\\\SAML2\\\\XML\\\\saml\\\\Assertion\\:\\:fromXML\\(\\) expects DOMElement, DOMNode\\|null given\\.$#"
82+
message: '#^Parameter \#1 \$xml of static method SimpleSAML\\SAML2\\XML\\saml\\Assertion\:\:fromXML\(\) expects DOMElement, DOMNode\|null given\.$#'
83+
identifier: argument.type
7584
count: 2
7685
path: tests/SAML2/Response/XmlSignatureWrappingTest.php
86+
87+
-
88+
message: '#^Parameter \#1 \$requestedAuthnContexts of class SimpleSAML\\SAML2\\XML\\samlp\\RequestedAuthnContext constructor expects array\<SimpleSAML\\SAML2\\XML\\saml\\AuthnContextClassRef\|SimpleSAML\\SAML2\\XML\\saml\\AuthnContextDeclRef\>, array\<int, DOMDocument\|SimpleSAML\\SAML2\\XML\\saml\\AuthnContextDeclRef\> given\.$#'
89+
identifier: argument.type
90+
count: 1
91+
path: tests/SAML2/XML/samlp/RequestedAuthnContextTest.php

src/Assert/CustomAssertionTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ trait CustomAssertionTrait
1515
{
1616
private static string $scheme_regex = '/^([a-z][a-z0-9\+\-\.]+[:])/i';
1717

18+
1819
/***********************************************************************************
1920
* NOTE: Custom assertions may be added below this line. *
2021
* They SHOULD be marked as `private` to ensure the call is forced *

src/Assertion/Processor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public function decryptAssertions(ArrayCollection $assertions): ArrayCollection
6565
return $decrypted;
6666
}
6767

68+
6869
/**
6970
* @param \SimpleSAML\SAML2\Utilities\ArrayCollection $assertions Collection of decrypted assertions
7071
* @return \SimpleSAML\SAML2\Utilities\ArrayCollection Collection of processed assertions

src/Assertion/ProcessorBuilder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ private static function createSubjectConfirmationValidator(
120120
return $validator;
121121
}
122122

123+
123124
/**
124125
* @param \Psr\Log\LoggerInterface $logger
125126
* @param \SimpleSAML\SAML2\Certificate\PrivateKeyLoader $keyLoader

src/Binding.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44

55
namespace SimpleSAML\SAML2;
66

7-
use Psr\Http\Message\{ResponseInterface, ServerRequestInterface};
8-
use SimpleSAML\SAML2\Binding\{HTTPArtifact, HTTPPost, HTTPRedirect, SOAP};
7+
use Psr\Http\Message\ResponseInterface;
8+
use Psr\Http\Message\ServerRequestInterface;
9+
use SimpleSAML\SAML2\Binding\HTTPArtifact;
10+
use SimpleSAML\SAML2\Binding\HTTPPost;
11+
use SimpleSAML\SAML2\Binding\HTTPRedirect;
12+
use SimpleSAML\SAML2\Binding\SOAP;
913
use SimpleSAML\SAML2\Constants as C;
1014
use SimpleSAML\SAML2\Exception\Protocol\UnsupportedBindingException;
1115
use SimpleSAML\SAML2\XML\samlp\AbstractMessage;

src/Binding/HTTPArtifact.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class HTTPArtifact extends Binding implements AsynchronousBindingInterface, Rela
4646
{
4747
use RelayStateTrait;
4848

49+
4950
/**
5051
* @psalm-suppress UndefinedDocblockClass
5152
* @psalm-suppress UndefinedClass

src/Binding/HTTPPost.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class HTTPPost extends Binding implements AsynchronousBindingInterface, RelaySta
3131
{
3232
use RelayStateTrait;
3333

34+
3435
/**
3536
* Send a SAML 2 message using the HTTP-POST binding.
3637
*

src/Binding/HTTPRedirect.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class HTTPRedirect extends Binding implements AsynchronousBindingInterface, Rela
4242
{
4343
use RelayStateTrait;
4444

45+
4546
/**
4647
* Create the redirect URL for a message.
4748
*

src/Certificate/Key.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class Key implements ArrayAccess
2323

2424
public const USAGE_ENCRYPTION = 'encryption';
2525

26+
2627
/** @var array */
2728
protected array $keyData = [];
2829

0 commit comments

Comments
 (0)