Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7dbcb7c

Browse filesBrowse files
ReDnAxExabbuh
authored andcommitted
Update form_dependencies.rst: fix DI
Fix service definitions for `__construct(EntityManager $em)` argument
1 parent 910af9c commit 7dbcb7c
Copy full SHA for 7dbcb7c

File tree

Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed

‎form/form_dependencies.rst

Copy file name to clipboardExpand all lines: form/form_dependencies.rst
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ Next, register this as a service and tag it with ``form.type``:
100100
services:
101101
app.form.type.task:
102102
class: AppBundle\Form\TaskType
103+
arguments: ['@doctrine.orm.entity_manager']
103104
tags:
104105
- { name: form.type, alias: app_task }
105106
@@ -113,6 +114,7 @@ Next, register this as a service and tag it with ``form.type``:
113114
114115
<services>
115116
<service id="app.form.type.task" class="AppBundle\Form\TaskType">
117+
<argument type="service" id="doctrine.orm.entity_manager"/>
116118
<tag name="form.type" alias="app_task" />
117119
</service>
118120
</services>
@@ -126,6 +128,7 @@ Next, register this as a service and tag it with ``form.type``:
126128
'app.form.type.task',
127129
'AppBundle\Form\TaskType'
128130
)
131+
->addArgument('@doctrine.orm.entity_manager')
129132
->addTag('form.type', array(
130133
'alias' => 'app_task',
131134
))

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.