Skip to content

Commit 29578ee

Browse files
authored
Update state-processors.md (#1584)
The example for the `UserProcessor` was incorrect and still used the 2.6 format to call the decorated->process
1 parent a60c429 commit 29578ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/state-processors.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ Here is an implementation example which sends new users a welcome email after a
9393

9494
namespace App\State;
9595

96+
use ApiPlatform\Metadata\Operation;
9697
use ApiPlatform\State\ProcessorInterface;
9798
use App\Entity\User;
9899
use Symfony\Component\Mailer\MailerInterface;
@@ -110,7 +111,7 @@ final class UserProcessor implements ProcessorInterface
110111

111112
public function process($data, Operation $operation, array $uriVariables = [], array $context = [])
112113
{
113-
$result = $this->decorated->process($data, $uriVariables, $operationName, $context);
114+
$result = $this->decorated->process($data, $operation, $uriVariables, $context);
114115
$this->sendWelcomeEmail($data);
115116
return $result;
116117
}

0 commit comments

Comments
 (0)