The new Symfony workflow component - define allowed workflow steps

Code
<?php

use Symfony\Component\Workflow\Workflow;
use 
Symfony\Component\Workflow\Definition;
use 
Symfony\Component\Workflow\Transition;

$transition1 = new Transition('enqueue''new''enqueued');
$transition2 = new Transition('import''enqueued''imported');

$definition = new Definition([
    
'new',
    
'enqueued',
    
'imported',
], [
    
$transition1,
    
$transition2,
]);

$workflow = new Workflow($definitionnullnull'file import');

$status = new class() {
    public 
$marking;
};

// execute code to enqueue subject and change status
$workflow->apply($status'enqueue');
// run import code and change status
$workflow->apply($status'import');

dump($status);

// enqueue task... wait this shouldn't be allowed because
// it is marked as already imported
try {
    
$workflow->apply($status'enqueue');
} catch (
Exception $e) {
    echo 
$e->getMessage();
}
Result
@anonymous {#367
+marking: array:1 [
"imported" => 1
]
}

Unable to apply transition "enqueue" for workflow "file import".
Used Versions
PHP 7.1, Zend 3.0, Symfony 3.2, Laravel 5.2, PHPUnit 5.6, Doctrine 2.6