Skip to content

[Form] Remove deprecation layer for duplicated preferred choices #52060

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions UPGRADE-7.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ Form
* Require explicit argument when calling `Button/Form::setParent()`, `ButtonBuilder/FormConfigBuilder::setDataMapper()`, `TransformationFailedException::setInvalidMessage()`
* `PostSetDataEvent::setData()` throws an exception, use `PreSetDataEvent::setData()` instead
* `PostSubmitEvent::setData()` throws an exception, use `PreSubmitDataEvent::setData()` or `SubmitDataEvent::setData()` instead
* Add `$duplicatePreferredChoices` parameter to `ChoiceListFactoryInterface::createView()`

FrameworkBundle
---------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,8 @@ public function createListFromLoader(ChoiceLoaderInterface $loader, mixed $value
return $this->lists[$hash];
}

/**
* @param bool $duplicatePreferredChoices
*/
public function createView(ChoiceListInterface $list, mixed $preferredChoices = null, mixed $label = null, mixed $index = null, mixed $groupBy = null, mixed $attr = null, mixed $labelTranslationParameters = []/* , bool $duplicatePreferredChoices = true */): ChoiceListView
public function createView(ChoiceListInterface $list, mixed $preferredChoices = null, mixed $label = null, mixed $index = null, mixed $groupBy = null, mixed $attr = null, mixed $labelTranslationParameters = [], bool $duplicatePreferredChoices = true): ChoiceListView
{
$duplicatePreferredChoices = \func_num_args() > 7 ? func_get_arg(7) : true;
$cache = true;

if ($preferredChoices instanceof Cache\PreferredChoice) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@ public function createListFromLoader(ChoiceLoaderInterface $loader, callable $va
* on top of the list and in their original position
* or only in the top of the list
*/
public function createView(ChoiceListInterface $list, array|callable $preferredChoices = null, callable|false $label = null, callable $index = null, callable $groupBy = null, array|callable $attr = null, array|callable $labelTranslationParameters = []/* , bool $duplicatePreferredChoices = true */): ChoiceListView;
public function createView(ChoiceListInterface $list, array|callable $preferredChoices = null, callable|false $label = null, callable $index = null, callable $groupBy = null, array|callable $attr = null, array|callable $labelTranslationParameters = [], bool $duplicatePreferredChoices = true): ChoiceListView;
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,8 @@ public function createListFromLoader(ChoiceLoaderInterface $loader, callable $va
return new LazyChoiceList($loader, $value);
}

/**
* @param bool $duplicatePreferredChoices
*/
public function createView(ChoiceListInterface $list, array|callable $preferredChoices = null, callable|false $label = null, callable $index = null, callable $groupBy = null, array|callable $attr = null, array|callable $labelTranslationParameters = []/* , bool $duplicatePreferredChoices = true */): ChoiceListView
public function createView(ChoiceListInterface $list, array|callable $preferredChoices = null, callable|false $label = null, callable $index = null, callable $groupBy = null, array|callable $attr = null, array|callable $labelTranslationParameters = [], bool $duplicatePreferredChoices = true): ChoiceListView
{
$duplicatePreferredChoices = \func_num_args() > 7 ? func_get_arg(7) : true;
$preferredViews = [];
$preferredViewsOrder = [];
$otherViews = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,8 @@ public function createListFromLoader(ChoiceLoaderInterface $loader, mixed $value
return $this->decoratedFactory->createListFromLoader($loader, $value, $filter);
}

/**
* @param bool $duplicatePreferredChoices
*/
public function createView(ChoiceListInterface $list, mixed $preferredChoices = null, mixed $label = null, mixed $index = null, mixed $groupBy = null, mixed $attr = null, mixed $labelTranslationParameters = []/* , bool $duplicatePreferredChoices = true */): ChoiceListView
public function createView(ChoiceListInterface $list, mixed $preferredChoices = null, mixed $label = null, mixed $index = null, mixed $groupBy = null, mixed $attr = null, mixed $labelTranslationParameters = [], bool $duplicatePreferredChoices = true): ChoiceListView
{
$duplicatePreferredChoices = \func_num_args() > 7 ? func_get_arg(7) : true;
$accessor = $this->propertyAccessor;

if (\is_string($label)) {
Expand Down