#91222Make dependency injection possible for errorPhpClassFQCN
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.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch
- Commit message
-
[FEATURE] Make dependency injection possible for errorPhpClassFQCN Resolves: #91222 Releases: main