0

I have a question regarding TYPO3 9 (and future versions) and PSR-15.

AFAIK most of the backend modules implement a handleRequest method for backend module controllers that have the same signature as PSR-15's RequestHandlerInterface.

Is it intended in future versions to implement this interface and does anything speak against implementing for my own backend modules?

I’m rebuilding an entire backend module for compatibility with TYPO3 9 and would like to be sure that such an approach is viable in future version s (at least until TYPO3 10).

The module itself worked for almost 10 years without any bigger overhaul, but with BaseScriptClass being deprecated, I see no other choice.

Thanks for your feedback.

CDRO
  • 130
  • 1
  • 9

1 Answers1

0

Using requests and response is the way to go. This is nothing invented by TYPO3 but a standard which is implemented, see https://www.php-fig.org/psr/psr-15/. Stuff like GeneralUtility::_GET will be deprecated or even removed probably in version 10.

Getting back to your question: Yes use that in your backend modules! Currently the core tries to remove less extbase, especially in the backend because of various reasons and this is also the way to go for extensions. Check out e.g. the backend module of the redirects extension or site module. A custom extension I currently implement is https://github.com/georgringer/site_management which follows also those principles.

Georg Ringer
  • 7,779
  • 1
  • 16
  • 34
  • Good, but you seem to implement the method as `handleRequest` rather than `handle`, but as I understand I can call it either way, but the PSR-15 should be the way to go (and thus naming the method `handle`) as this offers the most inter-operability (until something new emerges), right? – CDRO Nov 26 '18 at 14:40
  • Check out https://github.com/georgringer/site_management/blob/master/ext_tables.php. As I am providing the method name there it can have any name ;) – Georg Ringer Nov 26 '18 at 20:17