Skip to main content


(Replace this first paragraph with a brief description of your new category. This guidance will appear in the category selection area, so try to keep it below 200 characters.)

Use the following paragraphs for a longer description, or to establish category guidelines or rules:

  • Why should people use this category? What is it for?
  • How exactly is this different than the other categories we already have?
  • What should topics in this category generally contain?
  • Do we need this category? Can we merge with another category, or subcategory?

1 post - 1 participant



Since TYPO3 uses a lot of the components of Symfony already, it would be great if Extbase would also be similar to Symfony.

Symfony has 2 great features which are currently missing in Extbase:

  1. Allow to specify allowed methods for an action (GET, POST, PUT…)
  2. Set permissions which user is allowed to call actions

Surprisingly the backend is already feature number one where you can define allowed methods in typo3/sysext/backend/Configuration/Backend/Routes.php for example like so:
<pre><code class="lang-php">'login_request_token' => [
'path' => '/login/request-token',
'access' => 'public',
'methods' => ['POST'],
'target' => Controller\LoginController::class . '::requestTokenAction',
],
</code></pre>
Because the routing works completely different in Extbase, it is time to rethink it.

My proposal is to also use Annotations like in Symfony also in Extbase like so:
<pre><code class="lang-php">class BackendUserController extends ActionController
{
#[Route(path: '/removeFromCompareList/{uid}/{redirectToCompare}', name: 'removeFromCompareList', methods: ['POST'])]
#[IsGranted('customer')]
public function removeFromCompareListAction(int $uid, int $redirectToCompare = 0): ResponseInterface
{
$this->removeFromCompareList('compareUserList', $uid);
if ($redirectToCompare) {
return $this->redirect('compare');
}
return $this->redirect('index');
}
}
</code></pre>
What are your thoughts about it?

Would this be something that could be implemented for TYPO3 13?

2 posts - 2 participants

Jens Neumann reshared this.



Hi, I have a great idea for a major new feature for TYPO3 13! I’m following closely what is happening in the NEOS community. There is a new package called NEOSidekick which improves your content, suggests page structures and lots more.


Good morning folks, I’d like to know your opinion on the following matter. A few years back a lot of people started using and embracing phpstan and its features and applied those in the core.

Oliver Klee reshared this.