Skip to content

Fix return type deprecations #19199

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
merged 1 commit into from
Nov 29, 2023
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
2 changes: 1 addition & 1 deletion reference/forms/types/options/choice_filter.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ define a callable that takes each choice as the only argument and must return

class AddressType extends AbstractType
{
public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefaults([
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/options/choice_loader.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ better performance::
return ChoiceType::class;
}

public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
// the example below will create a CallbackChoiceLoader from the callable
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/options/error_mapping.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ of the form.
With customized error mapping, you can do better: map the error to the city
field so that it displays above it::

public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'error_mapping' => [
Expand Down
6 changes: 3 additions & 3 deletions reference/forms/types/options/validation_groups.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ For ``null`` the validator will just use the ``Default`` group.
If you specify the groups as an array or string they will be used by the
validator as they are::

public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'validation_groups' => 'Registration',
Expand All @@ -31,7 +31,7 @@ the option. Symfony will then pass the form when calling it::
use Symfony\Component\OptionsResolver\OptionsResolver;

// ...
public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'validation_groups' => function (FormInterface $form): array {
Expand Down Expand Up @@ -69,7 +69,7 @@ Here's an example::
class MyType extends AbstractType
{
// ...
public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'validation_groups' => new GroupSequence(['First', 'Second']),
Expand Down