TYPO3\Surf\Task\Php\WebOpcacheResetExecuteTask

class WebOpcacheResetExecuteTask

A task to reset the PHP opcache by executing a prepared script with an HTTP request.

It takes the following options:

  • baseUrl - The path where the script is located.
  • scriptIdentifier - The name of the script. Default is a random string. See WebOpcacheResetCreateScriptTask for more information.
Example:
$workflow
->setTaskOptions(‘TYPO3SurfTaskPhpWebOpcacheResetExecuteTask’, [

‘baseUrl’ => ‘/var/www/outerspace’, ‘scriptIdentifier’ => ‘eraseAllHumans’, ‘stream_context’ => [

‘http’ => [
‘header’ => ‘Authorization: Basic ‘.base64_encode(“username:password”),

],

],

]

);

__construct(FilesystemInterface $filesystem = null)

WebOpcacheResetCreateScriptTask constructor.

Parameters:
execute(Node $node, Application $application, Deployment $deployment, $options = [])

Execute this task

Parameters:
  • $node (Node) –
  • $application (Application) –
  • $deployment (Deployment) –
  • $options (array) – Supported options: “baseUrl” (required) and “scriptIdentifier” (is passed by the create script task)
resolveOptions(OptionsResolver $resolver)
Parameters:
  • $resolver (OptionsResolver) –
rollback(Node $node, Application $application, Deployment $deployment, $options = [])

Rollback this task

Parameters:
simulate(Node $node, Application $application, Deployment $deployment, $options = [])

Simulate this task (e.g. by logging commands it would execute)

Parameters:
configureOptions($options = [])
Parameters:
  • $options (array) –
Returns:

array