[Form] Fix depreciation triggers
This commit is contained in:
parent
80056f7c8d
commit
deb12ae1b5
@ -69,7 +69,7 @@ class DoctrineChoiceLoader implements ChoiceLoaderInterface
|
||||
{
|
||||
// BC to be removed and replace with type hints in 4.0
|
||||
if ($manager instanceof ChoiceListFactoryInterface) {
|
||||
@trigger_error(sprintf('Passing a ChoiceListFactoryInterface to %s is deprecated since version 3.1 and will no longer be supported in 4.0. You should either call "%s::loadChoiceList" or override it to return a ChoiceListInterface.', __CLASS__, __CLASS__));
|
||||
@trigger_error(sprintf('Passing a ChoiceListFactoryInterface to %s is deprecated since version 3.1 and will no longer be supported in 4.0. You should either call "%s::loadChoiceList" or override it to return a ChoiceListInterface.', __CLASS__, __CLASS__), E_USER_DEPRECATED);
|
||||
|
||||
// Provide a BC layer since $factory has changed
|
||||
// form first to last argument as of 3.1
|
||||
|
@ -83,7 +83,7 @@ class LazyChoiceList implements ChoiceListInterface
|
||||
// We can safely invoke the {@link ChoiceLoaderInterface} assuming it has the list
|
||||
// in cache when the lazy list is already loaded
|
||||
if ($this->loadedList !== $this->loader->loadChoiceList($this->value)) {
|
||||
@trigger_error(sprintf('Caching the choice list in %s is deprecated since 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class));
|
||||
@trigger_error(sprintf('Caching the choice list in %s is deprecated since 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class), E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
return $this->loadedList->getChoices();
|
||||
@ -106,7 +106,7 @@ class LazyChoiceList implements ChoiceListInterface
|
||||
if ($this->loaded) {
|
||||
// Check whether the loader has the same cache
|
||||
if ($this->loadedList !== $this->loader->loadChoiceList($this->value)) {
|
||||
@trigger_error(sprintf('Caching the choice list in %s is deprecated since 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class));
|
||||
@trigger_error(sprintf('Caching the choice list in %s is deprecated since 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class), E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
return $this->loadedList->getValues();
|
||||
@ -129,7 +129,7 @@ class LazyChoiceList implements ChoiceListInterface
|
||||
if ($this->loaded) {
|
||||
// Check whether the loader has the same cache
|
||||
if ($this->loadedList !== $this->loader->loadChoiceList($this->value)) {
|
||||
@trigger_error(sprintf('Caching the choice list in %s is deprecated since 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class));
|
||||
@trigger_error(sprintf('Caching the choice list in %s is deprecated since 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class), E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
return $this->loadedList->getStructuredValues();
|
||||
@ -152,7 +152,7 @@ class LazyChoiceList implements ChoiceListInterface
|
||||
if ($this->loaded) {
|
||||
// Check whether the loader has the same cache
|
||||
if ($this->loadedList !== $this->loader->loadChoiceList($this->value)) {
|
||||
@trigger_error(sprintf('Caching the choice list in %s is deprecated since 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class));
|
||||
@trigger_error(sprintf('Caching the choice list in %s is deprecated since 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class), E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
return $this->loadedList->getOriginalKeys();
|
||||
@ -175,7 +175,7 @@ class LazyChoiceList implements ChoiceListInterface
|
||||
if ($this->loaded) {
|
||||
// Check whether the loader has the same cache
|
||||
if ($this->loadedList !== $this->loader->loadChoiceList($this->value)) {
|
||||
@trigger_error(sprintf('Caching the choice list in %s is deprecated since 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class));
|
||||
@trigger_error(sprintf('Caching the choice list in %s is deprecated since 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class), E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
return $this->loadedList->getChoicesForValues($values);
|
||||
@ -192,7 +192,7 @@ class LazyChoiceList implements ChoiceListInterface
|
||||
if ($this->loaded) {
|
||||
// Check whether the loader has the same cache
|
||||
if ($this->loadedList !== $this->loader->loadChoiceList($this->value)) {
|
||||
@trigger_error(sprintf('Caching the choice list in %s is deprecated since 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class));
|
||||
@trigger_error(sprintf('Caching the choice list in %s is deprecated since 3.1 and will not happen in 4.0. Cache the list in the %s instead.', __CLASS__, ChoiceLoaderInterface::class), E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
return $this->loadedList->getValuesForChoices($choices);
|
||||
|
Reference in New Issue
Block a user