Skip to content

Commit 8d85792

Browse files
authored
Add missing reportFieldsWhereDeclared field parameter to DoctrineOrmMappingsPass methods (#1694)
1 parent f573fa8 commit 8d85792

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

DependencyInjection/Compiler/DoctrineOrmMappingsPass.php

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -117,44 +117,46 @@ public static function createPhpMappingDriver(array $namespaces, array $managerP
117117
}
118118

119119
/**
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
130131
*
131132
* @return self
132133
*/
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)
134135
{
135136
$reader = new Reference('annotation_reader');
136-
$driver = new Definition(AnnotationDriver::class, [$reader, $directories]);
137+
$driver = new Definition(AnnotationDriver::class, [$reader, $directories, $reportFieldsWhereDeclared]);
137138

138139
return new DoctrineOrmMappingsPass($driver, $namespaces, $managerParameters, $enabledParameter, $aliasMap);
139140
}
140141

141142
/**
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
152154
*
153155
* @return self
154156
*/
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)
156158
{
157-
$driver = new Definition(AttributeDriver::class, [$directories]);
159+
$driver = new Definition(AttributeDriver::class, [$directories, $reportFieldsWhereDeclared]);
158160

159161
return new DoctrineOrmMappingsPass($driver, $namespaces, $managerParameters, $enabledParameter, $aliasMap);
160162
}

0 commit comments

Comments
 (0)