21
21
use TheCodingMachine \GraphQLite \GraphQLRuntimeException ;
22
22
use TheCodingMachine \GraphQLite \InputTypeGenerator ;
23
23
use TheCodingMachine \GraphQLite \InputTypeUtils ;
24
+ use TheCodingMachine \GraphQLite \Loggers \ExceptionLogger ;
24
25
use TheCodingMachine \GraphQLite \Mappers \CannotMapTypeException ;
25
26
use TheCodingMachine \GraphQLite \Mappers \CompositeTypeMapper ;
26
27
use TheCodingMachine \GraphQLite \Mappers \GlobTypeMapper ;
@@ -140,17 +141,21 @@ public function createContainer(array $overloadedServices = []): ContainerInterf
140
141
return new VoidAuthenticationService ();
141
142
},
142
143
RecursiveTypeMapperInterface::class => function (ContainerInterface $ container ) {
144
+ $ arrayAdapter = new ArrayAdapter ();
145
+ $ arrayAdapter ->setLogger (new ExceptionLogger ());
143
146
return new RecursiveTypeMapper (
144
147
$ container ->get (TypeMapperInterface::class),
145
148
$ container ->get (NamingStrategyInterface::class),
146
- new Psr16Cache (new ArrayAdapter () ),
149
+ new Psr16Cache ($ arrayAdapter ),
147
150
$ container ->get (TypeRegistry::class)
148
151
);
149
152
},
150
153
TypeMapperInterface::class => function (ContainerInterface $ container ) {
151
154
return new CompositeTypeMapper ();
152
155
},
153
156
GlobTypeMapper::class => function (ContainerInterface $ container ) {
157
+ $ arrayAdapter = new ArrayAdapter ();
158
+ $ arrayAdapter ->setLogger (new ExceptionLogger ());
154
159
return new GlobTypeMapper ('TheCodingMachine \\GraphQLite \\Fixtures \\Integration \\Types ' ,
155
160
$ container ->get (TypeGenerator::class),
156
161
$ container ->get (InputTypeGenerator::class),
@@ -159,10 +164,12 @@ public function createContainer(array $overloadedServices = []): ContainerInterf
159
164
$ container ->get (AnnotationReader::class),
160
165
$ container ->get (NamingStrategyInterface::class),
161
166
$ container ->get (RecursiveTypeMapperInterface::class),
162
- new Psr16Cache (new ArrayAdapter () )
167
+ new Psr16Cache ($ arrayAdapter )
163
168
);
164
169
},
165
170
GlobTypeMapper::class.'2 ' => function (ContainerInterface $ container ) {
171
+ $ arrayAdapter = new ArrayAdapter ();
172
+ $ arrayAdapter ->setLogger (new ExceptionLogger ());
166
173
return new GlobTypeMapper ('TheCodingMachine \\GraphQLite \\Fixtures \\Integration \\Models ' ,
167
174
$ container ->get (TypeGenerator::class),
168
175
$ container ->get (InputTypeGenerator::class),
@@ -171,7 +178,7 @@ public function createContainer(array $overloadedServices = []): ContainerInterf
171
178
$ container ->get (AnnotationReader::class),
172
179
$ container ->get (NamingStrategyInterface::class),
173
180
$ container ->get (RecursiveTypeMapperInterface::class),
174
- new Psr16Cache (new ArrayAdapter () )
181
+ new Psr16Cache ($ arrayAdapter )
175
182
);
176
183
},
177
184
PorpaginasTypeMapper::class => function (ContainerInterface $ container ) {
@@ -209,7 +216,9 @@ public function createContainer(array $overloadedServices = []): ContainerInterf
209
216
return new NamingStrategy ();
210
217
},
211
218
CachedDocBlockFactory::class => function () {
212
- return new CachedDocBlockFactory (new Psr16Cache (new ArrayAdapter ()));
219
+ $ arrayAdapter = new ArrayAdapter ();
220
+ $ arrayAdapter ->setLogger (new ExceptionLogger ());
221
+ return new CachedDocBlockFactory (new Psr16Cache ($ arrayAdapter ));
213
222
},
214
223
RootTypeMapperInterface::class => function (ContainerInterface $ container ) {
215
224
return new NullableTypeMapperAdapter ();
@@ -1369,7 +1378,9 @@ public function getUser(): ?object
1369
1378
1370
1379
public function testInputOutputNameConflict (): void
1371
1380
{
1372
- $ schemaFactory = new SchemaFactory (new Psr16Cache (new ArrayAdapter ()), new BasicAutoWiringContainer (new EmptyContainer ()));
1381
+ $ arrayAdapter = new ArrayAdapter ();
1382
+ $ arrayAdapter ->setLogger (new ExceptionLogger ());
1383
+ $ schemaFactory = new SchemaFactory (new Psr16Cache ($ arrayAdapter ), new BasicAutoWiringContainer (new EmptyContainer ()));
1373
1384
$ schemaFactory ->addControllerNamespace ('TheCodingMachine \\GraphQLite \\Fixtures \\InputOutputNameConflict \\Controllers ' );
1374
1385
$ schemaFactory ->addTypeNamespace ('TheCodingMachine \\GraphQLite \\Fixtures \\InputOutputNameConflict \\Types ' );
1375
1386
0 commit comments