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 adf3b7d

Browse filesBrowse files
committed
feature #10172 Change all occurrences of Controller to AbstractController (royklutman)
This PR was merged into the 4.1 branch. Discussion ---------- Change all occurrences of Controller to AbstractController Since AbstractController is now the default, changed all occurrences of Controller to AbstractController. Commits ------- 0775f0a Change all occurrences of Controller to AbstractController
2 parents 7918d93 + 0775f0a commit adf3b7d
Copy full SHA for adf3b7d
Expand file treeCollapse file tree

39 files changed

+95
-95
lines changed

‎best_practices/forms.rst

Copy file name to clipboardExpand all lines: best_practices/forms.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ some developers configure form buttons in the controller::
104104
use App\Entity\Post;
105105
use App\Form\PostType;
106106
use Symfony\Component\HttpFoundation\Request;
107-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
107+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
108108
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
109109

110-
class PostController extends Controller
110+
class PostController extends AbstractController
111111
{
112112
// ...
113113

‎components/form.rst

Copy file name to clipboardExpand all lines: components/form.rst
+10-10Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -406,12 +406,12 @@ is created from the form factory.
406406
// src/Controller/TaskController.php
407407
namespace App\Controller;
408408
409-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
409+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
410410
use Symfony\Component\HttpFoundation\Request;
411411
use Symfony\Component\Form\Extension\Core\Type\TextType;
412412
use Symfony\Component\Form\Extension\Core\Type\DateType;
413413
414-
class TaskController extends Controller
414+
class TaskController extends AbstractController
415415
{
416416
public function new(Request $request)
417417
{
@@ -468,11 +468,11 @@ builder:
468468
// src/Controller/DefaultController.php
469469
namespace App\Controller;
470470
471-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
471+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
472472
use Symfony\Component\Form\Extension\Core\Type\TextType;
473473
use Symfony\Component\Form\Extension\Core\Type\DateType;
474474
475-
class DefaultController extends Controller
475+
class DefaultController extends AbstractController
476476
{
477477
public function new(Request $request)
478478
{
@@ -550,10 +550,10 @@ by ``handleRequest()`` to determine whether a form has been submitted):
550550
// src/Controller/DefaultController.php
551551
namespace App\Controller;
552552
553-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
553+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
554554
use Symfony\Component\Form\Extension\Core\Type\FormType;
555555
556-
class DefaultController extends Controller
556+
class DefaultController extends AbstractController
557557
{
558558
public function search()
559559
{
@@ -612,11 +612,11 @@ method:
612612
// src/Controller/TaskController.php
613613
namespace App\Controller;
614614
615-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
615+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
616616
use Symfony\Component\Form\Extension\Core\Type\DateType;
617617
use Symfony\Component\Form\Extension\Core\Type\TextType;
618618
619-
class TaskController extends Controller
619+
class TaskController extends AbstractController
620620
{
621621
public function new(Request $request)
622622
{
@@ -688,13 +688,13 @@ option when building each field:
688688
// src/Controller/DefaultController.php
689689
namespace App\Controller;
690690
691-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
691+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
692692
use Symfony\Component\Validator\Constraints\NotBlank;
693693
use Symfony\Component\Validator\Constraints\Type;
694694
use Symfony\Component\Form\Extension\Core\Type\DateType;
695695
use Symfony\Component\Form\Extension\Core\Type\TextType;
696696
697-
class DefaultController extends Controller
697+
class DefaultController extends AbstractController
698698
{
699699
public function new(Request $request)
700700
{

‎components/routing.rst

Copy file name to clipboardExpand all lines: components/routing.rst
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,10 +393,10 @@ routes with UTF-8 characters:
393393
394394
namespace App\Controller;
395395
396-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
396+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
397397
use Symfony\Component\Routing\Annotation\Route;
398398
399-
class DefaultController extends Controller
399+
class DefaultController extends AbstractController
400400
{
401401
/**
402402
* @Route("/category/{name}", name="route1", options={"utf8": true})
@@ -462,10 +462,10 @@ You can also include UTF-8 strings as routing requirements:
462462
463463
namespace App\Controller;
464464
465-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
465+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
466466
use Symfony\Component\Routing\Annotation\Route;
467467
468-
class DefaultController extends Controller
468+
class DefaultController extends AbstractController
469469
{
470470
/**
471471
* @Route(

‎configuration/micro_kernel_trait.rst

Copy file name to clipboardExpand all lines: configuration/micro_kernel_trait.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,10 @@ has one file in it::
249249
// src/Controller/MicroController.php
250250
namespace App\Controller;
251251

252-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
252+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
253253
use Symfony\Component\Routing\Annotation\Route;
254254

255-
class MicroController extends Controller
255+
class MicroController extends AbstractController
256256
{
257257
/**
258258
* @Route("/random/{limit}")

‎console/command_in_controller.rst

Copy file name to clipboardExpand all lines: console/command_in_controller.rst
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ Run this command from inside your controller via::
2828
namespace App\Controller;
2929

3030
use Symfony\Bundle\FrameworkBundle\Console\Application;
31-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
31+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
3232
use Symfony\Component\Console\Input\ArrayInput;
3333
use Symfony\Component\Console\Output\BufferedOutput;
3434
use Symfony\Component\HttpFoundation\Response;
3535
use Symfony\Component\HttpKernel\KernelInterface;
3636

37-
class SpoolController extends Controller
37+
class SpoolController extends AbstractController
3838
{
3939
public function sendSpool($messages = 10, KernelInterface $kernel)
4040
{
@@ -85,7 +85,7 @@ Now, use it in your controller::
8585
use Symfony\Component\HttpFoundation\Response;
8686
// ...
8787

88-
class SpoolController extends Controller
88+
class SpoolController extends AbstractController
8989
{
9090
public function sendSpool($messages = 10)
9191
{

‎controller/soap_web_service.rst

Copy file name to clipboardExpand all lines: controller/soap_web_service.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ can be retrieved via ``/soap?wsdl``::
5959

6060
namespace App\Controller;
6161

62-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
62+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
6363
use Symfony\Component\HttpFoundation\Response;
6464
use Symfony\Component\Routing\Annotation\Route;
6565
use App\Service\HelloService;
6666

67-
class HelloServiceController extends Controller
67+
class HelloServiceController extends AbstractController
6868
{
6969
/**
7070
* @Route("/soap")

‎controller/upload_file.rst

Copy file name to clipboardExpand all lines: controller/upload_file.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@ Finally, you need to update the code of the controller that handles the form::
9999
// src/Controller/ProductController.php
100100
namespace App\Controller;
101101

102-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
102+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
103103
use Symfony\Component\HttpFoundation\Request;
104104
use Symfony\Component\Routing\Annotation\Route;
105105
use App\Entity\Product;
106106
use App\Form\ProductType;
107107

108-
class ProductController extends Controller
108+
class ProductController extends AbstractController
109109
{
110110
/**
111111
* @Route("/product/new", name="app_product_new")

‎doctrine.rst

Copy file name to clipboardExpand all lines: doctrine.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ and save it!
336336
// ...
337337
use App\Entity\Product;
338338
339-
class ProductController extends Controller
339+
class ProductController extends AbstractController
340340
{
341341
/**
342342
* @Route("/product", name="product")

‎doctrine/associations.rst

Copy file name to clipboardExpand all lines: doctrine/associations.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ Now you can see this new code in action! Imagine you're inside a controller::
316316
use App\Entity\Product;
317317
use Symfony\Component\HttpFoundation\Response;
318318

319-
class ProductController extends Controller
319+
class ProductController extends AbstractController
320320
{
321321
/**
322322
* @Route("/product", name="product")

‎doctrine/dbal.rst

Copy file name to clipboardExpand all lines: doctrine/dbal.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ object::
4545

4646
use Doctrine\DBAL\Driver\Connection;
4747

48-
class UserController extends Controller
48+
class UserController extends AbstractController
4949
{
5050
public function index(Connection $connection)
5151
{

‎doctrine/multiple_entity_managers.rst

Copy file name to clipboardExpand all lines: doctrine/multiple_entity_managers.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ the default entity manager (i.e. ``default``) is returned::
221221

222222
use Doctrine\ORM\EntityManagerInterface;
223223

224-
class UserController extends Controller
224+
class UserController extends AbstractController
225225
{
226226
public function index(EntityManagerInterface $entityManager)
227227
{
@@ -247,7 +247,7 @@ The same applies to repository calls::
247247
use AcmeStoreBundle\Entity\Product;
248248
// ...
249249

250-
class UserController extends Controller
250+
class UserController extends AbstractController
251251
{
252252
public function index()
253253
{

‎doctrine/registration_form.rst

Copy file name to clipboardExpand all lines: doctrine/registration_form.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,12 +245,12 @@ into the database::
245245

246246
use App\Form\UserType;
247247
use App\Entity\User;
248-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
248+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
249249
use Symfony\Component\HttpFoundation\Request;
250250
use Symfony\Component\Routing\Annotation\Route;
251251
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
252252

253-
class RegistrationController extends Controller
253+
class RegistrationController extends AbstractController
254254
{
255255
/**
256256
* @Route("/register", name="user_registration")

‎event_dispatcher/before_after_filters.rst

Copy file name to clipboardExpand all lines: event_dispatcher/before_after_filters.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ A controller that implements this interface simply looks like this::
9292
namespace App\Controller;
9393

9494
use App\Controller\TokenAuthenticatedController;
95-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
95+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
9696

97-
class FooController extends Controller implements TokenAuthenticatedController
97+
class FooController extends AbstractController implements TokenAuthenticatedController
9898
{
9999
// An action that needs authentication
100100
public function bar()

‎form/action_method.rst

Copy file name to clipboardExpand all lines: form/action_method.rst
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ form, you can use ``setAction()`` and ``setMethod()``:
1818
// src/Controller/DefaultController.php
1919
namespace App\Controller;
2020
21-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
21+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
2222
use Symfony\Component\Form\Extension\Core\Type\DateType;
2323
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
2424
use Symfony\Component\Form\Extension\Core\Type\TextType;
2525
26-
class DefaultController extends Controller
26+
class DefaultController extends AbstractController
2727
{
2828
public function new()
2929
{
@@ -79,9 +79,9 @@ options:
7979
namespace App\Controller;
8080
8181
use App\Form\TaskType;
82-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
82+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
8383
84-
class DefaultController extends Controller
84+
class DefaultController extends AbstractController
8585
{
8686
public function new()
8787
{

‎form/dynamic_form_modification.rst

Copy file name to clipboardExpand all lines: form/dynamic_form_modification.rst
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,9 @@ type as a service.
329329

330330
In a controller, create the form like normal::
331331

332-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
332+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
333333

334-
class FriendMessageController extends Controller
334+
class FriendMessageController extends AbstractController
335335
{
336336
public function new(Request $request)
337337
{
@@ -504,13 +504,13 @@ your application. Assume that you have a sport meetup creation controller::
504504
// src/Controller/MeetupController.php
505505
namespace App\Controller;
506506

507-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
507+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
508508
use Symfony\Component\HttpFoundation\Request;
509509
use App\Entity\SportMeetup;
510510
use App\Form\Type\SportMeetupType;
511511
// ...
512512

513-
class MeetupController extends Controller
513+
class MeetupController extends AbstractController
514514
{
515515
public function create(Request $request)
516516
{

‎form/form_collections.rst

Copy file name to clipboardExpand all lines: form/form_collections.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ In your controller, you'll create a new form from the ``TaskType``::
152152
use App\Entity\Tag;
153153
use App\Form\Type\TaskType;
154154
use Symfony\Component\HttpFoundation\Request;
155-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
155+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
156156

157-
class TaskController extends Controller
157+
class TaskController extends AbstractController
158158
{
159159
public function new(Request $request)
160160
{

‎forms.rst

Copy file name to clipboardExpand all lines: forms.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ from inside a controller::
9292
namespace App\Controller;
9393

9494
use App\Entity\Task;
95-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
95+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
9696
use Symfony\Component\HttpFoundation\Request;
9797
use Symfony\Component\Form\Extension\Core\Type\TextType;
9898
use Symfony\Component\Form\Extension\Core\Type\DateType;
9999
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
100100

101-
class DefaultController extends Controller
101+
class DefaultController extends AbstractController
102102
{
103103
public function new(Request $request)
104104
{

‎http_cache/esi.rst

Copy file name to clipboardExpand all lines: http_cache/esi.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ independent of the rest of the page::
100100
// src/Controller/DefaultController.php
101101

102102
// ...
103-
class DefaultController extends Controller
103+
class DefaultController extends AbstractController
104104
{
105105
public function about()
106106
{
@@ -165,7 +165,7 @@ of the master page::
165165
namespace App\Controller;
166166

167167
// ...
168-
class NewsController extends Controller
168+
class NewsController extends AbstractController
169169
{
170170
public function latest($maxPerPage)
171171
{

‎http_cache/validation.rst

Copy file name to clipboardExpand all lines: http_cache/validation.rst
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ To see a simple implementation, generate the ETag as the md5 of the content::
6464

6565
use Symfony\Component\HttpFoundation\Request;
6666

67-
class DefaultController extends Controller
67+
class DefaultController extends AbstractController
6868
{
6969
public function homepage(Request $request)
7070
{
@@ -129,7 +129,7 @@ header value::
129129
use Symfony\Component\HttpFoundation\Request;
130130
use App\Entity\Article;
131131

132-
class ArticleController extends Controller
132+
class ArticleController extends AbstractController
133133
{
134134
public function show(Article $article, Request $request)
135135
{
@@ -188,7 +188,7 @@ exposing a simple and efficient pattern::
188188
use Symfony\Component\HttpFoundation\Response;
189189
use Symfony\Component\HttpFoundation\Request;
190190

191-
class ArticleController extends Controller
191+
class ArticleController extends AbstractController
192192
{
193193
public function show($articleSlug, Request $request)
194194
{

‎introduction/from_flat_php_to_symfony2.rst

Copy file name to clipboardExpand all lines: introduction/from_flat_php_to_symfony2.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,9 +543,9 @@ them for you. Here's the same sample application, now built in Symfony::
543543
namespace App\Controller;
544544

545545
use App\Entity\Post;
546-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
546+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
547547

548-
class BlogController extends Controller
548+
class BlogController extends AbstractController
549549
{
550550
public function list()
551551
{

0 commit comments

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