wol-soft/php-workflow

View on GitHub
Update main.yml #71
Enno Woortmann authored 16844b2d
complete00:00:31
Your first build completed successfully!

Congratulations

Your first build completed successfully!

See the Results

1
git clone
2
codeclimate validate-config
View output
codeclimate validate-config
WARNING: missing 'version' key. Please add `version: "2"`
3
codeclimate prepare
View output
codeclimate prepare
4
builder pull-engines
View output
determining required images
docker pull codeclimate/codeclimate-phan:b885
b885: Pulling from codeclimate/codeclimate-phan
8e402f1a9c57: Pulling fs layer
abc2d0fc5668: Pulling fs layer
dc541c3b1e49: Pulling fs layer
9f6ca43a9b11: Pulling fs layer
c7737daaa88e: Pulling fs layer
dacca831c5b2: Pulling fs layer
16fbe636fb42: Pulling fs layer
723d37ca9d09: Pulling fs layer
9eddffd41f08: Pulling fs layer
fb7a0bf324fd: Pulling fs layer
d45ca5424117: Pulling fs layer
9f6ca43a9b11: Waiting
c7737daaa88e: Waiting
dacca831c5b2: Waiting
16fbe636fb42: Waiting
723d37ca9d09: Waiting
9eddffd41f08: Waiting
fb7a0bf324fd: Waiting
abc2d0fc5668: Verifying Checksum
abc2d0fc5668: Download complete
dc541c3b1e49: Download complete
8e402f1a9c57: Verifying Checksum
8e402f1a9c57: Download complete
dacca831c5b2: Download complete
8e402f1a9c57: Pull complete
c7737daaa88e: Verifying Checksum
c7737daaa88e: Download complete
abc2d0fc5668: Pull complete
9f6ca43a9b11: Verifying Checksum
9f6ca43a9b11: Download complete
dc541c3b1e49: Pull complete
723d37ca9d09: Download complete
16fbe636fb42: Verifying Checksum
16fbe636fb42: Download complete
fb7a0bf324fd: Verifying Checksum
fb7a0bf324fd: Download complete
d45ca5424117: Verifying Checksum
d45ca5424117: Download complete
9eddffd41f08: Verifying Checksum
9eddffd41f08: Download complete
9f6ca43a9b11: Pull complete
c7737daaa88e: Pull complete
dacca831c5b2: Pull complete
16fbe636fb42: Pull complete
723d37ca9d09: Pull complete
9eddffd41f08: Pull complete
fb7a0bf324fd: Pull complete
d45ca5424117: Pull complete
Digest: sha256:80f9f90a9dc7ed88b958d04b86493d2a7bff8f1bdf1ba775c0c9ba6e254f6181
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-phan:b885
docker pull codeclimate/codeclimate-sonar-php:b23
b23: Pulling from codeclimate/codeclimate-sonar-php
97518928ae5f: Pulling fs layer
043df9f67e9a: Pulling fs layer
a42e650909d2: Pulling fs layer
0dff3d7a1a0e: Pulling fs layer
e109c25d106c: Pulling fs layer
b2fb00c172a9: Pulling fs layer
1519b1438731: Pulling fs layer
cfbd8af1af7a: Pulling fs layer
ea3b98fb78f4: Pulling fs layer
1c654bf89a09: Pulling fs layer
0dff3d7a1a0e: Waiting
e109c25d106c: Waiting
b2fb00c172a9: Waiting
1519b1438731: Waiting
cfbd8af1af7a: Waiting
ea3b98fb78f4: Waiting
1c654bf89a09: Waiting
a42e650909d2: Verifying Checksum
a42e650909d2: Download complete
97518928ae5f: Verifying Checksum
97518928ae5f: Download complete
e109c25d106c: Verifying Checksum
e109c25d106c: Download complete
97518928ae5f: Pull complete
b2fb00c172a9: Download complete
043df9f67e9a: Verifying Checksum
043df9f67e9a: Download complete
0dff3d7a1a0e: Verifying Checksum
0dff3d7a1a0e: Download complete
cfbd8af1af7a: Verifying Checksum
cfbd8af1af7a: Download complete
1519b1438731: Verifying Checksum
1519b1438731: Download complete
ea3b98fb78f4: Verifying Checksum
ea3b98fb78f4: Download complete
1c654bf89a09: Verifying Checksum
1c654bf89a09: Download complete
043df9f67e9a: Pull complete
a42e650909d2: Pull complete
0dff3d7a1a0e: Pull complete
e109c25d106c: Pull complete
b2fb00c172a9: Pull complete
1519b1438731: Pull complete
cfbd8af1af7a: Pull complete
ea3b98fb78f4: Pull complete
1c654bf89a09: Pull complete
Digest: sha256:600639355d67f629857951762cd4d8d2bc9eb16a0496c67a3d6049830edcc87b
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-sonar-php:b23
5
structure
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
6
duplication
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
7
phpmd
phpmd engine documentation
8
phpcodesniffer
phpcodesniffer engine documentation
9
phan
phan engine documentation
10
sonar-php
sonar-php engine documentation
View output
INFO: Java 1.8.0_322 Amazon.com Inc. (64-bit)
INFO: Linux 4.4.0-1128-aws amd64
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-core-2.17.0.899.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-cli-2.1.0.566.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
INFO: Index files
INFO: 62 files indexed
INFO: 54 source files to be analyzed
ERROR: Unable to parse file: /code/src/Validator.php
ERROR: Parse error at line 11 column 13:

 1: <?php
 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace PHPWorkflow;
 6: 
 7: use PHPWorkflow\Step\WorkflowStep;
 8: 
 9: class Validator
