Feature #38222

Step execution signals with concrete name

Added by Adrian Föder over 9 years ago. Updated over 8 years ago.

Status:
New
Priority:
Could have
Assignee:
-
Category:
Core
Target version:
-
Start date:
2012-06-20
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

currently, Core\Booting\Sequence::invokeStep() looks

$bootstrap->getSignalSlotDispatcher()->dispatch(__CLASS__, 'beforeInvokeStep', array($step));
$identifier = $step->getIdentifier();
$step($bootstrap);
$bootstrap->getSignalSlotDispatcher()->dispatch(__CLASS__, 'afterInvokeStep', array($step));

This requires listening to a specific step invocation to look like this (taken from an example):

$dispatcher->connect('TYPO3\FLOW3\Core\Booting\Sequence', 'afterInvokeStep', function(\TYPO3\FLOW3\Core\Booting\Step $step) use ($bootstrap) {
    if ($step->getIdentifier() === 'typo3.flow3:objectmanagement:compiletime:create') {
        $bootstrap->getObjectManager()->get('....');
    }
});

Due to the fact that, I claim, invoke-step-listening surely always intends to affect a specific step, I suggest to involve additional "magic" signals that take their name from the step identifier, resulting in, for example,

$dispatcher->connect('TYPO3\FLOW3\Core\Booting\Sequence', 'afterInvokeStepTypo3Flow3ObjectmanagementCompiletimeCreate', function(\TYPO3\FLOW3\Core\Booting\Step $step) use ($bootstrap) {
    $bootstrap->getObjectManager()->get('....');
});
#1

Updated by Adrian Föder over 8 years ago

  • Assignee deleted (Adrian Föder)

Also available in: Atom PDF