Skip to content

[FEATURE] Add stream_context option to WebOpcacheResetExecuteTask#79

Merged
helhum merged 2 commits intoTYPO3:masterfrom
sabbelasichon:feature/web-opcache-reset-execute-task-with-context
Sep 5, 2017
Merged

[FEATURE] Add stream_context option to WebOpcacheResetExecuteTask#79
helhum merged 2 commits intoTYPO3:masterfrom
sabbelasichon:feature/web-opcache-reset-execute-task-with-context

Conversation

@sabbelasichon
Copy link
Copy Markdown
Collaborator

  • This is useful for example to execute the task if we have to provide Basic Authentication

…cuteTask

- This is useful for example to execute the task if we have to provide Basic Authentication
}

$context = null;
if (isset($options['context']) && is_array($options['context'])) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please call that stream_context

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Only the option? Or the variable too?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update?

@simonschaufi
Copy link
Copy Markdown
Collaborator

simonschaufi commented May 17, 2017

Fixes #83

@sabbelasichon
Copy link
Copy Markdown
Collaborator Author

I have fixed it. Hope everything is fine now.

@simonschaufi
Copy link
Copy Markdown
Collaborator

great. Maybe some documentation how to use it?

@sabbelasichon
Copy link
Copy Markdown
Collaborator Author

sabbelasichon commented Jul 11, 2017

You can now just pass the option stream_context to the task TYPO3\Surf\Task\Php\WebOpcacheResetExecuteTask:

$workflow->setTaskOptions('TYPO3\\Surf\\Task\\Php\\WebOpcacheResetExecuteTask',array(
        'baseUrl' => $baseUrl,
        'stream_context' => array(
            'http' => array(
                'header' => 'Authorization: Basic '.base64_encode("username:password"),
            ),
        ),
    ));

@helhum helhum merged commit cf98a6e into TYPO3:master Sep 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants