Project

General

Profile

Actions

Feature #91222

open

Make dependency injection possible for errorPhpClassFQCN

Added by Christian Futterlieb over 4 years ago. Updated 5 months ago.

Status:
New
Priority:
Should have
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2020-04-28
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Because TYPO3\CMS\Core\Site\Entity\Site::getErrorHandler() passes two arguments to the constructor of classes declared as errorPhpClassFQCN, dependency injection is not possible.

I guess, the solution should be to change the method PageErrorHandlerInterface::handlePageError() to accept the $statusCode and $errorHandlerConfiguration. Or add a new interface method for compatibility/deprecation reasons.

Additionally, a new method Site::getErrorHandlerConfiguration(int $status) could remove the binding of creating and configuring an errorPhpClassFQCN.

What are your thoughts? I'd also be happy to provide some code for this.

Actions

Also available in: Atom PDF