Skip to content

Commit d4457c6

Browse files
authored
Merge pull request #957 from GSadee/SYL-3888-deprecate-variant-exception
Deprecate VariantWithNoOptionsValuesException
2 parents 44d53e9 + 6582fa5 commit d4457c6

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

UPGRADE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## UPGRADE FOR `1.13.x`
2+
3+
### FROM `1.12.x` to `1.13.x`
4+
5+
The `Sylius\Resource\Exception\VariantWithNoOptionsValuesException` and `Sylius\Component\Resource\Exception\VariantWithNoOptionsValuesException`
6+
classes have been deprecated and will be removed in `2.0`.
7+
18
## UPGRADE FOR `1.12.x`
29

310
### FROM `1.11.x` to `1.12.x`

psalm.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
<DeprecatedClass>
4747
<errorLevel type="info">
4848
<referencedClass name="Doctrine\ORM\Event\LifecycleEventArgs" /> <!-- deprecated in doctrine/orm 2.14 -->
49+
<referencedClass name="Sylius\Component\Resource\Exception\VariantWithNoOptionsValuesException" />
50+
<referencedClass name="Sylius\Resource\Exception\VariantWithNoOptionsValuesException" />
4951
</errorLevel>
5052
</DeprecatedClass>
5153

@@ -67,7 +69,7 @@
6769
<file name="src/Bundle/Controller/Parameters.php" />
6870
</errorLevel>
6971
</DuplicateClass>
70-
72+
7173
<InternalClass>
7274
<errorLevel type="suppress">
7375
<file name="src/Bundle/DependencyInjection/PagerfantaExtension.php" />

src/Component/legacy/src/Exception/VariantWithNoOptionsValuesException.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
class_exists(\Sylius\Resource\Exception\VariantWithNoOptionsValuesException::class);
1717

1818
if (false) {
19+
trigger_deprecation(
20+
'sylius/resource-bundle',
21+
'1.13',
22+
'The "%s" class is deprecated and will be removed in 2.0.',
23+
VariantWithNoOptionsValuesException::class,
24+
);
25+
26+
/** @deprecated since SyliusResourceBundle 1.13 and will be removed in 2.0. */
1927
final class VariantWithNoOptionsValuesException extends \Sylius\Resource\Exception\VariantWithNoOptionsValuesException
2028
{
2129
}

src/Component/src/Exception/VariantWithNoOptionsValuesException.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@
1313

1414
namespace Sylius\Resource\Exception;
1515

16+
trigger_deprecation(
17+
'sylius/resource-bundle',
18+
'1.13',
19+
'The "%s" class is deprecated and will be removed in 2.0.',
20+
VariantWithNoOptionsValuesException::class,
21+
);
22+
23+
/** @deprecated since SyliusResourceBundle 1.13 and will be removed in 2.0. */
1624
final class VariantWithNoOptionsValuesException extends Exception
1725
{
1826
public function __construct()

0 commit comments

Comments
 (0)