Skip to content

Commit

Permalink
Bugfix: Adjust to api changes in Neos 9.0
Browse files Browse the repository at this point in the history
With Neos 9.0 it will not be possible to replace fusion globals like `request` via `pushContext`
instead the internal `pushContextArray` has to be used for that.

This change adjusts the code to always use `pushContextArray` to set the form subrequest
which works in all supported versions of Neos.
  • Loading branch information
mficzel committed Sep 10, 2023
1 parent 224a26a commit e2988f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Classes/Runtime/FusionObjects/RuntimeFormImplementation.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ public function evaluate(): string
$process = $this->getProcess();

$formRequest = $this->formRequestFactory->createFormRequest($this->getCurrentActionRequest(), $namespace);
$this->runtime->pushContext('request', $formRequest);
$context = $this->runtime->getCurrentContext();
$context['request'] = $formRequest;
$this->runtime->pushContextArray($context);
$process->handle($formRequest, $data);
if ($process->isFinished() === false) {
$result = $this->renderForm($process, $formRequest, $this->getAttributes());
Expand Down

0 comments on commit e2988f0

Please sign in to comment.