From 26fd93f6d943099075f2df3ffa5a12bbc02fe712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Pe=CC=81rez?= <jaime.perez@uninett.no> Date: Wed, 31 Aug 2016 13:41:12 +0200 Subject: [PATCH] Deprecate the old SimpleSAML_Error_NoPassive and SimpleSAML_Error_ProxyCountExceeded exceptions. --- lib/SimpleSAML/Error/NoPassive.php | 8 ++++++++ lib/SimpleSAML/Error/ProxyCountExceeded.php | 8 ++++++++ modules/saml/lib/Error.php | 2 ++ 3 files changed, 18 insertions(+) diff --git a/lib/SimpleSAML/Error/NoPassive.php b/lib/SimpleSAML/Error/NoPassive.php index 73b5cd833..8966dc8b5 100644 --- a/lib/SimpleSAML/Error/NoPassive.php +++ b/lib/SimpleSAML/Error/NoPassive.php @@ -1,6 +1,14 @@ <?php +/** + * Class SimpleSAML_Error_NoPassive + * + * @deprecated This class has been deprecated and will be removed in SimpleSAMLphp 2.0. Please use + * SimpleSAML\Module\saml\Error\NoPassive instead. + * + * @see \SimpleSAML\Module\saml\Error\NoPassive + */ class SimpleSAML_Error_NoPassive extends SimpleSAML_Error_Exception { } diff --git a/lib/SimpleSAML/Error/ProxyCountExceeded.php b/lib/SimpleSAML/Error/ProxyCountExceeded.php index bebe09321..0af64d51e 100644 --- a/lib/SimpleSAML/Error/ProxyCountExceeded.php +++ b/lib/SimpleSAML/Error/ProxyCountExceeded.php @@ -1,6 +1,14 @@ <?php +/** + * Class SimpleSAML_Error_ProxyCountExceeded + * + * @deprecated This class has been deprecated and will be removed in SimpleSAMLphp 2.0. Please use + * SimpleSAML\Module\saml\Error\ProxyCountExceeded instead. + * + * @see \SimpleSAML\Module\saml\Error\ProxyCountExceeded + */ class SimpleSAML_Error_ProxyCountExceeded extends SimpleSAML_Error_Exception { } diff --git a/modules/saml/lib/Error.php b/modules/saml/lib/Error.php index 0fe406390..e5654eab9 100644 --- a/modules/saml/lib/Error.php +++ b/modules/saml/lib/Error.php @@ -104,6 +104,7 @@ class sspmod_saml_Error extends SimpleSAML_Error_Exception { // Return the original exception unchanged return $exception; + // TODO: remove this branch in 2.0 } elseif ($exception instanceof SimpleSAML_Error_NoPassive) { $e = new self( \SAML2\Constants::STATUS_RESPONDER, @@ -111,6 +112,7 @@ class sspmod_saml_Error extends SimpleSAML_Error_Exception { $exception->getMessage(), $exception ); + // TODO: remove this branch in 2.0 } elseif ($exception instanceof SimpleSAML_Error_ProxyCountExceeded) { $e = new self( \SAML2\Constants::STATUS_RESPONDER, -- GitLab