Closed laurentmuller closed 1 year ago
In the stub file AbstractController.stubphp for Symfony 6, the following code is wrong:
AbstractController.stubphp
public function createForm(string $type, $data = null, array $options = []): FormInterface {}
The visibility of the AbstractController must be protected instead of public.
AbstractController
protected
public
When we override the function in a controller, pslam complains with the following error:
OverriddenMethodAccess: Method App\Controller\AbstractController::createForm has different access level...
It is simply a matter of changing the visibility in the AbstractController.stubphp file:
protected function createForm(string $type, $data = null, array $options = []): FormInterface {}
In the stub file
AbstractController.stubphp
for Symfony 6, the following code is wrong:The visibility of the
AbstractController
must beprotected
instead ofpublic
.When we override the function in a controller, pslam complains with the following error:
OverriddenMethodAccess: Method App\Controller\AbstractController::createForm has different access level...
It is simply a matter of changing the visibility in the
AbstractController.stubphp
file: