Skip to content

Commit ead6e72

Browse files
committed
Merge pull request #1802 from mahmouds/fixing-docrine-dbal-mapping-types
fixing doctrine dbal mapping types xml,php tabs
2 parents 9dded7f + 259aea5 commit ead6e72

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

cookbook/doctrine/dbal.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,8 @@ mapping types, read Doctrine's `Custom Mapping Types`_ section of their document
108108
109109
<doctrine:config>
110110
<doctrine:dbal>
111-
<doctrine:dbal default-connection="default">
112-
<doctrine:connection>
113-
<doctrine:mapping-type name="enum">string</doctrine:mapping-type>
114-
</doctrine:connection>
111+
<doctrine:type name="custom_first" class="Acme\HelloBundle\Type\CustomFirst" />
112+
<doctrine:type name="custom_second" class="Acme\HelloBundle\Type\CustomSecond" />
115113
</doctrine:dbal>
116114
</doctrine:config>
117115
</container>
@@ -121,12 +119,9 @@ mapping types, read Doctrine's `Custom Mapping Types`_ section of their document
121119
// app/config/config.php
122120
$container->loadFromExtension('doctrine', array(
123121
'dbal' => array(
124-
'connections' => array(
125-
'default' => array(
126-
'mapping_types' => array(
127-
'enum' => 'string',
128-
),
129-
),
122+
'types' => array(
123+
'custom_first' => 'Acme\HelloBundle\Type\CustomFirst',
124+
'custom_second' => 'Acme\HelloBundle\Type\CustomSecond',
130125
),
131126
),
132127
));
@@ -165,8 +160,10 @@ mapping type:
165160
166161
<doctrine:config>
167162
<doctrine:dbal>
168-
<doctrine:type name="custom_first" class="Acme\HelloBundle\Type\CustomFirst" />
169-
<doctrine:type name="custom_second" class="Acme\HelloBundle\Type\CustomSecond" />
163+
<doctrine:dbal default-connection="default">
164+
<doctrine:connection>
165+
<doctrine:mapping-type name="enum">string</doctrine:mapping-type>
166+
</doctrine:connection>
170167
</doctrine:dbal>
171168
</doctrine:config>
172169
</container>
@@ -176,9 +173,12 @@ mapping type:
176173
// app/config/config.php
177174
$container->loadFromExtension('doctrine', array(
178175
'dbal' => array(
179-
'types' => array(
180-
'custom_first' => 'Acme\HelloBundle\Type\CustomFirst',
181-
'custom_second' => 'Acme\HelloBundle\Type\CustomSecond',
176+
'connections' => array(
177+
'default' => array(
178+
'mapping_types' => array(
179+
'enum' => 'string',
180+
),
181+
),
182182
),
183183
),
184184
));

0 commit comments

Comments
 (0)