public function extensionSetupIfPossibleCommand()
    {
        $commandDispatcher = CommandDispatcher::createFromCommandRun();
        try {
            $this->outputLine($commandDispatcher->executeCommand('database:updateschema'));
            $this->outputLine($commandDispatcher->executeCommand('cache:flush'));
            $this->outputLine($commandDispatcher->executeCommand('extension:setupactive'));
        } catch (FailedSubProcessCommandException $e) {
            $this->outputLine('<warning>Extension setup skipped.</warning>');
        }
    }
public function extensionSetupIfPossibleCommand()
    {
        $commandDispatcher = CommandDispatcher::createFromCommandRun();
        try {
            $this->outputLine($commandDispatcher->executeCommand('database:updateschema'));
            $this->outputLine($commandDispatcher->executeCommand('cache:flush'));
            $this->outputLine($commandDispatcher->executeCommand('extension:setupactive'));
        } catch (FailedSubProcessCommandException $e) {
            $this->outputLine('<warning>Extension setup skipped.</warning>');
        }
    }
public function extensionSetupIfPossibleCommand ( ) { $ commandDispatcher = CommandDispatcher :: createFromCommandRun ( ) ; try { $ this -> outputLine ( $ commandDispatcher -> executeCommand ( 'database:updateschema' ) ) ; $ this -> outputLine ( $ commandDispatcher -> executeCommand ( 'cache:flush' ) ) ; $ this -> outputLine ( $ commandDispatcher -> executeCommand ( 'extension:setupactive' ) ) ; } catch ( FailedSubProcessCommandException $ e ) { $ this -> outputLine ( '<warning>Extension setup skipped.</warning>' ) ; } }
Setup TYPO3 with extensions if possible

This command tries up all TYPO3 extensions, but quits gracefully if this is not possible.
This can be used in <code>composer.json</code> scripts to ensure that extensions
are always set up correctly after a composer run on development systems,
but does not fail on packaging for deployment where no database connection is available.

Besides that, it can be used for a first deploy of a TYPO3 instance in a new environment,
but also works for subsequent deployments.

@see typo3_console:extension:setupactive
Setup TYPO3 with extensions if possible