public function accept(StatefulSubjectInterface $subject)
    {
        $execution_context = $subject->getExecutionContext();
        $parameters = $execution_context->getParameters();

        if (is_array($parameters)) {
            $params = $parameters;
        } elseif (is_object($parameters) && is_callable(array($parameters, 'toArray'))) {
            $params = $parameters->toArray();
        } else {
            throw new RuntimeError(
                'The $subject->getExecutionContext()->getParameters() must return array or object with toArray method.'
            );
        }

        $transition_acceptable = $this->expression_service->evaluate(
            $this->options->get('expression'),
            array_merge(
                $params,
                [
                    'subject' => $subject,
                    'current_user' => $this->environment->getUser(),
                ]
            )
        );

        return (bool)$transition_acceptable;
    }