From 13f0d1e1b6ca2f318295a51054c880827b6cc6f1 Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Mon, 3 Jun 2019 11:34:13 +0200 Subject: [PATCH] Revert BC-breaking Webmozart-assertions --- composer.json | 3 +-- hooks/hook_cron.php | 7 +++---- hooks/hook_frontpage.php | 6 ++---- lib/MetaLoader.php | 5 ++--- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index 2e98e09..b093d54 100644 --- a/composer.json +++ b/composer.json @@ -28,8 +28,7 @@ }, "require": { "php": ">=5.6", - "simplesamlphp/composer-module-installer": "~1.1", - "webmozart/assert": "~1.4" + "simplesamlphp/composer-module-installer": "~1.1" }, "require-dev": { "simplesamlphp/simplesamlphp": "^1.17", diff --git a/hooks/hook_cron.php b/hooks/hook_cron.php index f31ada4..b6b83f0 100644 --- a/hooks/hook_cron.php +++ b/hooks/hook_cron.php @@ -1,7 +1,6 @@ SimpleSAML\Module::getModuleURL('metarefresh/fetch.php'), diff --git a/lib/MetaLoader.php b/lib/MetaLoader.php index 1fc6963..f71e1e5 100644 --- a/lib/MetaLoader.php +++ b/lib/MetaLoader.php @@ -5,7 +5,6 @@ use RobRichards\XMLSecLibs\XMLSecurityDSig; use SimpleSAML\Configuration; use SimpleSAML\Logger; -use Webmozart\Assert\Assert; /** * @package SimpleSAMLphp @@ -420,7 +419,7 @@ private function addMetadata($filename, $metadata, $type, array $template = null */ public function writeARPfile(Configuration $config) { - Assert::isInstanceOf($config, Configuration::class); + assert($config instanceof Configuration::class); $arpfile = $config->getValue('arpfile'); $types = ['saml20-sp-remote']; @@ -507,7 +506,7 @@ public function writeMetadataFiles($outputDir) */ public function writeMetadataSerialize($outputDir) { - Assert::string($outputDir); + assert(is_string($outputDir)); $metaHandler = new \SimpleSAML\Metadata\MetaDataStorageHandlerSerialize(['directory' => $outputDir]);