e0bddeeef0
This PR was merged into the 5.1-dev branch.
Discussion
----------
[Form] Added a "choice_filter" option to ChoiceType
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| Deprecations? | yes
| Tickets | Fix #32657
| License | MIT
| Doc PR | symfony/symfony-docs#13223
Finally opening this PR for a very old branch, based on both #34550 (merged) and #30994 (merged).
~Until #30994 is merged, this PR should better be reviewed by commits. Thanks!~
Commits
-------
ed2c312609
[Form] Added a "choice_filter" option to ChoiceType
2.9 KiB
2.9 KiB
UPGRADE FROM 5.0 to 5.1
Console
Command::setHidden()
is final since Symfony 5.1
Dotenv
- Deprecated passing
$usePutenv
argument to Dotenv's constructor, useDotenv::usePutenv()
instead.
EventDispatcher
- Deprecated
LegacyEventDispatcherProxy
. Use the event dispatcher without the proxy.
Form
- Implementing the
FormConfigInterface
without implementing thegetIsEmptyCallback()
method is deprecated. The method will be added to the interface in 6.0. - Implementing the
FormConfigBuilderInterface
without implementing thesetIsEmptyCallback()
method is deprecated. The method will be added to the interface in 6.0. - Added argument
callable|null $filter
toChoiceListFactoryInterface::createListFromChoices()
andcreateListFromLoader()
- not defining them is deprecated.
FrameworkBundle
- Deprecated passing a
RouteCollectionBuiler
toMicroKernelTrait::configureRoutes()
, type-hintRoutingConfigurator
instead - Deprecated not setting the "framework.router.utf8" configuration option as it will default to
true
in Symfony 6.0
HttpFoundation
- Deprecate
Response::create()
,JsonResponse::create()
,RedirectResponse::create()
, andStreamedResponse::create()
methods (use__construct()
instead) - Made the Mime component an optional dependency
Messenger
- Deprecated AmqpExt transport. It has moved to a separate package. Run
composer require symfony/amqp-messenger
to use the new classes. - Deprecated Doctrine transport. It has moved to a separate package. Run
composer require symfony/doctrine-messenger
to use the new classes. - Deprecated RedisExt transport. It has moved to a separate package. Run
composer require symfony/redis-messenger
to use the new classes. - Deprecated use of invalid options in Redis and AMQP connections.
Notifier
- [BC BREAK] The
ChatMessage::fromNotification()
method's$recipient
and$transport
arguments were removed. - [BC BREAK] The
EmailMessage::fromNotification()
andSmsMessage::fromNotification()
methods'$transport
argument was removed.
PhpUnitBridge
- Deprecated the
@expectedDeprecation
annotation, use theExpectDeprecationTrait::expectDeprecation()
method instead.
Routing
- Deprecated
RouteCollectionBuilder
in favor ofRoutingConfigurator
. - Added argument
$priority
toRouteCollection::add()
- Deprecated the
RouteCompiler::REGEX_DELIMITER
constant
Security
-
Deprecated
ROLE_PREVIOUS_ADMIN
role in favor ofIS_IMPERSONATOR
attribute.before
{% if is_granted('ROLE_PREVIOUS_ADMIN') %} <a href="">Exit impersonation</a> {% endif %}
after
{% if is_granted('IS_IMPERSONATOR') %} <a href="">Exit impersonation</a> {% endif %}
Yaml
- Deprecated using the
!php/object
and!php/const
tags without a value.