8000 use use statements instead of FQCNs · symfony/symfony@ac85904 · GitHub
[go: up one dir, main page]

Skip to content

Commit ac85904

Browse files
committed
use use statements instead of FQCNs
1 parent d23581b commit ac85904

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTestCase.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
use Symfony\Component\Validator\Validator\ValidatorInterface;
9393
use Symfony\Component\Webhook\Client\RequestParser;
9494
use Symfony\Component\Webhook\Controller\WebhookController;
95+
use Symfony\Component\Workflow\DependencyInjection\WorkflowValidatorPass;
9596
use Symfony\Component\Workflow\Exception\InvalidDefinitionException;
9697
use Symfony\Component\Workflow\Metadata\InMemoryMetadataStore;
9798
use 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

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/PhpFrameworkExtensionTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020
use Symfony\Component\RateLimiter\CompoundRateLimiterFactory;
2121
use Symfony\Component\RateLimiter\RateLimiterFactoryInterface;
2222
use Symfony\Component\Validator\Constraints\Email;
23+
use Symfony\Component\Workflow\Definition;
24+
use Symfony\Component\Workflow\DependencyInjection\WorkflowValidatorPass;
2325
use Symfony\Component\Workflow\Exception\InvalidDefinitionException;
26+
use Symfony\Component\Workflow\Validator\DefinitionValidatorInterface;
2427

2528
class 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
}

0 commit comments

Comments
 (0)
0