@@ -9,7 +9,7 @@ with Doctrine Resolve Target Entity Listener option).
99
1010Example:
1111
12- ``` yml
12+ ``` yaml
1313namespaces :
1414 entity : " Dunglas\E commerceBundle\E ntity"
1515 enum : " Dunglas\E commerceBundle\E num"
@@ -20,7 +20,7 @@ Namespaces can also be specified for a specific type. It will take precedence ov
2020
2121Example:
2222
23- ` ` ` yml
23+ ` ` ` yaml
2424types :
2525 Thing :
2626 namespaces :
@@ -37,7 +37,7 @@ Schema.org definition).
3737
3838Example :
3939
40- ` ` ` yml
40+ ` ` ` yaml
4141types:
4242 Brand:
4343 properties:
@@ -61,7 +61,7 @@ Cardinalities are enforced by the class generator, the Doctrine ORM generator an
6161
6262Example :
6363
64- ` ` ` yml
64+ ` ` ` yaml
6565types:
6666 Product:
6767 properties:
@@ -75,7 +75,7 @@ Override the guessed class hierarchy of a given type with this option.
7575
7676Example :
7777
78- ` ` ` yml
78+ ` ` ` yaml
7979 ImageObject:
8080 parent: Thing # Force the parent to be Thing instead of CreativeWork > MediaObject
8181 properties: ~
@@ -89,7 +89,7 @@ Add a `@author` PHPDoc annotation to class' DocBlock.
8989
9090Example :
9191
92- ` ` ` yml
92+ ` ` ` yaml
9393author: "Kévin Dunglas <[email protected] >" 9494` ` `
9595
@@ -99,7 +99,7 @@ By default, all generators are enabled. You can specify the list of generators t
9999
100100Example (enabling only the PHPDoc generator) :
101101
102- ` ` ` yml
102+ ` ` ` yaml
103103annotationGenerators:
104104 - SchemaOrgModel\A nnotationGenerator\P hpDocAnnotationGenerator
105105` ` `
@@ -110,7 +110,7 @@ useful when creating your own generators.
110110
111111Enabling a custom generator and the PHPDoc generator :
112112
113- ` ` ` yml
113+ ` ` ` yaml
114114annotationGenerators:
115115 - SchemaOrgModel\A nnotationGenerator\P hpDocAnnotationGenerator
116116 - Acme\G enerators\M yGenerator
@@ -122,7 +122,7 @@ By default, the generator add a property called `id` not provided by Schema.org.
122122with an ORM or an ODM.
123123This behavior can be disabled with the following setting :
124124
125- ` ` ` yml
125+ ` ` ` yaml
126126generateId: false
127127` ` `
128128
@@ -132,8 +132,9 @@ By default, the generator use classes provided by the [Doctrine Collections](htt
132132to store collections of entities. This is useful (and required) when using Doctrine ORM or Doctrine ODM.
133133This behavior can be disabled (to fallback to standard arrays) with the following setting :
134134
135- ` ` ` yml
136- useDoctrineCollection: false
135+ ` ` ` yaml
136+ doctrine:
137+ useCollection: false
137138` ` `
138139
139140# # Custom field visibility
@@ -143,7 +144,7 @@ The default visibility can be changed with the `fieldVisibility` otion.
143144
144145Example :
145146
146- ` ` ` yml
147+ ` ` ` yaml
147148fieldVisibility: "protected"
148149` ` `
149150
@@ -154,7 +155,7 @@ The standard behavior of the generator is to use the `@MappedSuperclass` Doctrin
154155
155156The inheritance annotation can be forced for a given type like the following :
156157
157- ` ` ` yml
158+ ` ` ` yaml
158159types:
159160 Product:
160161 doctrine:
@@ -172,6 +173,12 @@ mappings.
172173If you set the option `useInterface` to true, the generator will generate an interface corresponding to each generated
173174entity and will use them in relation mappings.
174175
176+ To let PHP Schema generating the XML mapping file usable with Symfony add the following to your config file :
177+
178+ ` ` ` yaml
179+ doctrine:
180+ resolveTargetEntityConfigPath: path/to/doctrine.xml
181+ ` ` `
175182
176183# # Custom schemas
177184
@@ -181,7 +188,7 @@ to generate the PHP data model of your application.
181188
182189Example :
183190
184- ` ` ` yml
191+ ` ` ` yaml
185192rdfa:
186193 - https://raw.githubusercontent.com/rvguha/schemaorg/master/data/schema.rdfa # Experimental version of Schema.org
187194 - http://example.com/data/myschema.rfa # Additional types
@@ -202,7 +209,7 @@ Prepend all generated PHP files with a custom comment.
202209
203210Example :
204211
205- ` ` ` yml
212+ ` ` ` yaml
206213header: |
207214 /*
208215 * This file is part of the Ecommerce package.
@@ -222,7 +229,7 @@ header: |
222229rdfa:
223230
224231 # Default:
225- - https ://raw.githubusercontent.com/rvguha/schemaorg/master/data/schema.rdfa
232+ - http ://schema.org/docs/schema_org_rdfa.html
226233
227234# OWL relation files to use
228235relations:
@@ -239,9 +246,6 @@ generateId: true
239246# Generate interfaces and use Doctrine's Resolve Target Entity feature
240247useInterface: false
241248
242- # Use Doctrine's ArrayCollection instead of standard arrays
243- useDoctrineCollection: true
244-
245249# Emit a warning if a property is not derived from GoodRelations
246250checkIsGoodRelations: false
247251
@@ -260,6 +264,15 @@ namespaces:
260264 # The namespace of the generated interfaces
261265 interface: SchemaOrg\M odel # Example: Acme\M odel
262266
267+ # Doctrine
268+ doctrine:
269+
270+ # Use Doctrine's ArrayCollection instead of standard arrays
271+ useCollection: true
272+
273+ # The Resolve Target Entity Listener config file pass
274+ resolveTargetEntityConfigPath: null
275+
263276# The value of the phpDoc's @author annotation
264277author: false # Example: Kévin Dunglas <[email protected] > 265278
0 commit comments