diff --git a/libraries/src/Event/Result/ResultTypeArrayAware.php b/libraries/src/Event/Result/ResultTypeArrayAware.php index d7cd020d81b78..60a6b1389edf5 100644 --- a/libraries/src/Event/Result/ResultTypeArrayAware.php +++ b/libraries/src/Event/Result/ResultTypeArrayAware.php @@ -31,17 +31,6 @@ trait ResultTypeArrayAware */ protected $resultIsNullable = false; - /** - * Can the result attribute values also be boolean FALSE? - * - * @var boolean - * @since 4.2.0 - * - * @deprecated 4.3 will be removed in 7.0 - * You should use nullable values or exceptions instead of returning boolean false results. - */ - protected $resultIsFalseable = false; - /** * Checks the type of the data being appended to the result argument. * @@ -59,10 +48,6 @@ public function typeCheckResult($data): void return; } - if ($this->resultIsFalseable && $data === false) { - return; - } - if (!\is_array($data)) { throw new \InvalidArgumentException(\sprintf('Event %s only accepts Array results.', $this->getName())); } diff --git a/libraries/src/Event/Result/ResultTypeFloatAware.php b/libraries/src/Event/Result/ResultTypeFloatAware.php index 4f979d2a1c106..66d531091dd27 100644 --- a/libraries/src/Event/Result/ResultTypeFloatAware.php +++ b/libraries/src/Event/Result/ResultTypeFloatAware.php @@ -31,17 +31,6 @@ trait ResultTypeFloatAware */ protected $resultIsNullable = false; - /** - * Can the result attribute values also be boolean FALSE? - * - * @var boolean - * @since 4.2.0 - * - * @deprecated 4.3 will be removed in 7.0 - * You should use nullable values or exceptions instead of returning boolean false results. - */ - protected $resultIsFalseable = false; - /** * Checks the type of the data being appended to the result argument. * @@ -59,10 +48,6 @@ public function typeCheckResult($data): void return; } - if ($this->resultIsFalseable && $data === false) { - return; - } - if (!\is_float($data)) { throw new \InvalidArgumentException(\sprintf('Event %s only accepts Float results.', $this->getName())); } diff --git a/libraries/src/Event/Result/ResultTypeIntegerAware.php b/libraries/src/Event/Result/ResultTypeIntegerAware.php index 41f22d6178ade..69da8905204e1 100644 --- a/libraries/src/Event/Result/ResultTypeIntegerAware.php +++ b/libraries/src/Event/Result/ResultTypeIntegerAware.php @@ -31,17 +31,6 @@ trait ResultTypeIntegerAware */ protected $resultIsNullable = false; - /** - * Can the result attribute values also be boolean FALSE? - * - * @var boolean - * @since 4.2.0 - * - * @deprecated 4.3 will be removed in 7.0 - * You should use nullable values or exceptions instead of returning boolean false results. - */ - protected $resultIsFalseable = false; - /** * Checks the type of the data being appended to the result argument. * @@ -59,10 +48,6 @@ public function typeCheckResult($data): void return; } - if ($this->resultIsFalseable && $data === false) { - return; - } - if (!\is_int($data)) { throw new \InvalidArgumentException(\sprintf('Event %s only accepts Integer results.', $this->getName())); } diff --git a/libraries/src/Event/Result/ResultTypeNumericAware.php b/libraries/src/Event/Result/ResultTypeNumericAware.php index b740e5115f2ce..5f5a68f9584ef 100644 --- a/libraries/src/Event/Result/ResultTypeNumericAware.php +++ b/libraries/src/Event/Result/ResultTypeNumericAware.php @@ -31,17 +31,6 @@ trait ResultTypeNumericAware */ protected $resultIsNullable = false; - /** - * Can the result attribute values also be boolean FALSE? - * - * @var boolean - * @since 4.2.0 - * - * @deprecated 4.3 will be removed in 7.0 - * You should use nullable values or exceptions instead of returning boolean false results. - */ - protected $resultIsFalseable = false; - /** * Checks the type of the data being appended to the result argument. * @@ -59,10 +48,6 @@ public function typeCheckResult($data): void return; } - if ($this->resultIsFalseable && $data === false) { - return; - } - if (!is_numeric($data)) { throw new \InvalidArgumentException(\sprintf('Event %s only accepts Numeric results.', $this->getName())); } diff --git a/libraries/src/Event/Result/ResultTypeObjectAware.php b/libraries/src/Event/Result/ResultTypeObjectAware.php index 920bd9a97d6d7..f4eae215110da 100644 --- a/libraries/src/Event/Result/ResultTypeObjectAware.php +++ b/libraries/src/Event/Result/ResultTypeObjectAware.php @@ -33,17 +33,6 @@ trait ResultTypeObjectAware */ protected $resultIsNullable = false; - /** - * Can the result attribute values also be boolean FALSE? - * - * @var boolean - * @since 4.2.0 - * - * @deprecated 4.3 will be removed in 7.0 - * You should use nullable values or exceptions instead of returning boolean false results. - */ - protected $resultIsFalseable = false; - /** * Acceptable class names for result values. * @@ -69,10 +58,6 @@ public function typeCheckResult($data): void return; } - if ($this->resultIsFalseable && $data === false) { - return; - } - if (!\is_object($data)) { throw new \InvalidArgumentException(\sprintf('Event %s only accepts object results.', $this->getName())); } diff --git a/libraries/src/Event/Result/ResultTypeStringAware.php b/libraries/src/Event/Result/ResultTypeStringAware.php index b6b202a268ccf..180e5c2024e4e 100644 --- a/libraries/src/Event/Result/ResultTypeStringAware.php +++ b/libraries/src/Event/Result/ResultTypeStringAware.php @@ -31,17 +31,6 @@ trait ResultTypeStringAware */ protected $resultIsNullable = false; - /** - * Can the result attribute values also be boolean FALSE? - * - * @var boolean - * @since 4.2.0 - * - * @deprecated 4.3 will be removed in 7.0 - * You should use nullable values or exceptions instead of returning boolean false results. - */ - protected $resultIsFalseable = false; - /** * Checks the type of the data being appended to the result argument. * @@ -59,10 +48,6 @@ public function typeCheckResult($data): void return; } - if ($this->resultIsFalseable && $data === false) { - return; - } - if (!\is_string($data)) { throw new \InvalidArgumentException(\sprintf('Event %s only accepts String results.', $this->getName())); } diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 4c285e1e903f1..da1b83b3ecb85 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -8494,16 +8494,6 @@ parameters: count: 1 path: libraries/src/Event/Contact/ValidateContactEvent.php - - - message: ''' - #^Access to deprecated property \$resultIsFalseable of class Joomla\\CMS\\Event\\Content\\AfterDisplayEvent\: - 4\.3 will be removed in 7\.0 - You should use nullable values or exceptions instead of returning boolean false results\.$# - ''' - identifier: property.deprecated - count: 1 - path: libraries/src/Event/Content/AfterDisplayEvent.php - - message: ''' #^Call to deprecated method setResult\(\) of class Joomla\\CMS\\Event\\Content\\AfterDisplayEvent\: @@ -8514,16 +8504,6 @@ parameters: count: 1 path: libraries/src/Event/Content/AfterDisplayEvent.php - - - message: ''' - #^Access to deprecated property \$resultIsFalseable of class Joomla\\CMS\\Event\\Content\\AfterTitleEvent\: - 4\.3 will be removed in 7\.0 - You should use nullable values or exceptions instead of returning boolean false results\.$# - ''' - identifier: property.deprecated - count: 1 - path: libraries/src/Event/Content/AfterTitleEvent.php - - message: ''' #^Call to deprecated method setResult\(\) of class Joomla\\CMS\\Event\\Content\\AfterTitleEvent\: @@ -8534,16 +8514,6 @@ parameters: count: 1 path: libraries/src/Event/Content/AfterTitleEvent.php - - - message: ''' - #^Access to deprecated property \$resultIsFalseable of class Joomla\\CMS\\Event\\Content\\BeforeDisplayEvent\: - 4\.3 will be removed in 7\.0 - You should use nullable values or exceptions instead of returning boolean false results\.$# - ''' - identifier: property.deprecated - count: 1 - path: libraries/src/Event/Content/BeforeDisplayEvent.php - - message: ''' #^Call to deprecated method setResult\(\) of class Joomla\\CMS\\Event\\Content\\BeforeDisplayEvent\: @@ -8592,16 +8562,6 @@ parameters: count: 1 path: libraries/src/Event/CustomFields/CustomFieldsEvent.php - - - message: ''' - #^Access to deprecated property \$resultIsFalseable of class Joomla\\CMS\\Event\\CustomFields\\GetTypesEvent\: - 4\.3 will be removed in 7\.0 - You should use nullable values or exceptions instead of returning boolean false results\.$# - ''' - identifier: property.deprecated - count: 1 - path: libraries/src/Event/CustomFields/GetTypesEvent.php - - message: ''' #^Call to deprecated method setResult\(\) of class Joomla\\CMS\\Event\\CustomFields\\GetTypesEvent\: @@ -8679,16 +8639,6 @@ parameters: count: 1 path: libraries/src/Event/Finder/AbstractFinderEvent.php - - - message: ''' - #^Access to deprecated property \$resultIsFalseable of class Joomla\\CMS\\Event\\Installer\\AddInstallationTabEvent\: - 4\.3 will be removed in 7\.0 - You should use nullable values or exceptions instead of returning boolean false results\.$# - ''' - identifier: property.deprecated - count: 1 - path: libraries/src/Event/Installer/AddInstallationTabEvent.php - - message: ''' #^Call to deprecated method setResult\(\) of class Joomla\\CMS\\Event\\Installer\\AddInstallationTabEvent\: @@ -8979,16 +8929,6 @@ parameters: count: 1 path: libraries/src/Event/MultiFactor/Callback.php - - - message: ''' - #^Access to deprecated property \$resultIsFalseable of class Joomla\\CMS\\Event\\MultiFactor\\Captive\: - 4\.3 will be removed in 7\.0 - You should use nullable values or exceptions instead of returning boolean false results\.$# - ''' - identifier: property.deprecated - count: 1 - path: libraries/src/Event/MultiFactor/Captive.php - - message: ''' #^Call to deprecated method setRecord\(\) of class Joomla\\CMS\\Event\\MultiFactor\\Captive\: @@ -9009,16 +8949,6 @@ parameters: count: 1 path: libraries/src/Event/MultiFactor/Captive.php - - - message: ''' - #^Access to deprecated property \$resultIsFalseable of class Joomla\\CMS\\Event\\MultiFactor\\GetMethod\: - 4\.3 will be removed in 7\.0 - You should use nullable values or exceptions instead of returning boolean false results\.$# - ''' - identifier: property.deprecated - count: 1 - path: libraries/src/Event/MultiFactor/GetMethod.php - - message: ''' #^Call to deprecated method setResult\(\) of class Joomla\\CMS\\Event\\MultiFactor\\GetMethod\: @@ -9029,16 +8959,6 @@ parameters: count: 1 path: libraries/src/Event/MultiFactor/GetMethod.php - - - message: ''' - #^Access to deprecated property \$resultIsFalseable of class Joomla\\CMS\\Event\\MultiFactor\\GetSetup\: - 4\.3 will be removed in 7\.0 - You should use nullable values or exceptions instead of returning boolean false results\.$# - ''' - identifier: property.deprecated - count: 1 - path: libraries/src/Event/MultiFactor/GetSetup.php - - message: ''' #^Call to deprecated method setRecord\(\) of class Joomla\\CMS\\Event\\MultiFactor\\GetSetup\: @@ -9059,16 +8979,6 @@ parameters: count: 1 path: libraries/src/Event/MultiFactor/GetSetup.php - - - message: ''' - #^Access to deprecated property \$resultIsFalseable of class Joomla\\CMS\\Event\\MultiFactor\\SaveSetup\: - 4\.3 will be removed in 7\.0 - You should use nullable values or exceptions instead of returning boolean false results\.$# - ''' - identifier: property.deprecated - count: 1 - path: libraries/src/Event/MultiFactor/SaveSetup.php - - message: ''' #^Call to deprecated method setInput\(\) of class Joomla\\CMS\\Event\\MultiFactor\\SaveSetup\: @@ -9139,16 +9049,6 @@ parameters: count: 1 path: libraries/src/Event/MultiFactor/Validate.php - - - message: ''' - #^Access to deprecated property \$resultIsFalseable of class Joomla\\CMS\\Event\\PageCache\\GetKeyEvent\: - 4\.3 will be removed in 7\.0 - You should use nullable values or exceptions instead of returning boolean false results\.$# - ''' - identifier: property.deprecated - count: 1 - path: libraries/src/Event/PageCache/GetKeyEvent.php - - message: ''' #^Call to deprecated method setResult\(\) of class Joomla\\CMS\\Event\\PageCache\\GetKeyEvent\: @@ -9188,16 +9088,6 @@ parameters: count: 2 path: libraries/src/Event/Plugin/System/Stats/GetStatsDataEvent.php - - - message: ''' - #^Access to deprecated property \$resultIsFalseable of class Joomla\\CMS\\Event\\Plugin\\System\\Stats\\GetStatsDataEvent\: - 4\.3 will be removed in 7\.0 - You should use nullable values or exceptions instead of returning boolean false results\.$# - ''' - identifier: property.deprecated - count: 1 - path: libraries/src/Event/Plugin/System/Stats/GetStatsDataEvent.php - - message: ''' #^Call to deprecated method setResult\(\) of class Joomla\\CMS\\Event\\Plugin\\System\\Stats\\GetStatsDataEvent\: @@ -9228,16 +9118,6 @@ parameters: count: 1 path: libraries/src/Event/Plugin/System/Webauthn/AjaxChallenge.php - - - message: ''' - #^Access to deprecated property \$resultIsFalseable of class Joomla\\CMS\\Event\\Plugin\\System\\Webauthn\\AjaxCreate\: - 4\.3 will be removed in 7\.0 - You should use nullable values or exceptions instead of returning boolean false results\.$# - ''' - identifier: property.deprecated - count: 1 - path: libraries/src/Event/Plugin/System/Webauthn/AjaxCreate.php - - message: ''' #^Call to deprecated method setResult\(\) of class Joomla\\CMS\\Event\\Plugin\\System\\Webauthn\\AjaxCreate\: @@ -9258,16 +9138,6 @@ parameters: count: 1 path: libraries/src/Event/Plugin/System/Webauthn/AjaxDelete.php - - - message: ''' - #^Access to deprecated property \$resultIsFalseable of class Joomla\\CMS\\Event\\Plugin\\System\\Webauthn\\AjaxInitCreate\: - 4\.3 will be removed in 7\.0 - You should use nullable values or exceptions instead of returning boolean false results\.$# - ''' - identifier: property.deprecated - count: 1 - path: libraries/src/Event/Plugin/System/Webauthn/AjaxInitCreate.php - - message: ''' #^Call to deprecated method setResult\(\) of class Joomla\\CMS\\Event\\Plugin\\System\\Webauthn\\AjaxInitCreate\: @@ -9298,16 +9168,6 @@ parameters: count: 1 path: libraries/src/Event/Privacy/CanRemoveDataEvent.php - - - message: ''' - #^Access to deprecated property \$resultIsFalseable of class Joomla\\CMS\\Event\\Privacy\\CollectCapabilitiesEvent\: - 4\.3 will be removed in 7\.0 - You should use nullable values or exceptions instead of returning boolean false results\.$# - ''' - identifier: property.deprecated - count: 1 - path: libraries/src/Event/Privacy/CollectCapabilitiesEvent.php - - message: ''' #^Call to deprecated method setResult\(\) of class Joomla\\CMS\\Event\\Privacy\\CollectCapabilitiesEvent\: @@ -9347,16 +9207,6 @@ parameters: count: 1 path: libraries/src/Event/Privacy/PrivacyEvent.php - - - message: ''' - #^Access to deprecated property \$resultIsFalseable of class Joomla\\CMS\\Event\\QuickIcon\\GetIconEvent\: - 4\.3 will be removed in 7\.0 - You should use nullable values or exceptions instead of returning boolean false results\.$# - ''' - identifier: property.deprecated - count: 1 - path: libraries/src/Event/QuickIcon/GetIconEvent.php - - message: ''' #^Call to deprecated method setContext\(\) of class Joomla\\CMS\\Event\\QuickIcon\\GetIconEvent\: @@ -9387,16 +9237,6 @@ parameters: count: 1 path: libraries/src/Event/QuickIcon/GetIconEvent.php - - - message: ''' - #^Access to deprecated property \$resultIsFalseable of class Joomla\\CMS\\Event\\SampleData\\GetOverviewEvent\: - 4\.3 will be removed in 7\.0 - You should use nullable values or exceptions instead of returning boolean false results\.$# - ''' - identifier: property.deprecated - count: 1 - path: libraries/src/Event/SampleData/GetOverviewEvent.php - - message: ''' #^Call to deprecated method setResult\(\) of class Joomla\\CMS\\Event\\SampleData\\GetOverviewEvent\: @@ -9647,16 +9487,6 @@ parameters: count: 1 path: libraries/src/Event/User/BeforeSaveEvent.php - - - message: ''' - #^Access to deprecated property \$resultIsFalseable of class Joomla\\CMS\\Event\\User\\LoginButtonsEvent\: - 4\.3 will be removed in 7\.0 - You should use nullable values or exceptions instead of returning boolean false results\.$# - ''' - identifier: property.deprecated - count: 1 - path: libraries/src/Event/User/LoginButtonsEvent.php - - message: ''' #^Call to deprecated method setResult\(\) of class Joomla\\CMS\\Event\\User\\LoginButtonsEvent\: