From d6600c3c8c1286eadb9125eb946e10b7230be26c Mon Sep 17 00:00:00 2001 From: Grzegorz Sadowski Date: Tue, 22 Oct 2024 12:52:51 +0200 Subject: [PATCH 1/3] Deprecate VariantWithNoOptionsValuesException --- UPGRADE.md | 7 +++++++ .../src/Exception/VariantWithNoOptionsValuesException.php | 8 ++++++++ .../src/Exception/VariantWithNoOptionsValuesException.php | 8 ++++++++ 3 files changed, 23 insertions(+) diff --git a/UPGRADE.md b/UPGRADE.md index 8c06a3fc8..55179511c 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,3 +1,10 @@ +## UPGRADE FOR `1.13.x` + +### FROM `1.12.x` to `1.12.x` + +The `Sylius\Resource\Exception\VariantWithNoOptionsValuesException` and `Sylius\Component\Resource\Exception\VariantWithNoOptionsValuesException` +classes have been deprecated and will be removed in `2.0`. + ## UPGRADE FOR `1.12.x` ### FROM `1.11.x` to `1.12.x` diff --git a/src/Component/legacy/src/Exception/VariantWithNoOptionsValuesException.php b/src/Component/legacy/src/Exception/VariantWithNoOptionsValuesException.php index 0739f93c6..10ecb1a2f 100644 --- a/src/Component/legacy/src/Exception/VariantWithNoOptionsValuesException.php +++ b/src/Component/legacy/src/Exception/VariantWithNoOptionsValuesException.php @@ -16,6 +16,14 @@ class_exists(\Sylius\Resource\Exception\VariantWithNoOptionsValuesException::class); if (false) { + trigger_deprecation( + 'sylius/resource-bundle', + '1.13', + 'The "%s" class is deprecated and will be removed in 2.0.', + VariantWithNoOptionsValuesException::class, + ); + + /** @deprecated since SyliusResourceBundle 1.13 and will be removed in 2.0. */ final class VariantWithNoOptionsValuesException extends \Sylius\Resource\Exception\VariantWithNoOptionsValuesException { } diff --git a/src/Component/src/Exception/VariantWithNoOptionsValuesException.php b/src/Component/src/Exception/VariantWithNoOptionsValuesException.php index 6b8f32acc..e87d9ef34 100644 --- a/src/Component/src/Exception/VariantWithNoOptionsValuesException.php +++ b/src/Component/src/Exception/VariantWithNoOptionsValuesException.php @@ -13,6 +13,14 @@ namespace Sylius\Resource\Exception; +trigger_deprecation( + 'sylius/resource-bundle', + '1.13', + 'The "%s" class is deprecated and will be removed in 2.0.', + VariantWithNoOptionsValuesException::class, +); + +/** @deprecated since SyliusResourceBundle 1.13 and will be removed in 2.0. */ final class VariantWithNoOptionsValuesException extends Exception { public function __construct() From d5a69b247aee83c8b7f3a0511b57279b00ace906 Mon Sep 17 00:00:00 2001 From: Grzegorz Sadowski Date: Tue, 22 Oct 2024 13:11:50 +0200 Subject: [PATCH 2/3] Ignore deprecation of VariantWithNoOptionsValuesException in Psalm --- psalm.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/psalm.xml b/psalm.xml index 38d131068..66acac3f6 100644 --- a/psalm.xml +++ b/psalm.xml @@ -46,6 +46,8 @@ + + @@ -67,7 +69,7 @@ - + From 6582fa51fc72e2202ea063c036248341bebc3e5e Mon Sep 17 00:00:00 2001 From: Grzegorz Sadowski Date: Wed, 23 Oct 2024 06:34:46 +0200 Subject: [PATCH 3/3] Update UPGRADE.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jan Góralski --- UPGRADE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADE.md b/UPGRADE.md index 55179511c..0415248cd 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,6 +1,6 @@ ## UPGRADE FOR `1.13.x` -### FROM `1.12.x` to `1.12.x` +### FROM `1.12.x` to `1.13.x` The `Sylius\Resource\Exception\VariantWithNoOptionsValuesException` and `Sylius\Component\Resource\Exception\VariantWithNoOptionsValuesException` classes have been deprecated and will be removed in `2.0`.