This PR was merged into the 4.1-dev branch.
Discussion
----------
[HttpFoundation] deprecate call to Request::getSession() when Request::hasSession() returns false
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #26539
| License | MIT
Commits
-------
4110d57da1
[HttpFoundation] deprecate call to Request::getSession() when Request::hasSession() returns false
3.1 KiB
3.1 KiB
UPGRADE FROM 4.x to 5.0
Config
- Added the
getChildNodeDefinitions()
method toParentNodeDefinitionInterface
.
Console
- Removed the
setCrossingChar()
method in favor of thesetDefaultCrossingChar()
method inTableStyle
.
EventDispatcher
- The
TraceableEventDispatcherInterface
has been removed.
FrameworkBundle
-
Removed support for
bundle:controller:action
andservice:action
syntaxes to reference controllers. UseserviceOrFqcn::method
instead whereserviceOrFqcn
is either the service ID when using controllers as services or the FQCN of the controller.Before:
bundle_controller: path: / defaults: _controller: FrameworkBundle:Redirect:redirect service_controller: path: / defaults: _controller: app.my_controller:myAction
After:
bundle_controller: path: / defaults: _controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction service_controller: path: / defaults: _controller: app.my_controller::myAction
-
Removed
Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser
. -
Warming up a router in
RouterCacheWarmer
that does not implement theWarmableInterface
is not supported anymore. -
The
RequestDataCollector
class has been removed. Use theSymfony\Component\HttpKernel\DataCollector\RequestDataCollector
class instead.
HttpFoundation
- The
$size
argument of theUploadedFile
constructor has been removed. - The
getClientSize()
method of theUploadedFile
class has been removed. - The
getSession()
method of theRequest
class throws an exception when session is null.
Security
- The
ContextListener::setLogoutOnUserChange()
method has been removed. - The
Symfony\Component\Security\Core\User\AdvancedUserInterface
has been removed.
SecurityBundle
- The
logout_on_user_change
firewall option has been removed. - The
switch_user.stateless
firewall option has been removed. - The
SecurityUserValueResolver
class has been removed.
Translation
- The
FileDumper::setBackup()
method has been removed. - The
TranslationWriter::disableBackup()
method has been removed.
TwigBundle
- The default value (
false
) of thetwig.strict_variables
configuration option has been changed to%kernel.debug%
.
Validator
- The
Email::__construct()
'strict' property has been removed. Use 'mode'=>"strict" instead. - Calling
EmailValidator::__construct()
method with a boolean parameter has been removed, useEmailValidator("strict")
instead. - Removed the
checkDNS
anddnsMessage
options from theUrl
constraint.
Workflow
add
method has been removed useaddWorkflow
method inWorkflow\Registry
instead.SupportStrategyInterface
has been removed, useWorkflowSupportStrategyInterface
instead.ClassInstanceSupportStrategy
has been removed, useInstanceOfSupportStrategy
instead.