Skip to content

Removed the Action suffix in a controller method name #12520

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ use the ``createForm()`` helper (otherwise, use the ``create()`` method of the

// src/Controller/TaskController.php
namespace App\Controller;

use App\Form\Type\TaskType;
// ...

Expand Down Expand Up @@ -232,7 +232,7 @@ the ``data_class`` option by adding the following to your form type class::

// src/Form/Type/TaskType.php
namespace App\Form\Type;

use App\Entity\Task;
use Symfony\Component\OptionsResolver\OptionsResolver;
// ...
Expand Down Expand Up @@ -524,7 +524,7 @@ object.

// src/Entity/Task.php
namespace App\Entity;

use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints\Type;
use Symfony\Component\Validator\Mapping\ClassMetadata;
Expand Down Expand Up @@ -562,7 +562,7 @@ argument of ``createForm()``::

// src/Controller/TaskController.php
namespace App\Controller;

use App\Form\Type\TaskType;
// ...

Expand All @@ -588,7 +588,7 @@ options they accept using the ``configureOptions()`` method::

// src/Form/Type/TaskType.php
namespace App\Form\Type;

use Symfony\Component\OptionsResolver\OptionsResolver;
// ...

Expand Down Expand Up @@ -769,13 +769,13 @@ method::

// src/Controller/TaskController.php
namespace App\Controller;

use App\Form\TaskType;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;

class TaskController extends AbstractController
{
public function newAction()
public function new()
{
$task = ...;
$form = $this->get('form.factory')->createNamed('my_name', TaskType::class, $task);
Expand Down