Skip to content

Commit 8b20514

Browse files
committed
Remove BC breaking Webmozart asserts
1 parent 41eca79 commit 8b20514

File tree

4 files changed

+5
-12
lines changed

4 files changed

+5
-12
lines changed

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
},
2929
"require": {
3030
"php": ">=5.6",
31-
"simplesamlphp/composer-module-installer": "~1.1",
32-
"webmozart/assert": "~1.4"
31+
"simplesamlphp/composer-module-installer": "~1.1"
3332
},
3433
"require-dev": {
3534
"simplesamlphp/simplesamlphp": "^1.17",

lib/SAML2/XML/fed/Endpoint.php

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

33
namespace SimpleSAML\Module\adfs\SAML2\XML\fed;
44

5-
use Webmozart\Assert\Assert;
6-
75
/**
86
* Class representing fed Endpoint.
97
*
@@ -22,8 +20,8 @@ class Endpoint
2220
*/
2321
public static function appendXML(\DOMElement $parent, $name, $address)
2422
{
25-
Assert::string($name);
26-
Assert::string($address);
23+
assert(is_string($name));
24+
assert(is_string($address));
2725

2826
$e = $parent->ownerDocument->createElement($name);
2927
$parent->appendChild($e);

lib/SAML2/XML/fed/SecurityTokenServiceType.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace SimpleSAML\Module\adfs\SAML2\XML\fed;
44

5-
use Webmozart\Assert\Assert;
6-
75
/**
86
* Class representing SecurityTokenServiceType RoleDescriptor.
97
*
@@ -48,7 +46,7 @@ public function __construct(\DOMElement $xml = null)
4846
*/
4947
public function toXML(\DOMElement $parent)
5048
{
51-
Assert::string($this->Location);
49+
assert(is_string($this->Location));
5250

5351
if (is_null($this->Location)) {
5452
throw new \Exception('Location not set');

www/idp/metadata.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22

3-
use Webmozart\Assert\Assert;
4-
53
// load configuration and metadata
64
$config = \SimpleSAML\Configuration::getInstance();
75
$metadata = \SimpleSAML\Metadata\MetaDataStorageHandler::getMetadataHandler();
@@ -50,7 +48,7 @@
5048
if ($idpmeta->hasValue('https.certificate')) {
5149
/** @var array $httpsCert */
5250
$httpsCert = \SimpleSAML\Utils\Crypto::loadPublicKey($idpmeta, true, 'https.');
53-
Assert::keyExists($httpsCert, 'certData');
51+
assert(array_key_exists('certData', $httpsCert));
5452
$availableCerts['https.crt'] = $httpsCert;
5553
$keys[] = [
5654
'type' => 'X509Certificate',

0 commit comments

Comments
 (0)