mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
[Maintenance] Note deprecation in SelectAttributeChoicesCollectionType
This commit is contained in:
parent
61ffae5f9f
commit
9b930d73c3
2 changed files with 9 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue