Skip to content

Commit 58277c8

Browse files
committed
Fix CI-issues
1 parent 0d6845b commit 58277c8

3 files changed

Lines changed: 3 additions & 98 deletions

File tree

phpstan-baseline.neon

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,5 @@
11
parameters:
22
ignoreErrors:
3-
-
4-
message: "#^Call to static method addSign\\(\\) on an unknown class SimpleSAML\\\\Module\\\\saml\\\\Message\\.$#"
5-
count: 1
6-
path: src/Binding/HTTPArtifact.php
7-
8-
-
9-
message: "#^Call to static method getInstance\\(\\) on an unknown class SimpleSAML\\\\Configuration\\.$#"
10-
count: 2
11-
path: src/Binding/HTTPArtifact.php
12-
13-
-
14-
message: "#^Call to static method getInstance\\(\\) on an unknown class SimpleSAML\\\\Store\\\\StoreFactory\\.$#"
15-
count: 1
16-
path: src/Binding/HTTPArtifact.php
17-
18-
-
19-
message: "#^Call to static method getMetadataHandler\\(\\) on an unknown class SimpleSAML\\\\Metadata\\\\MetaDataStorageHandler\\.$#"
20-
count: 1
21-
path: src/Binding/HTTPArtifact.php
22-
23-
-
24-
message: "#^Instantiated class SimpleSAML\\\\Utils\\\\HTTP not found\\.$#"
25-
count: 1
26-
path: src/Binding/HTTPArtifact.php
27-
28-
-
29-
message: "#^Parameter \\$idpMetadata of method SimpleSAML\\\\SAML2\\\\Binding\\\\HTTPArtifact\\:\\:verifyArtifactResponseSignature\\(\\) has invalid type SimpleSAML\\\\Configuration\\.$#"
30-
count: 1
31-
path: src/Binding/HTTPArtifact.php
32-
33-
-
34-
message: "#^Parameter \\$idpMetadata of method SimpleSAML\\\\SAML2\\\\Binding\\\\HTTPArtifact\\:\\:verifyMessageSignature\\(\\) has invalid type SimpleSAML\\\\Configuration\\.$#"
35-
count: 1
36-
path: src/Binding/HTTPArtifact.php
37-
38-
-
39-
message: "#^Parameter \\$sp of method SimpleSAML\\\\SAML2\\\\Binding\\\\HTTPArtifact\\:\\:setSPMetadata\\(\\) has invalid type SimpleSAML\\\\Configuration\\.$#"
40-
count: 1
41-
path: src/Binding/HTTPArtifact.php
42-
43-
-
44-
message: "#^Property SimpleSAML\\\\SAML2\\\\Binding\\\\HTTPArtifact\\:\\:\\$spMetadata has unknown class SimpleSAML\\\\Configuration as its type\\.$#"
45-
count: 1
46-
path: src/Binding/HTTPArtifact.php
47-
483
-
494
message: "#^Access to constant AES128_CBC on an unknown class SimpleSAML\\\\XMLSecurity\\\\XMLSecurityKey\\.$#"
505
count: 1
@@ -65,61 +20,11 @@ parameters:
6520
count: 1
6621
path: src/Certificate/PrivateKeyLoader.php
6722

