Skip to content

Commit

Permalink
Merge pull request #957 from GSadee/SYL-3888-deprecate-variant-exception
Browse files Browse the repository at this point in the history
Deprecate VariantWithNoOptionsValuesException
  • Loading branch information
mpysiak authored Oct 23, 2024
2 parents 44d53e9 + 6582fa5 commit d4457c6
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
7 changes: 7 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## UPGRADE FOR `1.13.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`.

## UPGRADE FOR `1.12.x`

### FROM `1.11.x` to `1.12.x`
Expand Down
4 changes: 3 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
<DeprecatedClass>
<errorLevel type="info">
<referencedClass name="Doctrine\ORM\Event\LifecycleEventArgs" /> <!-- deprecated in doctrine/orm 2.14 -->
<referencedClass name="Sylius\Component\Resource\Exception\VariantWithNoOptionsValuesException" />
<referencedClass name="Sylius\Resource\Exception\VariantWithNoOptionsValuesException" />
</errorLevel>
</DeprecatedClass>

Expand All @@ -67,7 +69,7 @@
<file name="src/Bundle/Controller/Parameters.php" />
</errorLevel>
</DuplicateClass>

<InternalClass>
<errorLevel type="suppress">
<file name="src/Bundle/DependencyInjection/PagerfantaExtension.php" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit d4457c6

Please sign in to comment.