Skip to content

Latest commit

 

History

History
98 lines (70 loc) · 3.07 KB

UPGRADE-4.1.md

File metadata and controls

98 lines (70 loc) · 3.07 KB

UPGRADE FROM 4.0 to 4.1

Config

  • Implementing ParentNodeDefinitionInterface without the getChildNodeDefinitions() method is deprecated.

EventDispatcher

  • The TraceableEventDispatcherInterface has been deprecated.

FrameworkBundle

  • Deprecated bundle:controller:action and service:action syntaxes to reference controllers. Use serviceOrFqcn::method instead where serviceOrFqcn 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
* Deprecated `Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser`
* A `RouterInterface` that does not implement the `WarmableInterface` is deprecated.
* The `RequestDataCollector` class has been deprecated. Use the `Symfony\Component\HttpKernel\DataCollector\RequestDataCollector` class instead.

HttpFoundation
--------------

* Passing the file size to the constructor of the `UploadedFile` class is deprecated.

* The `getClientSize()` method of the `UploadedFile` class is deprecated. Use `getSize()` instead.

Security
--------

* The `ContextListener::setLogoutOnUserChange()` method is deprecated.
* Using the `AdvancedUserInterface` is now deprecated. To use the existing
 functionality, create a custom user-checker based on the
 `Symfony\Component\Security\Core\User\UserChecker`.

SecurityBundle
--------------

* The `logout_on_user_change` firewall option is deprecated.
* The `SecurityUserValueResolver` class is deprecated, use
 `Symfony\Component\Security\Http\Controller\UserValueResolver` instead.

Translation
-----------

* The `FileDumper::setBackup()` method is deprecated.
* The `TranslationWriter::disableBackup()` method is deprecated.

TwigBundle
----------

* Deprecated relying on the default value (`false`) of the `twig.strict_variables` configuration option. You should use `%kernel.debug%` explicitly instead, which will be the new default in 5.0.

Validator
--------

* The `Email::__construct()` 'strict' property is deprecated. Use 'mode'=>"strict" instead.
* Calling `EmailValidator::__construct()` method with a boolean parameter is deprecated, use `EmailValidator("strict")` instead.
* Deprecated the `checkDNS` and `dnsMessage` options of the `Url` constraint.

Workflow
--------

* Deprecated the `add` method in favor of the `addWorkflow` method in `Workflow\Registry`.
* Deprecated `SupportStrategyInterface` in favor of `WorkflowSupportStrategyInterface`.
* Deprecated the class `ClassInstanceSupportStrategy` in favor of the class `InstanceOfSupportStrategy`.