Commit 5af323ca authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Christian Kuhn
Browse files

[!!!][TASK] Remove Application->run callback

The callback arguments in Application->run()
is removed in favour of PSR-15 middlewares.

Resolves: #96192
Related: #94272
Releases: main
Change-Id: I7db4278fde0361840bdc275736961b2c49241233
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72452


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 3c2b8fac
......@@ -82,10 +82,8 @@ class CommandApplication implements ApplicationInterface
/**
* Run the Symfony Console application in this TYPO3 application
*
* @param callable $execute Deprecated, will be removed in TYPO3 v12.0
*/
public function run(callable $execute = null)
public function run()
{
$input = new ArgvInput();
$output = new ConsoleOutput();
......@@ -118,11 +116,6 @@ class CommandApplication implements ApplicationInterface
$exitCode = $this->application->run($input, $output);
if ($execute !== null) {
trigger_error('Custom execution of Application code will be removed in TYPO3 v12.0.', E_USER_DEPRECATED);
$execute();
}
exit($exitCode);
}
......
......@@ -25,8 +25,6 @@ interface ApplicationInterface
{
/**
* Starting point
*
* @param callable $execute Deprecated, will be removed in TYPO3 v12.0
*/
public function run(callable $execute = null);
public function run();
}
......@@ -92,16 +92,10 @@ abstract class AbstractApplication implements ApplicationInterface, RequestHandl
/**
* Set up the application and shut it down afterwards
*
* @param callable $execute Deprecated, will be removed in TYPO3 v12.0
*/
final public function run(callable $execute = null)
final public function run()
{
$response = $this->handle(ServerRequestFactory::fromGlobals());
if ($execute !== null) {
trigger_error('Custom execution of Application code will be removed in TYPO3 v12.0, use PSR-15 Middlewares instead.', E_USER_DEPRECATED);
$execute();
}
$this->sendResponse($response);
}
}
......@@ -97,6 +97,7 @@ The following PHP static class methods that have previously been marked as depre
The following methods changed signature according to previous deprecations in v11 at the end of the argument list:
- :php:`\TYPO3\CMS\Core\Core\ApplicationInterface->run` (argument 1 is removed)
- :php:`\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->ATagParams` (argument 2 is removed)
The following methods changed signature according to previous deprecations in v11 and are now type hinted:
......
......@@ -301,6 +301,7 @@ return [
'maximumNumberOfArguments' => 0,
'restFiles' => [
'Deprecation-94272-DeprecatedApplication-runCallback.rst',
'Breaking-96107-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\Database\RelationHandler->writeForeignField' => [
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment