2121use TheCodingMachine \GraphQLite \GraphQLRuntimeException ;
2222use TheCodingMachine \GraphQLite \InputTypeGenerator ;
2323use TheCodingMachine \GraphQLite \InputTypeUtils ;
24+ use TheCodingMachine \GraphQLite \Loggers \ExceptionLogger ;
2425use TheCodingMachine \GraphQLite \Mappers \CannotMapTypeException ;
2526use TheCodingMachine \GraphQLite \Mappers \CompositeTypeMapper ;
2627use TheCodingMachine \GraphQLite \Mappers \GlobTypeMapper ;
@@ -140,17 +141,21 @@ public function createContainer(array $overloadedServices = []): ContainerInterf
140141 return new VoidAuthenticationService ();
141142 },
142143 RecursiveTypeMapperInterface::class => function (ContainerInterface $ container ) {
144+ $ arrayAdapter = new ArrayAdapter ();
145+ $ arrayAdapter ->setLogger (new ExceptionLogger ());
143146 return new RecursiveTypeMapper (
144147 $ container ->get (TypeMapperInterface::class),
145148 $ container ->get (NamingStrategyInterface::class),
146- new Psr16Cache (new ArrayAdapter () ),
149+ new Psr16Cache ($ arrayAdapter ),
147150 $ container ->get (TypeRegistry::class)
148151 );
149152 },
150153 TypeMapperInterface::class => function (ContainerInterface $ container ) {
151154 return new CompositeTypeMapper ();
152155 },
153156 GlobTypeMapper::class => function (ContainerInterface $ container ) {
157+ $ arrayAdapter = new ArrayAdapter ();
158+ $ arrayAdapter ->setLogger (new ExceptionLogger ());
154159 return new GlobTypeMapper ('TheCodingMachine \\GraphQLite \\Fixtures \\Integration \\Types ' ,
155160 $ container ->get (TypeGenerator::class),
156161 $ container ->get (InputTypeGenerator::class),
@@ -159,10 +164,12 @@ public function createContainer(array $overloadedServices = []): ContainerInterf
159164 $ container ->get (AnnotationReader::class),
160165 $ container ->get (NamingStrategyInterface::class),
161166 $ container ->get (RecursiveTypeMapperInterface::class),
162- new Psr16Cache (new ArrayAdapter () )
167+ new Psr16Cache ($ arrayAdapter )
163168 );
164169 },
165170 GlobTypeMapper::class.'2 ' => function (ContainerInterface $ container ) {
171+ $ arrayAdapter = new ArrayAdapter ();
172+ $ arrayAdapter ->setLogger (new ExceptionLogger ());
166173 return new GlobTypeMapper ('TheCodingMachine \\GraphQLite \\Fixtures \\Integration \\Models ' ,
167174 $ container ->get (TypeGenerator::class),
168175 $ container ->get (InputTypeGenerator::class),
@@ -171,7 +178,7 @@ public function createContainer(array $overloadedServices = []): ContainerInterf
171178 $ container ->get (AnnotationReader::class),
172179 $ container ->get (NamingStrategyInterface::class),
173180 $ container ->get (RecursiveTypeMapperInterface::class),
174- new Psr16Cache (new ArrayAdapter () )
181+ new Psr16Cache ($ arrayAdapter )
175182 );
176183 },
177184 PorpaginasTypeMapper::class => function (ContainerInterface $ container ) {
@@ -209,7 +216,9 @@ public function createContainer(array $overloadedServices = []): ContainerInterf
209216 return new NamingStrategy ();
210217 },
211218 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 ));
213222 },
214223 RootTypeMapperInterface::class => function (ContainerInterface $ container ) {
215224 return new NullableTypeMapperAdapter ();
@@ -1369,7 +1378,9 @@ public function getUser(): ?object
13691378
13701379 public function testInputOutputNameConflict (): void
13711380 {
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 ()));
13731384 $ schemaFactory ->addControllerNamespace ('TheCodingMachine \\GraphQLite \\Fixtures \\InputOutputNameConflict \\Controllers ' );
13741385 $ schemaFactory ->addTypeNamespace ('TheCodingMachine \\GraphQLite \\Fixtures \\InputOutputNameConflict \\Types ' );
13751386
0 commit comments