Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
8dc7156
Migrate to xsd-types
tvdijen Feb 27, 2025
6a4c6fb
Fix interoperability-tests
tvdijen Apr 28, 2025
a9feaa4
Allow tld as DomainValue
tvdijen Apr 28, 2025
64e2f30
Fix codesniffer errors
tvdijen Apr 28, 2025
3ea81b5
Fix several phpstan-issues
tvdijen Apr 28, 2025
38c11c6
generate baseline
tvdijen Apr 28, 2025
cd2a381
Fix phpstan-dev issues and generate a baseline
tvdijen Apr 28, 2025
4733ff8
Add DecisionType-type
tvdijen Jun 17, 2025
388c2f9
Add AnyURIList-type
tvdijen Jun 17, 2025
852d825
Add AuthnContextDecision-type
tvdijen Jun 17, 2025
c2cecef
WIP: Migrate to xsd-types
tvdijen Aug 27, 2025
88a0b94
Fix code quality
tvdijen Aug 27, 2025
354e774
Fix codesniffer issues
tvdijen Sep 23, 2025
b2cf16d
Bump dependencies
tvdijen Sep 27, 2025
db83eb5
Revert unjust const>enum convertion
tvdijen Sep 27, 2025
469be42
Remove problematic assertion; this should be handled by the idp/sp an…
tvdijen Sep 29, 2025
063d6a6
trim CIDR-values before validating them & increase coverage
tvdijen Sep 29, 2025
18a7ed0
Fix rebase
tvdijen Sep 29, 2025
a225715
Fix codesniffer issues
tvdijen Oct 2, 2025
7ca1f03
Remove unused code
tvdijen Oct 2, 2025
3fa79eb
Simplify unit tests for now
tvdijen Oct 10, 2025
732d6fa
Properly deal with null-values during arrayization
tvdijen Oct 10, 2025
8cca70e
Remove unnecessary unit-test
tvdijen Oct 10, 2025
6f79cbc
Fix several issues
tvdijen Oct 10, 2025
7fef41c
bugfix: deal with null value
tvdijen Oct 11, 2025
6e3c2fe
Remove unused class
tvdijen Oct 17, 2025
98a42a6
Replace PrivateKey class with the one from xml-security
tvdijen Oct 17, 2025
ddf3f2c
Bump xml-common
tvdijen Nov 12, 2025
62a017c
Fix version constraint
tvdijen Nov 13, 2025
4a66f07
Properly normalize documents
tvdijen Nov 17, 2025
e38af41
Properly normalize documents
tvdijen Nov 18, 2025
90f3fb4
Fix code quality
tvdijen Nov 18, 2025
792d9c9
Fix remaining tests.Added pre-commit commands in composer.json (#394)
ioigoume Nov 20, 2025
4d3d6a4
Merge branch 'master' into feature/xsd-types
tvdijen Nov 20, 2025
9cfaa59
Fix phpstan-baseline
tvdijen Nov 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .github/workflows/interoperability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ jobs:
wget https://mds.edugain.org/edugain-v2.xml -O /tmp/metadata/edugain.xml
wget https://technical.edugain.org/mds-v2.cer -O /tmp/metadata/edugain-pub.crt

- name: Download eduID metadata & public key
if: steps.cache-metadata.outputs.cache-hit != 'true'
run: |
mkdir -p /tmp/metadata
wget https://metadata.eduid.cz/entities/eduid -O /tmp/metadata/eduid.xml
wget https://www.eduid.cz/docs/eduid/metadata/metadata.eduid.cz.crt.pem -O /tmp/metadata/eduid.crt

- name: Download eduID metadata & public key
if: steps.cache-metadata.outputs.cache-hit != 'true'
Expand Down
32 changes: 21 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@
"ext-pcre": "*",
"ext-zlib": "*",

"nyholm/psr7": "~1.8.2",
"psr/clock": "~1.0.0",
"nyholm/psr7": "~1.8",
"psr/clock": "~1.0",
"psr/http-message": "~2.0",
"psr/log": "~2.3.1 || ~3.0.0",
"simplesamlphp/assert": "~1.8.1",
"simplesamlphp/xml-common": "~1.25.0",
"simplesamlphp/xml-security": "~1.13.4",
"simplesamlphp/xml-soap": "~1.7.0"
"psr/log": "~2.3 || ~3.0",
"simplesamlphp/assert": "~1.9",
"simplesamlphp/xml-common": "~2.3",
"simplesamlphp/xml-security": "~2.0",
"simplesamlphp/xml-soap": "~2.0"
},
"require-dev": {
"ext-intl": "*",

"beste/clock": "~3.0.0",
"mockery/mockery": "~1.6.12",
"simplesamlphp/simplesamlphp-test-framework": "~1.10.2"
"beste/clock": "~3.0",
"mockery/mockery": "~1.6",
"simplesamlphp/simplesamlphp-test-framework": "~1.10"
},
"suggest": {
"ext-soap": "*"
Expand All @@ -58,7 +58,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "v6.0.x-dev"
"dev-master": "v5.1.x-dev"
}
},
"config": {
Expand All @@ -69,5 +69,15 @@
"phpstan/extension-installer": true,
"simplesamlphp/composer-xmlprovider-installer": true
}
},
"scripts": {
"pre-commit": [
"vendor/bin/phpcs -p",
"vendor/bin/composer-require-checker check --config-file=tools/composer-require-checker.json composer.json",
"vendor/bin/phpstan analyze -c phpstan.neon",
"vendor/bin/phpstan analyze -c phpstan-dev.neon",
"vendor/bin/composer-unused",
"vendor/bin/phpunit --no-coverage --testdox"
]
}
}
2 changes: 2 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
<exclude-pattern>tests/SAML2/XML/saml/AuthnContextTest.php</exclude-pattern>
<exclude-pattern>tests/SAML2/XML/saml/EncryptedAssertionTest.php</exclude-pattern>
<exclude-pattern>tests/SAML2/XML/saml/EncryptedIDTest.php</exclude-pattern>
<exclude-pattern>tests/SAML2/XML/saml/SubjectConfirmationTest.php</exclude-pattern>
<exclude-pattern>tests/SAML2/XML/samlp/AuthnRequestTest.php</exclude-pattern>
<exclude-pattern>tests/SAML2/XML/samlp/RequestedAuthnContextTest.php</exclude-pattern>
<exclude-pattern>tests/SAML2/XML/samlp/StatusDetailTest.php</exclude-pattern>
<exclude-pattern>tests/SAML2/XML/shibmd/KeyAuthorityTest.php</exclude-pattern>
Expand Down
126 changes: 120 additions & 6 deletions phpstan-baseline-dev.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
parameters:
ignoreErrors:
-
message: '#^Dead catch \- SimpleSAML\\Assert\\AssertionFailedException is never thrown in the try block\.$#'
identifier: catch.neverThrown
count: 1
path: tests/InterOperability/EntityDescriptorTest.php

