File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Tests/DependencyInjection Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 9292use Symfony \Component \Validator \Validator \ValidatorInterface ;
9393use Symfony \Component \Webhook \Client \RequestParser ;
9494use Symfony \Component \Webhook \Controller \WebhookController ;
95+ use Symfony \Component \Workflow \DependencyInjection \WorkflowValidatorPass ;
9596use Symfony \Component \Workflow \Exception \InvalidDefinitionException ;
9697use Symfony \Component \Workflow \Metadata \InMemoryMetadataStore ;
9798use Symfony \Component \Workflow \WorkflowEvents ;
@@ -291,7 +292,7 @@ public function testWorkflows()
291292 DefinitionValidator::$ called = false ;
292293
293294 $ container = $ this ->createContainerFromFile ('workflows ' , compile: false );
294- $ container ->addCompilerPass (new \ Symfony \ Component \ Workflow \ DependencyInjection \ WorkflowValidatorPass ());
295+ $ container ->addCompilerPass (new WorkflowValidatorPass ());
295296 $ container ->compile ();
296297
297298 $ this ->assertTrue ($ container ->hasDefinition ('workflow.article ' ), 'Workflow is registered as a service ' );
@@ -410,7 +411,7 @@ public function testWorkflowAreValidated()
410411 $ this ->expectException (InvalidDefinitionException::class);
411412 $ this ->expectExceptionMessage ('A transition from a place/state must have an unique name. Multiple transitions named "go" from place/state "first" were found on StateMachine "my_workflow". ' );
412413 $ container = $ this ->createContainerFromFile ('workflow_not_valid ' , compile: false );
413- $ container ->addCompilerPass (new \ Symfony \ Component \ Workflow \ DependencyInjection \ WorkflowValidatorPass ());
414+ $ container ->addCompilerPass (new WorkflowValidatorPass ());
414415 $ container ->compile ();
415416 }
416417
Original file line number Diff line number Diff line change 2020use Symfony \Component \RateLimiter \CompoundRateLimiterFactory ;
2121use Symfony \Component \RateLimiter \RateLimiterFactoryInterface ;
2222use Symfony \Component \Validator \Constraints \Email ;
23+ use Symfony \Component \Workflow \Definition ;
24+ use Symfony \Component \Workflow \DependencyInjection \WorkflowValidatorPass ;
2325use Symfony \Component \Workflow \Exception \InvalidDefinitionException ;
26+ use Symfony \Component \Workflow \Validator \DefinitionValidatorInterface ;
2427
2528class PhpFrameworkExtensionTest extends FrameworkExtensionTestCase
2629{
@@ -128,7 +131,7 @@ public function testWorkflowValidationStateMachine()
128131 ],
129132 ],
130133 ]);
131- $ container ->addCompilerPass (new \ Symfony \ Component \ Workflow \ DependencyInjection \ WorkflowValidatorPass ());
134+ $ container ->addCompilerPass (new WorkflowValidatorPass ());
132135 });
133136 }
134137
@@ -456,13 +459,13 @@ public static function emailValidationModeProvider()
456459 }
457460}
458461
459- class WorkflowValidatorWithConstructor implements \ Symfony \ Component \ Workflow \ Validator \ DefinitionValidatorInterface
462+ class WorkflowValidatorWithConstructor implements DefinitionValidatorInterface
460463{
461464 public function __construct (bool $ enabled )
462465 {
463466 }
464467
465- public function validate (\ Symfony \ Component \ Workflow \ Definition $ definition , string $ name ): void
468+ public function validate (Definition $ definition , string $ name ): void
466469 {
467470 }
468471}
You can’t perform that action at this time.
0 commit comments