Skip to content

Commit 0d93600

Browse files
committed
feature #23694 [Form] Add debug:form command (yceruto)
This PR was merged into the 3.4 branch. Discussion ---------- [Form] Add debug:form command | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony/symfony#23688 | License | MIT | Doc PR | - ![debug-form](https://user-images.githubusercontent.com/2028198/29007125-c3508cd6-7aca-11e7-91e2-c2b509847db5.png) A short class name (e.g. `DateType`) can be passed as `class` argument too (the command will try to resolve its FQCN if it's in known form type namespaces). Commits ------- 4f040d78fe Add debug:form command
2 parents 51b9f72 + a5a912c commit 0d93600

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ public function load(array $configs, ContainerBuilder $container)
220220
if (!class_exists('Symfony\Component\Validator\Validation')) {
221221
throw new LogicException('The Validator component is required to use the Form component.');
222222
}
223+
} else {
224+
$container->removeDefinition('Symfony\Component\Form\Command\DebugCommand');
223225
}
224226

225227
$this->registerSecurityCsrfConfiguration($config['csrf_protection'], $container, $loader);

Resources/config/console.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,11 @@
9696
<service id="Symfony\Bundle\FrameworkBundle\Command\YamlLintCommand">
9797
<tag name="console.command" command="lint:yaml" />
9898
</service>
99+
100+
<service id="Symfony\Component\Form\Command\DebugCommand">
101+
<argument type="service" id="form.registry" />
102+
<argument type="collection" /> <!-- All form types namespaces are stored here by FormPass -->
103+
<tag name="console.command" command="debug:form" />
104+
</service>
99105
</services>
100106
</container>

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"symfony/dom-crawler": "~2.8|~3.0|~4.0",
4141
"symfony/polyfill-intl-icu": "~1.0",
4242
"symfony/security": "~2.8|~3.0|~4.0",
43-
"symfony/form": "~3.3|~4.0",
43+
"symfony/form": "~3.4|~4.0",
4444
"symfony/expression-language": "~2.8|~3.0|~4.0",
4545
"symfony/process": "~2.8|~3.0|~4.0",
4646
"symfony/security-core": "~3.2|~4.0",

0 commit comments

Comments
 (0)