@@ -117,44 +117,46 @@ public static function createPhpMappingDriver(array $namespaces, array $managerP
117
117
}
118
118
119
119
/**
120
- * @param string[] $namespaces List of namespaces that are handled with annotation mapping
121
- * @param string[] $directories List of directories to look for annotated classes
122
- * @param string[] $managerParameters List of parameters that could which object manager name
123
- * your bundle uses. This compiler pass will automatically
124
- * append the parameter name for the default entity manager
125
- * to this list.
126
- * @param string|false $enabledParameter Service container parameter that must be present to
127
- * enable the mapping. Set to false to not do any check,
128
- * optional.
129
- * @param string[] $aliasMap Map of alias to namespace.
120
+ * @param string[] $namespaces List of namespaces that are handled with annotation mapping
121
+ * @param string[] $directories List of directories to look for annotated classes
122
+ * @param string[] $managerParameters List of parameters that could which object manager name
123
+ * your bundle uses. This compiler pass will automatically
124
+ * append the parameter name for the default entity manager
125
+ * to this list.
126
+ * @param string|false $enabledParameter Service container parameter that must be present to
127
+ * enable the mapping. Set to false to not do any check,
128
+ * optional.
129
+ * @param string[] $aliasMap Map of alias to namespace.
130
+ * @param bool $reportFieldsWhereDeclared Will report fields for the classes where they are declared
130
131
*
131
132
* @return self
132
133
*/
133
- public static function createAnnotationMappingDriver (array $ namespaces , array $ directories , array $ managerParameters = [], $ enabledParameter = false , array $ aliasMap = [])
134
+ public static function createAnnotationMappingDriver (array $ namespaces , array $ directories , array $ managerParameters = [], $ enabledParameter = false , array $ aliasMap = [], bool $ reportFieldsWhereDeclared = false )
134
135
{
135
136
$ reader = new Reference ('annotation_reader ' );
136
- $ driver = new Definition (AnnotationDriver::class, [$ reader , $ directories ]);
137
+ $ driver = new Definition (AnnotationDriver::class, [$ reader , $ directories, $ reportFieldsWhereDeclared ]);
137
138
138
139
return new DoctrineOrmMappingsPass ($ driver , $ namespaces , $ managerParameters , $ enabledParameter , $ aliasMap );
139
140
}
140
141
141
142
/**
142
- * @param string[] $namespaces List of namespaces that are handled with annotation mapping
143
- * @param string[] $directories List of directories to look for annotated classes
144
- * @param string[] $managerParameters List of parameters that could which object manager name
145
- * your bundle uses. This compiler pass will automatically
146
- * append the parameter name for the default entity manager
147
- * to this list.
148
- * @param string|false $enabledParameter Service container parameter that must be present to
149
- * enable the mapping. Set to false to not do any check,
150
- * optional.
151
- * @param string[] $aliasMap Map of alias to namespace.
143
+ * @param string[] $namespaces List of namespaces that are handled with annotation mapping
144
+ * @param string[] $directories List of directories to look for annotated classes
145
+ * @param string[] $managerParameters List of parameters that could which object manager name
146
+ * your bundle uses. This compiler pass will automatically
147
+ * append the parameter name for the default entity manager
148
+ * to this list.
149
+ * @param string|false $enabledParameter Service container parameter that must be present to
150
+ * enable the mapping. Set to false to not do any check,
151
+ * optional.
152
+ * @param string[] $aliasMap Map of alias to namespace.
153
+ * @param bool $reportFieldsWhereDeclared Will report fields for the classes where they are declared
152
154
*
153
155
* @return self
154
156
*/
155
- public static function createAttributeMappingDriver (array $ namespaces , array $ directories , array $ managerParameters = [], $ enabledParameter = false , array $ aliasMap = [])
157
+ public static function createAttributeMappingDriver (array $ namespaces , array $ directories , array $ managerParameters = [], $ enabledParameter = false , array $ aliasMap = [], bool $ reportFieldsWhereDeclared = false )
156
158
{
157
- $ driver = new Definition (AttributeDriver::class, [$ directories ]);
159
+ $ driver = new Definition (AttributeDriver::class, [$ directories, $ reportFieldsWhereDeclared ]);
158
160
159
161
return new DoctrineOrmMappingsPass ($ driver , $ namespaces , $ managerParameters , $ enabledParameter , $ aliasMap );
160
162
}
0 commit comments