-
message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''SimpleSAML\\\\SAML2\\\\Utilities\\\\ArrayCollection'' and SimpleSAML\\SAML2\\Utilities\\ArrayCollection will always evaluate to true\.$#'
identifier: staticMethod.alreadyNarrowedType
count: 1
path: tests/SAML2/Assertion/ProcessorTest.php

-
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\.$#'
identifier: property.phpDocType
Expand Down Expand Up @@ -30,12 +42,24 @@ parameters:
count: 1
path: tests/SAML2/Assertion/Validation/AssertionValidatorTest.php

-
message: '#^Missing call to parent\:\:setUp\(\) method\.$#'
identifier: phpunit.callParent
count: 1
path: tests/SAML2/Assertion/Validation/ConstraintValidator/SpIsValidAudienceTest.php

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

-
message: '#^Missing call to parent\:\:setUp\(\) method\.$#'
identifier: phpunit.callParent
count: 1
path: tests/SAML2/Assertion/Validation/ConstraintValidator/SubjectConfirmationResponseToMatchesTest.php

-
message: '#^Parameter \#1 \$response of class SimpleSAML\\SAML2\\Assertion\\Validation\\ConstraintValidator\\SubjectConfirmationResponseToMatches constructor expects SimpleSAML\\SAML2\\XML\\samlp\\Response, Mockery\\MockInterface given\.$#'
identifier: argument.type
Expand All @@ -60,32 +84,122 @@ parameters:
count: 3
path: tests/SAML2/Certificate/KeyLoaderTest.php

-
message: '#^Missing call to parent\:\:setUp\(\) method\.$#'
identifier: phpunit.callParent
count: 1
path: tests/SAML2/Certificate/KeyLoaderTest.php

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

-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''SimpleSAML\\\\XMLSecurity\\\\Key\\\\PrivateKey'' and SimpleSAML\\XMLSecurity\\Key\\PrivateKey will always evaluate to true\.$#'
identifier: method.alreadyNarrowedType
count: 1
path: tests/SAML2/Certificate/PrivateKeyLoaderTest.php

-
message: '#^Missing call to parent\:\:setUp\(\) method\.$#'
identifier: phpunit.callParent
count: 1
path: tests/SAML2/Response/SignatureValidationTest.php

-
message: '#^Missing call to parent\:\:setUp\(\) method\.$#'
identifier: phpunit.callParent
count: 1
path: tests/SAML2/Response/Validation/ConstraintValidator/DestinationMatchesTest.php

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