68-
-
69-
message: "#^Parameter \\$configuration of method SimpleSAML\\\\SAML2\\\\Configuration\\\\SimpleSAMLConverter\\:\\:convertToIdentityProvider\\(\\) has invalid type SimpleSAML\\\\Configuration\\.$#"
70-
count: 1
71-
path: src/Configuration/SimpleSAMLConverter.php
72-
73-
-
74-
message: "#^Parameter \\$configuration of method SimpleSAML\\\\SAML2\\\\Configuration\\\\SimpleSAMLConverter\\:\\:convertToServiceProvider\\(\\) has invalid type SimpleSAML\\\\Configuration\\.$#"
75-
count: 1
76-
path: src/Configuration/SimpleSAMLConverter.php
77-
78-
-
79-
message: "#^Parameter \\$configuration of method SimpleSAML\\\\SAML2\\\\Configuration\\\\SimpleSAMLConverter\\:\\:enrichForDecryptionProvider\\(\\) has invalid type SimpleSAML\\\\Configuration\\.$#"
80-
count: 1
81-
path: src/Configuration/SimpleSAMLConverter.php
82-
83-
-
84-
message: "#^Parameter \\$configuration of method SimpleSAML\\\\SAML2\\\\Configuration\\\\SimpleSAMLConverter\\:\\:enrichForIdentityProvider\\(\\) has invalid type SimpleSAML\\\\Configuration\\.$#"
85-
count: 1
86-
path: src/Configuration/SimpleSAMLConverter.php
87-
88-
-
89-
message: "#^Parameter \\$configuration of method SimpleSAML\\\\SAML2\\\\Configuration\\\\SimpleSAMLConverter\\:\\:enrichForServiceProvider\\(\\) has invalid type SimpleSAML\\\\Configuration\\.$#"
90-
count: 1
91-
path: src/Configuration/SimpleSAMLConverter.php
92-
93-
-
94-
message: "#^Parameter \\$configuration of method SimpleSAML\\\\SAML2\\\\Configuration\\\\SimpleSAMLConverter\\:\\:pluckConfiguration\\(\\) has invalid type SimpleSAML\\\\Configuration\\.$#"
95-
count: 1
96-
path: src/Configuration/SimpleSAMLConverter.php
97-
98-
-
99-
message: "#^Instantiated class SimpleSAML\\\\Utils\\\\Config not found\\.$#"
100-
count: 1
101-
path: src/SOAPClient.php
102-
103-
-
104-
message: "#^Instantiated class SimpleSAML\\\\Utils\\\\Crypto not found\\.$#"
105-
count: 1
106-
path: src/SOAPClient.php
107-
108-
-
109-
message: "#^Parameter \\$dstMetadata of method SimpleSAML\\\\SAML2\\\\SOAPClient\\:\\:send\\(\\) has invalid type SimpleSAML\\\\Configuration\\.$#"
110-
count: 1
111-
path: src/SOAPClient.php
112-
11323
-
11424
message: "#^Parameter \\$key of method SimpleSAML\\\\SAML2\\\\SOAPClient\\:\\:validateSSL\\(\\) has invalid type SimpleSAML\\\\XMLSecurity\\\\XMLSecurityKey\\.$#"
11525
count: 1
11626
path: src/SOAPClient.php
11727

118-
-
119-
message: "#^Parameter \\$srcMetadata of method SimpleSAML\\\\SAML2\\\\SOAPClient\\:\\:send\\(\\) has invalid type SimpleSAML\\\\Configuration\\.$#"
120-
count: 1
121-
path: src/SOAPClient.php
122-
12328
-
12429
message: "#^Unsafe usage of new static\\(\\)\\.$#"
12530
count: 2

src/Binding/HTTPArtifact.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function receive(ServerRequestInterface $request): AbstractMessage
140140
}
141141

142142
/** @psalm-suppress UndefinedClass */
143-
$metadataHandler = MetaDataStorageHandler::getMetadataHandler(Configuration::getInstance());
143+
$metadataHandler = MetaDataStorageHandler::getMetadataHandler();
144144

145145
$idpMetadata = $metadataHandler->getMetaDataConfigForSha1($sourceId, 'saml20-idp-remote');
146146

tests/SAML2/Binding/HTTPArtifactTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44

55
namespace SimpleSAML\Test\SAML2\Binding;
66

7+
use DOMDocument;
78
use Exception;
89
use Nyholm\Psr7\ServerRequest;
910
use PHPUnit\Framework\Attributes\CoversClass;
1011
use PHPUnit\Framework\Attributes\DataProvider;
1112
use PHPUnit\Framework\TestCase;
13+
use ReflectionMethod;
1214
use SimpleSAML\Configuration;
1315
use SimpleSAML\SAML2\Binding\HTTPArtifact;
1416
use SimpleSAML\SAML2\XML\samlp\AbstractMessage;
@@ -53,11 +55,9 @@ public function testLegacyVsNewSignatureApiIsDifferent(): void
5355
$legacyClass = \SAML2\Message::class;
5456
$newClass = \SimpleSAML\SAML2\XML\samlp\AbstractMessage::class;
5557

56-
/** @phpstan-ignore-next-line */
5758
$this->assertTrue(method_exists($legacyClass, 'validate'));
5859
$this->assertFalse(method_exists($legacyClass, 'verify'));
5960

60-
/** @phpstan-ignore-next-line */
6161
$this->assertTrue(method_exists($newClass, 'verify'));
6262
$this->assertFalse(method_exists($newClass, 'validate'));
6363
}

0 commit comments

Comments
 (0)