Skip to content

Commit

Permalink
minor #29398 [FrameworkBundle][Controller] Use interface from Contrac…
Browse files Browse the repository at this point in the history
…ts to remove deprecation arnings (tomtomau)

This PR was merged into the 4.2 branch.

Discussion
----------

[FrameworkBundle][Controller] Use interface from Contracts to remove deprecation arnings

| Q             | A
| ------------- | ---
| Branch?       | 4.2?
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | I don't think so     <!-- see https://symfony.com/bc -->
| Deprecations? | no - removing some :) <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a

When we installed 4.2, we hit issues in our qa tools with [vimeo/psalm](https://github.com/vimeo/psalm) reporting that all of our controllers were implementing a deprecated interface (by extending the AbstractController).

This pr simply updates the AbstractController to use the interface provided in `symfony/contracts`

I'm not sure if there was any other reason for not including this in the 4.2 release (bc?), so apologies if I've overstepped this.

Commits
-------

f10227df3d [FrameworkBundle][Controller] Use interface from Contracts to remove deprecation warnings
  • Loading branch information
fabpot committed Dec 8, 2018
2 parents eb32d67 + 7d68535 commit 5661c41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Controller/AbstractController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Psr\Container\ContainerInterface;
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
use Symfony\Component\DependencyInjection\ParameterBag\ContainerBagInterface;
use Symfony\Component\DependencyInjection\ServiceSubscriberInterface;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
Expand All @@ -27,6 +26,7 @@
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
use Symfony\Component\Serializer\SerializerInterface;
use Symfony\Component\Templating\EngineInterface;
use Symfony\Contracts\Service\ServiceSubscriberInterface;
use Twig\Environment;

/**
Expand Down

0 comments on commit 5661c41

Please sign in to comment.