Skip to content

Commit 5327b3f

Browse files
committed
feature #37706 [Validator] Debug validator command (loic425, fabpot)
This PR was merged into the 5.2-dev branch. Discussion ---------- [Validator] Debug validator command | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> <!-- Replace this notice by a short README for your feature/bugfix. This will help people understand your PR and can be used as a start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - Never break backward compatibility (see https://symfony.com/bc). - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too.) - Features and deprecations must be submitted against branch master. --> <img width="891" alt="help" src="https://user-images.githubusercontent.com/8329789/88856285-8281ee00-d1f4-11ea-8395-6e6a4b8e4e2e.png"> <img width="945" alt="CustomerAddress" src="https://user-images.githubusercontent.com/8329789/89049509-a9a20200-d351-11ea-89cf-75e11f805aea.png"> <img width="1353" alt="Customer" src="https://user-images.githubusercontent.com/8329789/89049525-b161a680-d351-11ea-99d5-6c2ede337609.png"> Commits ------- 6ec54c7337 Fix Composer constraints for tests 5dd85e4371 [Validator] Debug validator command
2 parents 49cd49d + 852e761 commit 5327b3f

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,6 +1241,8 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder
12411241
private function registerValidationConfiguration(array $config, ContainerBuilder $container, PhpFileLoader $loader, bool $propertyInfoEnabled)
12421242
{
12431243
if (!$this->validatorConfigEnabled = $this->isConfigEnabled($container, $config)) {
1244+
$container->removeDefinition('console.command.validator_debug');
1245+
12441246
return;
12451247
}
12461248

Resources/config/console.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
use Symfony\Component\Messenger\Command\SetupTransportsCommand;
4848
use Symfony\Component\Messenger\Command\StopWorkersCommand;
4949
use Symfony\Component\Translation\Command\XliffLintCommand;
50+
use Symfony\Component\Validator\Command\DebugCommand as ValidatorDebugCommand;
5051

5152
return static function (ContainerConfigurator $container) {
5253
$container->services()
@@ -225,6 +226,12 @@
225226
])
226227
->tag('console.command', ['command' => 'translation:update'])
227228

229+
->set('console.command.validator_debug', ValidatorDebugCommand::class)
230+
->args([
231+
service('validator'),
232+
])
233+
->tag('console.command', ['command' => 'debug:validator'])
234+
228235
->set('console.command.workflow_dump', WorkflowDumpCommand::class)
229236
->tag('console.command', ['command' => 'workflow:dump'])
230237

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"symfony/string": "^5.0",
5858
"symfony/translation": "^5.0",
5959
"symfony/twig-bundle": "^4.4|^5.0",
60-
"symfony/validator": "^4.4|^5.0",
60+
"symfony/validator": "^5.2",
6161
"symfony/workflow": "^5.2",
6262
"symfony/yaml": "^4.4|^5.0",
6363
"symfony/property-info": "^4.4|^5.0",
@@ -89,7 +89,7 @@
8989
"symfony/translation": "<5.0",
9090
"symfony/twig-bridge": "<4.4",
9191
"symfony/twig-bundle": "<4.4",
92-
"symfony/validator": "<4.4",
92+
"symfony/validator": "<5.2",
9393
"symfony/web-profiler-bundle": "<4.4",
9494
"symfony/workflow": "<5.2"
9595
},

0 commit comments

Comments
 (0)