-
message: '#^Missing call to parent\:\:setUp\(\) method\.$#'
identifier: phpunit.callParent
count: 1
path: tests/SAML2/Response/Validation/ConstraintValidator/IsSuccessfulTest.php

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

-
message: '#^Parameter \#1 \$xml of static method SimpleSAML\\SAML2\\XML\\saml\\Assertion\:\:fromXML\(\) expects DOMElement, DOMNode\|null given\.$#'
identifier: argument.type
message: '#^Missing call to parent\:\:setUp\(\) method\.$#'
identifier: phpunit.callParent
count: 1
path: tests/SAML2/Signature/PublicKeyValidatorTest.php

-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''ArrayIterator'' and ArrayIterator will always evaluate to true\.$#'
identifier: method.alreadyNarrowedType
count: 1
path: tests/SAML2/Utilities/ArrayCollectionTest.php

-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''SimpleSAML\\\\SAML2\\\\Utilities\\\\ArrayCollection'' and SimpleSAML\\SAML2\\Utilities\\ArrayCollection will always evaluate to true\.$#'
identifier: method.alreadyNarrowedType
count: 2
path: tests/SAML2/Response/XmlSignatureWrappingTest.php
path: tests/SAML2/Utilities/ArrayCollectionTest.php

-
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\.$#'
identifier: argument.type
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''SimpleSAML\\\\SAML2\\\\XML\\\\md\\\\AdditionalMetadataLocation'' and SimpleSAML\\SAML2\\XML\\md\\AdditionalMetadataLocation will always evaluate to true\.$#'
identifier: method.alreadyNarrowedType
count: 2
path: tests/SAML2/XML/md/EntityDescriptorTest.php

-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''SimpleSAML\\\\SAML2\\\\XML\\\\md\\\\ContactPerson'' and SimpleSAML\\SAML2\\XML\\md\\ContactPerson will always evaluate to true\.$#'
identifier: method.alreadyNarrowedType
count: 3
path: tests/SAML2/XML/md/EntityDescriptorTest.php

-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''SimpleSAML\\\\SAML2\\\\XML\\\\md\\\\SingleSignOnService'' and SimpleSAML\\SAML2\\XML\\md\\SingleSignOnService will always evaluate to true\.$#'
identifier: method.alreadyNarrowedType
count: 1
path: tests/SAML2/XML/md/IDPSSODescriptorTest.php

-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''SimpleSAML\\\\SAML2\\\\XML\\\\md\\\\AbstractRoleDescriptor'' and SimpleSAML\\SAML2\\XML\\md\\AbstractRoleDescriptor will always evaluate to true\.$#'
identifier: method.alreadyNarrowedType
count: 1
path: tests/SAML2/XML/md/RoleDescriptorTest.php

-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''SimpleSAML\\\\SAML2\\\\XML\\\\md\\\\ContactPerson'' and SimpleSAML\\SAML2\\XML\\md\\ContactPerson will always evaluate to true\.$#'
identifier: method.alreadyNarrowedType
count: 4
path: tests/SAML2/XML/md/RoleDescriptorTest.php

-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''SimpleSAML\\\\SAML2\\\\XML\\\\md\\\\KeyDescriptor'' and SimpleSAML\\SAML2\\XML\\md\\KeyDescriptor will always evaluate to true\.$#'
identifier: method.alreadyNarrowedType
count: 4
path: tests/SAML2/XML/md/RoleDescriptorTest.php

-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''SimpleSAML\\\\SAML2\\\\XML\\\\saml\\\\NameID'' and SimpleSAML\\SAML2\\XML\\saml\\NameID will always evaluate to true\.$#'
identifier: method.alreadyNarrowedType
count: 1
path: tests/SAML2/XML/saml/AssertionTest.php

-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''SimpleSAML\\\\SAML2\\\\XML\\\\saml\\\\NameID'' and array\<SimpleSAML\\SAML2\\XML\\saml\\AttributeValue\|SimpleSAML\\SAML2\\XML\\saml\\IdentifierInterface\> will always evaluate to false\.$#'
identifier: method.impossibleType
count: 4
path: tests/SAML2/XML/saml/AssertionTest.php

-
message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''SimpleSAML\\\\Test\\\\SAML2\\\\CustomStatement'' and SimpleSAML\\Test\\SAML2\\CustomStatement will always evaluate to true\.$#'
identifier: method.alreadyNarrowedType
count: 1
path: tests/SAML2/XML/samlp/RequestedAuthnContextTest.php
path: tests/SAML2/XML/saml/StatementTest.php
Loading
Loading