Skip to content

Commit

Permalink
refactor #15235 [Maintenance] Note deprecation in SelectAttributeChoi…
Browse files Browse the repository at this point in the history
…cesCollectionType (NoResponseMate)

This PR was merged into the 1.13 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.13 |
| Bug fix?        | no                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | yes |
| Related tickets | continues #15218                      |
| License         | MIT                                                          |

Commits
-------

9b930d7 [Maintenance] Note deprecation in SelectAttributeChoicesCollectionType
  • Loading branch information
GSadee committed Aug 18, 2023
2 parents 61ffae5 + 9b930d7 commit ce926b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions UPGRADE-1.13.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,6 @@
Because of that, the subscribers `Sylius\Bundle\AttributeBundle\Doctrine\ORM\Subscriber\LoadMetadataSubscriber`
and `Sylius\Bundle\ReviewBundle\Doctrine\ORM\Subscriber\LoadMetadataSubscriber` have changed so that it does not add
a relationship if one already exists. If you have overwritten or decorated it, there may be a need to update it.

1. Passing an instance of `Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface` as the first argument
to `Sylius\Bundle\AttributeBundle\Form\Type\AttributeType\Configuration\SelectAttributeChoicesCollectionType` has been deprecated.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ class SelectAttributeChoicesCollectionType extends AbstractType
public function __construct(?TranslationLocaleProviderInterface $localeProvider = null)
{
if (null !== $localeProvider) {
@trigger_error(sprintf(
'Passing an instance of %s as a constructor argument for %s is deprecated as of Sylius 1.13 and will not be possible in 2.0.',
TranslationLocaleProviderInterface::class,
self::class
), \E_USER_DEPRECATED);

$this->defaultLocaleCode = $localeProvider->getDefaultLocaleCode();
}
}
Expand Down

0 comments on commit ce926b9

Please sign in to comment.