8000 minor #52231 [TwigBridge] Update UndefinedCallableHandler (importmap,… · symfony/symfony@f95aaed · GitHub
[go: up one dir, main page]

Skip to content

Commit f95aaed

Browse files
committed
minor #52231 [TwigBridge] Update UndefinedCallableHandler (importmap, form and worflow) (smnandre)
This PR was merged into the 6.4 branch. Discussion ---------- [TwigBridge] Update UndefinedCallableHandler (importmap, form and worflow) | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | License | MIT The [UndefinedCallableHandler](https://github.com/symfony/symfony/blob/6.4/src/Symfony/Bridge/Twig/UndefinedCallableHandler.php) help DX by suggesting the missing packages to install when a Twig function / filter is used in template. This PR updates the list of those callbacks with the recent additions in TwigBridge. Commits ------- f903ab1 Update UndefinedCallableHandler with "importmap", "form" and "worflow" filters/functions
2 parents b9334ab + f903ab1 commit f95aaed

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Symfony/Bridge/Twig/UndefinedCallableHandler.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class UndefinedCallableHandler
2424
{
2525
private const FILTER_COMPONENTS = [
2626
'humanize' => 'form',
27+
'form_encode_currency' => 'form',
2728
'trans' => 'translation',
2829
'sanitize_html' => 'html-sanitizer',
2930
'yaml_encode' => 'yaml',
@@ -33,6 +34,7 @@ class UndefinedCallableHandler
3334
private const FUNCTION_COMPONENTS = [
3435
'asset' => 'asset',
3536
'asset_version' => 'asset',
37+
'importmap' => 'asset-mapper',
3638
'dump' => 'debug-bundle',
3739
'encore_entry_link_tags' => 'webpack-encore-bundle',
3840
'encore_entry_script_tags' => 'webpack-encore-bundle',
@@ -47,6 +49,13 @@ class UndefinedCallableHandler
4749
'form_start' => 'form',
4850
'form_end' => 'form',
4951
'csrf_token' => 'form',
52+
'form_parent' => 'form',
53+
'field_name' => 'form',
54+
'field_value' => 'form',
55+
'field_label' => 'form',
56+
'field_help' => 'form',
57+
'field_errors' => 'form',
58+
'field_choices' => 'form',
5059
'logout_url' => 'security-http',
5160
'logout_path' => 'security-http',
5261
'is_granted' => 'security-core',
@@ -58,8 +67,11 @@ class UndefinedCallableHandler
5867
'prerender' => 'web-link',
5968
'workflow_can' => 'workflow',
6069
'workflow_transitions' => 'workflow',
70+
'workflow_transition' => 'workflow',
6171
'workflow_has_marked_place' => 'workflow',
6272
'workflow_marked_places' => 'workflow',
73+
'workflow_metadata' => 'workflow',
74+
'workflow_transition_blockers' => 'workflow',
6375
];
6476

6577
private const FULL_STACK_ENABLE = [

0 commit comments

Comments
 (0)
0