|
21 | 21 | /** |
22 | 22 | * @property-read stdClass $config |
23 | 23 | * @phpstan-type TManagerConfig object{ |
24 | | - * entityManagerDecoratorClass: string, |
| 24 | + * entityManagerDecoratorClass: string|null, |
25 | 25 | * configurationClass: string, |
26 | 26 | * lazyNativeObjects: bool|null, |
27 | 27 | * proxyDir: string|null, |
28 | 28 | * autoGenerateProxyClasses: int|bool|Statement, |
29 | 29 | * proxyNamespace: string|null, |
30 | | - * metadataDriverImpl: string, |
| 30 | + * metadataDriverImpl: string|null, |
31 | 31 | * entityNamespaces: array<string, string>, |
32 | 32 | * resolveTargetEntities: array<string, string>, |
33 | 33 | * customStringFunctions: array<string, string>, |
34 | 34 | * customNumericFunctions: array<string, string>, |
35 | 35 | * customDatetimeFunctions: array<string, string>, |
36 | 36 | * customHydrationModes: array<string, string>, |
37 | | - * classMetadataFactoryName: string, |
38 | | - * defaultRepositoryClassName: string, |
| 37 | + * classMetadataFactoryName: string|null, |
| 38 | + * defaultRepositoryClassName: string|null, |
39 | 39 | * namingStrategy: string|Statement|null, |
40 | 40 | * quoteStrategy: string|Statement|null, |
41 | 41 | * entityListenerResolver: string|Statement|null, |
42 | 42 | * repositoryFactory: string|Statement|null, |
43 | 43 | * defaultQueryHints: array<string, mixed>, |
44 | 44 | * filters: array<string, object{class: string, enabled: bool}>, |
45 | | - * mapping: array<string, object{type: 'attributes'|'xml', directories: string[], namespace: string}>, |
| 45 | + * mapping: array<string, object{type: 'attributes'|'xml', directories: string[], namespace: string, options: object{fileExtension: string, xsdValidation: bool}}>, |
46 | 46 | * defaultCache: string|Statement|null, |
47 | 47 | * queryCache: string|Statement|null, |
48 | 48 | * resultCache: string|Statement|null, |
@@ -128,6 +128,10 @@ public function getConfigSchema(): Schema |
128 | 128 | 'type' => Expect::anyOf('attributes', 'xml')->default('attributes'), |
129 | 129 | 'directories' => Expect::listOf(Expect::string())->min(1)->required(), |
130 | 130 | 'namespace' => Expect::string()->required(), |
| 131 | + 'options' => Expect::structure([ |
| 132 | + 'fileExtension' => Expect::string()->default('.orm.xml'), |
| 133 | + 'xsdValidation' => Expect::bool()->default(true), |
| 134 | + ]), |
131 | 135 | ]), |
132 | 136 | Expect::string() |
133 | 137 | )->default([]), |
|
0 commit comments