Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 52c50e3

Browse filesBrowse files
blanchonvincentTobion
authored andcommitted
Remove abstract class and use Interface+Trait
Conflicts: src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LocalizedController.php src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LoginController.php src/Symfony/Component/DependencyInjection/ContainerAware.php
1 parent d67feb4 commit 52c50e3
Copy full SHA for 52c50e3

File tree

11 files changed

+55
-22
lines changed
Filter options

11 files changed

+55
-22
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Controller;
1313

14+
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
15+
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
1416
use Symfony\Component\HttpFoundation\Request;
1517
use Symfony\Component\HttpFoundation\Response;
1618
use Symfony\Component\HttpFoundation\RedirectResponse;
1719
use Symfony\Component\HttpFoundation\StreamedResponse;
18-
use Symfony\Component\DependencyInjection\ContainerAware;
1920
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
2021
use Symfony\Component\HttpKernel\HttpKernelInterface;
2122
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
@@ -35,8 +36,10 @@
3536
*
3637
* @author Fabien Potencier <fabien@symfony.com>
3738
*/
38-
abstract class Controller extends ContainerAware
39+
abstract class Controller implements ContainerAwareInterface
3940
{
41+
use ContainerAwareTrait;
42+
4043
/**
4144
* Generates a URL from the given parameters.
4245
*

‎src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Controller;
1313

14-
use Symfony\Component\DependencyInjection\ContainerAware;
14+
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
15+
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
1516
use Symfony\Component\HttpFoundation\RedirectResponse;
1617
use Symfony\Component\HttpFoundation\Request;
1718
use Symfony\Component\HttpFoundation\Response;
@@ -23,8 +24,10 @@
2324
*
2425
* @author Fabien Potencier <fabien@symfony.com>
2526
*/
26-
class RedirectController extends ContainerAware
27+
class RedirectController implements ContainerAwareInterface
2728
{
29+
use ContainerAwareTrait;
30+
2831
/**
2932
* Redirects to another route with the given name.
3033
*

‎src/Symfony/Bundle/FrameworkBundle/Controller/TemplateController.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Controller/TemplateController.php
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,19 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Controller;
1313

14-
use Symfony\Component\DependencyInjection\ContainerAware;
14+
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
15+
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
1516
use Symfony\Component\HttpFoundation\Response;
1617

1718
/**
1819
* TemplateController.
1920
*
2021
* @author Fabien Potencier <fabien@symfony.com>
2122
*/
22-
class TemplateController extends ContainerAware
23+
class TemplateController implements ContainerAwareInterface
2324
{
25+
use ContainerAwareTrait;
26+
2427
/**
2528
* Renders a template.
2629
*

‎src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/FragmentController.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/FragmentController.php
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Controller;
1313

14+
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
15+
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
1416
use Symfony\Component\HttpFoundation\Request;
1517
use Symfony\Component\HttpFoundation\Response;
16-
use Symfony\Component\DependencyInjection\ContainerAware;
1718

18-
class FragmentController extends ContainerAware
19+
class FragmentController implements ContainerAwareInterface
1920
{
21+
use ContainerAwareTrait;
22+
2023
public function indexAction(Request $request)
2124
{
2225
return $this->container->get('templating')->renderResponse('fragment.html.php', array('bar' => new Bar()));

‎src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/ProfilerController.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/ProfilerController.php
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Controller;
1313

14+
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
15+
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
1416
use Symfony\Component\HttpFoundation\Response;
15-
use Symfony\Component\DependencyInjection\ContainerAware;
1617

17-
class ProfilerController extends ContainerAware
18+
class ProfilerController implements ContainerAwareInterface
1819
{
20+
use ContainerAwareTrait;
21+
1922
public function indexAction()
2023
{
2124
return new Response('Hello');

‎src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SessionController.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SessionController.php
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Controller;
1313

14+
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
15+
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
1416
use Symfony\Component\HttpFoundation\Request;
1517
use Symfony\Component\HttpFoundation\Response;
1618
use Symfony\Component\HttpFoundation\RedirectResponse;
17-
use Symfony\Component\DependencyInjection\ContainerAware;
1819

19-
class SessionController extends ContainerAware
20+
class SessionController implements ContainerAwareInterface
2021
{
22+
use ContainerAwareTrait;
23+
2124
public function welcomeAction(Request $request, $name = null)
2225
{
2326
$session = $request->getSession();

‎src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SubRequestController.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SubRequestController.php
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Controller;
1313

14+
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
15+
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
1416
use Symfony\Component\HttpFoundation\Request;
1517
use Symfony\Component\HttpFoundation\Response;
16-
use Symfony\Component\DependencyInjection\ContainerAware;
1718
use Symfony\Component\HttpKernel\Controller\ControllerReference;
1819

19-
class SubRequestController extends ContainerAware
20+
class SubRequestController implements ContainerAwareInterface
2021
{
22+
use ContainerAwareTrait;
23+
2124
public function indexAction()
2225
{
2326
$handler = $this->container->get('fragment.handler');

‎src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Controller/LoginController.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Controller/LoginController.php
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@
1111

1212
namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\CsrfFormLoginBundle\Controller;
1313

14-
use Symfony\Component\DependencyInjection\ContainerAware;
14+
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
15+
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
1516
use Symfony\Component\HttpFoundation\Response;
1617
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
1718

18-
class LoginController extends ContainerAware
19+
class LoginController implements ContainerAwareInterface
1920
{
21+
use ContainerAwareTrait;
22+
2023
public function loginAction()
2124
{
2225
$form = $this->container->get('form.factory')->create('Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\CsrfFormLoginBundle\Form\UserLoginType');

‎src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LocalizedController.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LocalizedController.php
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@
1111

1212
namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FormLoginBundle\Controller;
1313

14+
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
15+
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
1416
use Symfony\Component\Security\Core\Security;
1517
use Symfony\Component\HttpFoundation\Request;
1618
use Symfony\Component\HttpFoundation\Response;
17-
use Symfony\Component\DependencyInjection\ContainerAware;
1819

19-
class LocalizedController extends ContainerAware
20+
class LocalizedController implements ContainerAwareInterface
2021
{
22+
use ContainerAwareTrait;
23+
2124
public function loginAction(Request $request)
2225
{
2326
// get the login error if there is one

‎src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LoginController.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LoginController.php
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,17 @@
1111

1212
namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FormLoginBundle\Controller;
1313

14+
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
15+
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
1416
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
1517
use Symfony\Component\HttpFoundation\Request;
1618
use Symfony\Component\HttpFoundation\Response;
1719
use Symfony\Component\Security\Core\Security;
18-
use Symfony\Component\DependencyInjection\ContainerAware;
1920

20-
class LoginController extends ContainerAware
21+
class LoginController implements ContainerAwareInterface
2122
{
23+
use ContainerAwareTrait;
24+
2225
public function loginAction(Request $request)
2326
{
2427
// get the login error if there is one

‎src/Symfony/Component/HttpKernel/Bundle/Bundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Bundle/Bundle.php
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
namespace Symfony\Component\HttpKernel\Bundle;
1313

14-
use Symfony\Component\DependencyInjection\ContainerAware;
14+
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
15+
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
1516
use Symfony\Component\DependencyInjection\ContainerBuilder;
1617
use Symfony\Component\DependencyInjection\Container;
1718
use Symfony\Component\Console\Application;
@@ -24,8 +25,10 @@
2425
*
2526
* @author Fabien Potencier <fabien@symfony.com>
2627
*/
27-
abstract class Bundle extends ContainerAware implements BundleInterface
28+
abstract class Bundle implements BundleInterface
2829
{
30+
use ContainerAwareTrait;
31+
2932
protected $name;
3033
protected $extension;
3134
protected $path;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.