10: {
11:     private WorkflowStep $step;
                ^
12:     private bool $hardValidator;
13: 
14:     public function __construct(WorkflowStep $step, bool $hardValidator)
15:     {
16:         $this->step = $step;
17:         $this->hardValidator = $hardValidator;
18:     }
19: 
20:     public function getStep(): WorkflowStep
21:     {

ERROR: Unable to parse file: /code/src/Exception/WorkflowException.php
ERROR: Parse error at line 12 column 13:

 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace PHPWorkflow\Exception;
 6: 
 7: use Exception;
 8: use PHPWorkflow\State\WorkflowResult;
 9: 
10: class WorkflowException extends Exception
11: {
12:     private WorkflowResult $workflowResult;
                ^
13: 
14:     public function __construct(WorkflowResult $workflowResult, string $message, Exception $previous)
15:     {
16:         parent::__construct($message, 0, $previous);
17:         $this->workflowResult = $workflowResult;
18:     }
19: 
20:     public function getWorkflowResult(): WorkflowResult
21:     {
22:         return $this->workflowResult;

ERROR: Unable to parse file: /code/src/Exception/WorkflowValidationException.php
ERROR: Parse error at line 12 column 13:

 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace PHPWorkflow\Exception;
 6: 
 7: use Exception;
 8: 
 9: class WorkflowValidationException extends Exception
10: {
11:     /** @var Exception[] */
12:     private array $validationErrors;
                ^
13: 
14:     public function __construct(array $validationErrors)
15:     {
16:         parent::__construct();
17: 
18:         $this->validationErrors = $validationErrors;
19:     }
20: 
21:     /**
22:      * @return Exception[]

ERROR: Unable to parse file: /code/src/Workflow.php
ERROR: Parse error at line 22 column 13:

12: use PHPWorkflow\Stage\Stage;
13: 
14: class Workflow extends Stage
15: {
16:     use
17:         AllowNextPrepare,
18:         AllowNextValidator,
19:         AllowNextBefore,
20:         AllowNextProcess;
21: 
22:     private string $name;
                ^
23:     private array $middleware;
24: 
25:     public function __construct(string $name, callable ...$middlewares)
26:     {
27:         parent::__construct($this);
28: 
29:         $this->name = $name;
30:         $this->middleware = $middlewares;
31:     }
32: 

ERROR: Unable to parse file: /code/src/Step/Dependency/Requires.php
ERROR: Parse error at line 14 column 33:

 4: 
 5: namespace PHPWorkflow\Step\Dependency;
 6: 
 7: use Attribute;
 8: use PHPWorkflow\Exception\WorkflowStepDependencyNotFulfilledException;
 9: use PHPWorkflow\State\WorkflowContainer;
10: 
11: #[Attribute(Attribute::TARGET_PARAMETER | Attribute::IS_REPEATABLE)]
12: class Requires implements StepDependencyInterface
13: {
14:     public function __construct(private string $key, private ?string $type = null) {}
                                    ^
15: 
16:     public function check(WorkflowContainer $container): void
17:     {
18:         if (!$container->has($this->key)) {
19:             throw new WorkflowStepDependencyNotFulfilledException("Missing '$this->key' in container");
20:         }
21: 
22:         $value = $container->get($this->key);
23: 
24:         if ($this->type === null || (str_starts_with($this->type, '?') && $value === null)) {

ERROR: Unable to parse file: /code/src/Step/Loop.php
ERROR: Parse error at line 23 column 15:

13: use PHPWorkflow\State\ExecutionLog\StepInfo;
14: use PHPWorkflow\State\ExecutionLog\Summary;
15: use PHPWorkflow\State\WorkflowContainer;
16: use PHPWorkflow\State\WorkflowState;
17: use PHPWorkflow\WorkflowControl;
18: 
19: class Loop implements WorkflowStep
20: {
21:     use StepExecutionTrait;
22: 
23:     protected array $steps = [];
                  ^
24:     protected LoopControl $loopControl;
25:     private bool $continueOnError;
26: 
27:     public function __construct(LoopControl $loopControl, bool $continueOnError = false)
28:     {
29:         $this->loopControl = $loopControl;
30:         $this->continueOnError = $continueOnError;
31:     }
32: 
33:     public function addStep(WorkflowStep $step): self

ERROR: Unable to parse file: /code/src/Step/NestedWorkflow.php
ERROR: Parse error at line 17 column 13:

 7: use PHPWorkflow\Exception\WorkflowException;
 8: use PHPWorkflow\ExecutableWorkflow;
 9: use PHPWorkflow\State\ExecutionLog\StepInfo;
10: use PHPWorkflow\State\NestedContainer;
11: use PHPWorkflow\State\WorkflowContainer;
12: use PHPWorkflow\State\WorkflowResult;
13: use PHPWorkflow\WorkflowControl;
14: 
15: class NestedWorkflow implements WorkflowStep
16: {
17:     private ExecutableWorkflow $nestedWorkflow;
                ^
18:     private ?WorkflowContainer $container;
19:     private WorkflowResult $workflowResult;
20: 
21:     public function __construct(ExecutableWorkflow $nestedWorkflow, ?WorkflowContainer $container = null)
22:     {
23:         $this->nestedWorkflow = $nestedWorkflow;
24:         $this->container = $container;
25:     }
26: 
27:     public function getDescription(): string

ERROR: Unable to parse file: /code/src/Step/StepExecutionTrait.php
ERROR: Parse error at line 26 column 13:

16: trait StepExecutionTrait
17: {
18:     protected function wrapStepExecution(WorkflowStep $step, WorkflowState $workflowState): void {
19:         try {
20:             ($this->resolveMiddleware($step, $workflowState))();
21:         } catch (SkipStepException | FailStepException $exception) {
22:             $workflowState->addExecutionLog(
23:                 $step,
24:                 $exception instanceof FailStepException ? ExecutionLog::STATE_FAILED : ExecutionLog::STATE_SKIPPED,
25:                 $exception->getMessage(),
26:             );
                ^
27: 
28:             if ($exception instanceof FailStepException) {
29:                 // cancel the workflow during preparation
30:                 if ($workflowState->getStage() <= WorkflowState::STAGE_PROCESS) {
31:                     throw $exception;
32:                 }
33: 
34:                 $workflowState->getExecutionLog()->addWarning(sprintf('Step failed (%s)', get_class($step)), true);
35:             }
36: 

ERROR: Unable to parse file: /code/src/State/ExecutionLog/Step.php
ERROR: Parse error at line 9 column 13:

 1: <?php
 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace PHPWorkflow\State\ExecutionLog;
 6: 
 7: class Step
 8: {
 9:     private Describable $step;
                ^
10:     private string $state;
11:     private ?string $reason;
12:     private array $stepInfo;
13:     private int $warnings;
14: 
15:     public function __construct(Describable $step, string $state, ?string $reason, array $stepInfo, int $warnings)
16:     {
17:         $this->step = $step;
18:         $this->state = $state;
19:         $this->reason = $reason;

ERROR: Unable to parse file: /code/src/State/ExecutionLog/StepInfo.php
ERROR: Parse error at line 14 column 13:

 4: 
 5: namespace PHPWorkflow\State\ExecutionLog;
 6: 
 7: class StepInfo
 8: {
 9:     public const NESTED_WORKFLOW = 'STEP_NESTED_WORKFLOW';
10:     public const LOOP_START      = 'STEP_LOOP_START';
11:     public const LOOP_ITERATION  = 'STEP_LOOP_ITERATION';
12:     public const LOOP_END        = 'STEP_LOOP_END';
13: 
14:     private string $info;
                ^
15:     private array $context;
16: 
17:     public function __construct(string $info, array $context)
18:     {
19:         $this->info = $info;
20:         $this->context = $context;
21:     }
22: 
23:     public function getInfo(): string
24:     {

ERROR: Unable to parse file: /code/src/State/ExecutionLog/ExecutionLog.php
ERROR: Parse error at line 18 column 13:

 8: use PHPWorkflow\State\WorkflowState;
 9: use PHPWorkflow\Step\WorkflowStep;
10: 
11: class ExecutionLog
12: {
13:     const STATE_SUCCESS = 'ok';
14:     const STATE_SKIPPED = 'skipped';
15:     const STATE_FAILED = 'failed';
16: 
17:     /** @var Step[][] */
18:     private array $stages = [];
                ^
19:     /** @var StepInfo[] Collect additional debug info concerning the current step */
20:     private array $stepInfo = [];
21:     /** @var string[][] Collect all warnings which occurred during the workflow execution */
22:     private array $warnings = [];
23:     private int $warningsDuringStep = 0;
24: 
25:     private float $startAt;
26: 
27:     private WorkflowState $workflowState;
28: 

ERROR: Unable to parse file: /code/src/State/ExecutionLog/OutputFormat/WorkflowGraph.php
ERROR: Parse error at line 11 column 13:

 1: <?php
 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace PHPWorkflow\State\ExecutionLog\OutputFormat;
 6: 
 7: use Exception;
 8: 
 9: class WorkflowGraph implements OutputFormat
10: {
11:     private string $path;
                ^
12: 
13:     public function __construct(string $path)
14:     {
15:         $this->path = $path;
16:     }
17: 
18:     public function format(string $workflowName, array $steps): string
19:     {
20:         $this->generateImageFromScript(
21:             (new GraphViz())->format($workflowName, $steps),

ERROR: Unable to parse file: /code/src/State/ExecutionLog/OutputFormat/StringLog.php
ERROR: Parse error at line 15 column 13:

 5: namespace PHPWorkflow\State\ExecutionLog\OutputFormat;
 6: 
 7: use PHPWorkflow\State\ExecutionLog\ExecutionLog;
 8: use PHPWorkflow\State\ExecutionLog\Step;
 9: use PHPWorkflow\State\ExecutionLog\StepInfo;
10: use PHPWorkflow\State\WorkflowResult;
11: use PHPWorkflow\State\WorkflowState;
12: 
13: class StringLog implements OutputFormat
14: {
15:     private string $indentation = '';
                ^
16: 
17:     public function format(string $workflowName, array $steps): string
18:     {
19:         $debug = "Process log for workflow '$workflowName':" . PHP_EOL;
20: 
21:         foreach ($steps as $stage => $stageSteps) {
22:             $debug .= sprintf(
23:                 '%s%s%s:' . PHP_EOL,
24:                 $stage === WorkflowState::STAGE_SUMMARY ? PHP_EOL : '',
25:                 $this->indentation,

ERROR: Unable to parse file: /code/src/State/ExecutionLog/OutputFormat/GraphViz.php
ERROR: Parse error at line 14 column 20:

 4: 
 5: namespace PHPWorkflow\State\ExecutionLog\OutputFormat;
 6: 
 7: use PHPWorkflow\State\ExecutionLog\ExecutionLog;
 8: use PHPWorkflow\State\ExecutionLog\Step;
 9: use PHPWorkflow\State\ExecutionLog\StepInfo;
10: use PHPWorkflow\State\WorkflowResult;
11: 
12: class GraphViz implements OutputFormat
13: {
14:     private static int $stepIndex = 0;
                       ^
15:     private static int $clusterIndex = 0;
16: 
17:     private static int $loopIndex = 0;
18:     private static array $loopInitialElement = [];
19:     private static array $loopLinks = [];
20: 
21:     public function format(string $workflowName, array $steps): string
22:     {
23:         $dotScript = "digraph \"$workflowName\" {\n";
24: 

ERROR: Unable to parse file: /code/src/State/ExecutionLog/Summary.php
ERROR: Parse error at line 9 column 13:

 1: <?php
 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace PHPWorkflow\State\ExecutionLog;
 6: 
 7: class Summary implements Describable
 8: {
 9:     private string $description;
                ^
10: 
11:     public function __construct(string $description)
12:     {
13:         $this->description = $description;
14:     }
15: 
16:     public function getDescription(): string
17:     {
18:         return $this->description;
19:     }

ERROR: Unable to parse file: /code/src/State/WorkflowContainer.php
ERROR: Parse error at line 9 column 15:

 1: <?php
 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace PHPWorkflow\State;
 6: 
 7: class WorkflowContainer
 8: {
 9:     protected array $items = [];
                  ^
10: 
11:     public function get(string $key)
12:     {
13:         return $this->items[$key] ?? null;
14:     }
15: 
16:     public function set(string $key, $value): self
17:     {
18:         $this->items[$key] = $value;
19:         return $this;

ERROR: Unable to parse file: /code/src/State/WorkflowState.php
ERROR: Parse error at line 24 column 13:

14: {
15:     public const STAGE_PREPARE = 0;
16:     public const STAGE_VALIDATE = 1;
17:     public const STAGE_BEFORE = 2;
18:     public const STAGE_PROCESS = 3;
19:     public const STAGE_ON_ERROR = 4;
20:     public const STAGE_ON_SUCCESS = 5;
21:     public const STAGE_AFTER = 6;
22:     public const STAGE_SUMMARY = 7;
23: 
24:     private ?Exception $processException = null;
                ^
25: 
26:     private string $workflowName;
27:     private int $stage = self::STAGE_PREPARE;
28:     private int $inLoop = 0;
29: 
30:     private WorkflowControl $workflowControl;
31:     private WorkflowContainer $workflowContainer;
32:     private ExecutionLog $executionLog;
33: 
34:     private array $middlewares = [];

ERROR: Unable to parse file: /code/src/State/WorkflowResult.php
ERROR: Parse error at line 14 column 13:

 4: 
 5: namespace PHPWorkflow\State;
 6: 
 7: use Exception;
 8: use PHPWorkflow\State\ExecutionLog\OutputFormat\OutputFormat;
 9: use PHPWorkflow\State\ExecutionLog\OutputFormat\StringLog;
10: use PHPWorkflow\Step\WorkflowStep;
11: 
12: class WorkflowResult
13: {
14:     private bool $success;
                ^
15:     private ?Exception $exception;
16:     private WorkflowState $workflowState;
17: 
18:     public function __construct(
19:         WorkflowState $workflowState,
20:         bool $success,
21:         ?Exception $exception = null
22:     ) {
23:         $this->success = $success;
24:         $this->exception = $exception;

ERROR: Unable to parse file: /code/src/State/NestedContainer.php
ERROR: Parse error at line 9 column 13:

 1: <?php
 2: 
 3: declare(strict_types=1);
 4: 
 5: namespace PHPWorkflow\State;
 6: 
 7: class NestedContainer extends WorkflowContainer
 8: {
 9:     private WorkflowContainer $parentContainer;
                ^
10:     private ?WorkflowContainer $container;
11: 
12:     public function __construct(WorkflowContainer $parentContainer, ?WorkflowContainer $container)
13:     {
14:         $this->parentContainer = $parentContainer;
15:         $this->container = $container;
16:     }
17: 
18:     public function get(string $key)
19:     {

ERROR: Unable to parse file: /code/src/WorkflowControl.php
ERROR: Parse error at line 18 column 13:

 8: use PHPWorkflow\Exception\WorkflowControl\BreakException;
 9: use PHPWorkflow\Exception\WorkflowControl\ContinueException;
10: use PHPWorkflow\Exception\WorkflowControl\FailStepException;
11: use PHPWorkflow\Exception\WorkflowControl\FailWorkflowException;
12: use PHPWorkflow\Exception\WorkflowControl\SkipStepException;
13: use PHPWorkflow\Exception\WorkflowControl\SkipWorkflowException;
14: use PHPWorkflow\State\WorkflowState;
15: 
16: class WorkflowControl
17: {
18:     private WorkflowState $workflowState;
                ^
19: 
20:     public function __construct(WorkflowState $workflowState)
21:     {
22:         $this->workflowState = $workflowState;
23:     }
24: 
25:     /**
26:      * Mark the current step as skipped.
27:      * Use this if you detect, that the step execution is not necessary
28:      * (e.g. disabled by config, no entity to process, ...)

ERROR: Unable to parse file: /code/src/Middleware/WorkflowStepDependencyCheck.php
ERROR: Parse error at line 27 column 5:

17: {
18:     /**
19:      * @throws ReflectionException
20:      * @throws WorkflowStepDependencyNotFulfilledException
21:      */
22:     public function __invoke(
23:         callable $next,
24:         WorkflowControl $control,
25:         WorkflowContainer $container,
26:         WorkflowStep $step,
27:     ) {
        ^
28:         $containerParameter = (new ReflectionMethod($step, 'run'))->getParameters()[1] ?? null;
29: 
30:         if ($containerParameter) {
31:             foreach ($containerParameter->getAttributes(
32:                     StepDependencyInterface::class,
33:                     ReflectionAttribute::IS_INSTANCEOF,
34:                 ) as $dependencyAttribute
35:             ) {
36:                 /** @var StepDependencyInterface $dependency */
37:                 $dependency = $dependencyAttribute->newInstance();

ERROR: Unable to parse file: /code/src/Middleware/ProfileStep.php
ERROR: Parse error at line 15 column 27:

 5: namespace PHPWorkflow\Middleware;
 6: 
 7: use Exception;
 8: use PHPWorkflow\WorkflowControl;
 9: 
10: class ProfileStep
11: {
12:     public function __invoke(callable $next, WorkflowControl $control)
13:     {
14:         $start = microtime(true);
15:         $profile = fn () => $control->attachStepInfo(
                              ^
16:             "Step execution time: " . number_format(1000 * (microtime(true) - $start), 5) . 'ms',
17:         );
18: 
19:         try {
20:             $result = $next();
21:             $profile();
22:         } catch (Exception $exception) {
23:             $profile();
24:             throw $exception;
25:         }

ERROR: Unable to parse file: /code/src/Stage/Validate.php
ERROR: Parse error at line 24 column 13:

14: use PHPWorkflow\Step\WorkflowStep;
15: use PHPWorkflow\Validator;
16: 
17: class Validate extends Stage
18: {
19:     use
20:         AllowNextBefore,
21:         AllowNextProcess;
22: 
23:     /** @var Validator[] */
24:     private array $validators = [];
                ^
25: 
26:     public function validate(WorkflowStep $step, bool $hardValidator = false): self
27:     {
28:         $this->validators[] = new Validator($step, $hardValidator);
29:         return $this;
30:     }
31: 
32:     protected function runStage(WorkflowState $workflowState): ?Stage
33:     {
34:         $workflowState->setStage(WorkflowState::STAGE_VALIDATE);

ERROR: Unable to parse file: /code/src/Stage/Stage.php
ERROR: Parse error at line 15 column 15:

 5: namespace PHPWorkflow\Stage;
 6: 
 7: use PHPWorkflow\State\WorkflowState;
 8: use PHPWorkflow\Step\StepExecutionTrait;
 9: use PHPWorkflow\Workflow;
10: 
11: abstract class Stage
12: {
13:     use StepExecutionTrait;
14: 
15:     protected ?Stage $nextStage = null;
                  ^
16:     protected Workflow $workflow;
17: 
18:     public function __construct(Workflow $workflow)
19:     {
20:         $this->workflow = $workflow;
21:     }
22: 
23:     abstract protected function runStage(WorkflowState $workflowState): ?Stage;
24: }
25: 

ERROR: Unable to parse file: /code/src/Stage/MultiStepStage.php
ERROR: Parse error at line 15 column 13:

 5: namespace PHPWorkflow\Stage;
 6: 
 7: use PHPWorkflow\State\WorkflowState;
 8: use PHPWorkflow\Step\WorkflowStep;
 9: 
10: abstract class MultiStepStage extends Stage
11: {
12:     protected const STAGE = 0;
13: 
14:     /** @var WorkflowStep[] */
15:     private array $steps = [];
                ^
16: 
17:     protected function addStep(WorkflowStep $step): self
18:     {
19:         $this->steps[] = $step;
20:         return $this;
21:     }
22: 
23:     protected function runStage(WorkflowState $workflowState): ?Stage
24:     {
25:         $workflowState->setStage(static::STAGE);

ERROR: Unable to parse file: /code/src/Stage/Next/AllowNextExecuteWorkflow.php
ERROR: Parse error at line 31 column 9:

21:     ): WorkflowResult {
22:         if (!$workflowContainer) {
23:             $workflowContainer = new WorkflowContainer();
24:         }
25: 
26:         $workflowContainer->set(
27:             '__internalExecutionConfiguration',
28:             [
29:                 'throwOnFailure' => $throwOnFailure,
30:             ],
31:         );
            ^
32: 
33:         $workflowState = new WorkflowState($workflowContainer);
34: 
35:         try {
36:             $workflowState->getExecutionLog()->startExecution();
37: 
38:             $this->workflow->runStage($workflowState);
39: 
40:             $workflowState->getExecutionLog()->stopExecution();
41:             $workflowState->setStage(WorkflowState::STAGE_SUMMARY);

INFO: 54/54 source files have been analyzed
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.504s
INFO: Final Memory: 11M/95M
INFO: ------------------------------------------------------------------------