54
54
use ApiPlatform \GraphQl \Resolver \MutationResolverInterface ;
55
55
use ApiPlatform \GraphQl \Resolver \QueryCollectionResolverInterface ;
56
56
use ApiPlatform \GraphQl \Resolver \QueryItemResolverInterface ;
57
+ use ApiPlatform \GraphQl \Serializer \SerializerContextBuilderInterface as GraphQlSerializerContextBuilderInterface ;
57
58
use ApiPlatform \GraphQl \Type \Definition \TypeInterface as GraphQlTypeInterface ;
58
59
use ApiPlatform \JsonSchema \SchemaFactoryInterface ;
59
60
use ApiPlatform \JsonSchema \TypeFactoryInterface ;
@@ -409,10 +410,7 @@ public function testMetadataConfiguration(): void
409
410
410
411
// metadata/property.xml
411
412
'api_platform.metadata.property.identifier_metadata_factory ' ,
412
-
413
- // metadata/property_name.xml
414
- 'api_platform.metadata.property.name_collection_factory ' ,
415
- PropertyNameCollectionFactoryInterface::class,
413
+ 'api_platform.metadata.property.metadata_factory ' ,
416
414
417
415
// metadata/resource.xml
418
416
'api_platform.metadata.resource.metadata_collection_factory ' ,
@@ -422,9 +420,6 @@ public function testMetadataConfiguration(): void
422
420
// metadata/resource_name.xml
423
421
'api_platform.metadata.resource.name_collection_factory ' ,
424
422
ResourceNameCollectionFactoryInterface::class,
425
-
426
- // metadata/backward_compatibility.xml
427
- 'api_platform.metadata.property.metadata_factory ' ,
428
423
];
429
424
430
425
$ this ->assertContainerHas ($ services , $ aliases );
@@ -481,9 +476,6 @@ public function testSwaggerConfiguration(): void
481
476
'api_platform.swagger.listener.ui ' ,
482
477
'api_platform.swagger_ui.context ' ,
483
478
'api_platform.swagger_ui.action ' ,
484
-
485
- // v3/swagger_ui.xml
486
- 'api_platform.swagger_ui.action ' ,
487
479
];
488
480
489
481
$ aliases = [
@@ -494,12 +486,10 @@ public function testSwaggerConfiguration(): void
494
486
// openapi.xml
495
487
OpenApiNormalizer::class,
496
488
Options::class,
489
+ OpenApiFactoryInterface::class,
497
490
498
491
// swagger_ui.xml
499
492
'api_platform.swagger_ui.listener ' ,
500
-
501
- // v3/openapi.xml
502
- OpenApiFactoryInterface::class,
503
493
];
504
494
505
495
$ this ->assertContainerHas ($ services , $ aliases );
@@ -667,8 +657,6 @@ public function testGraphQlConfiguration(): void
667
657
'api_platform.graphql.subscription.subscription_identifier_generator ' ,
668
658
'api_platform.graphql.cache.subscription ' ,
669
659
'api_platform.graphql.command.export_command ' ,
670
-
671
- // v3/graphql.xml
672
660
'api_platform.graphql.resolver.stage.write ' ,
673
661
'api_platform.graphql.resolver.stage.read ' ,
674
662
'api_platform.graphql.type_converter ' ,
@@ -697,8 +685,8 @@ public function testGraphQlConfiguration(): void
697
685
];
698
686
699
687
$ aliases = [
700
- // v3/ graphql.xml
701
- \ ApiPlatform \ GraphQl \ Serializer \SerializerContextBuilderInterface ::class,
688
+ // graphql.xml
689
+ GraphQlSerializerContextBuilderInterface ::class,
702
690
];
703
691
704
692
$ this ->assertContainerHas ($ services , $ aliases );
@@ -712,81 +700,12 @@ public function testGraphQlConfiguration(): void
712
700
$ this ->assertServiceHasTags ('api_platform.graphql.fields_builder_locator ' , ['container.service_locator ' ]);
713
701
$ this ->assertServiceHasTags ('api_platform.graphql.cache.subscription ' , ['cache.pool ' ]);
714
702
$ this ->assertServiceHasTags ('api_platform.graphql.command.export_command ' , ['console.command ' ]);
715
-
716
- // v3/graphql.xml
717
- $ this ->assertServiceHasTags ('api_platform.graphql.normalizer.item ' , ['serializer.normalizer ' ]);
718
- $ this ->assertServiceHasTags ('api_platform.graphql.normalizer.object ' , ['serializer.normalizer ' ]);
719
- $ this ->assertServiceHasTags ('api_platform.graphql.normalizer.error ' , ['serializer.normalizer ' ]);
720
- $ this ->assertServiceHasTags ('api_platform.graphql.normalizer.validation_exception ' , ['serializer.normalizer ' ]);
721
- $ this ->assertServiceHasTags ('api_platform.graphql.normalizer.http_exception ' , ['serializer.normalizer ' ]);
722
- $ this ->assertServiceHasTags ('api_platform.graphql.normalizer.runtime_exception ' , ['serializer.normalizer ' ]);
723
- }
724
-
725
- public function testGraphQlConfigurationMetadataBackwardCompatibilityLayer (): void
726
- {
727
- $ config = self ::DEFAULT_CONFIG ;
728
- $ config ['api_platform ' ]['graphql ' ]['enabled ' ] = true ;
729
- (new ApiPlatformExtension ())->load ($ config , $ this ->container );
730
-
731
- $ services = [
732
- // graphql.xml
733
- 'api_platform.graphql.executor ' ,
734
- 'api_platform.graphql.resolver.factory.item ' ,
735
- 'api_platform.graphql.resolver.factory.collection ' ,
736
- 'api_platform.graphql.resolver.factory.item_mutation ' ,
737
- 'api_platform.graphql.resolver.factory.item_subscription ' ,
738
- 'api_platform.graphql.resolver.stage.read ' ,
739
- 'api_platform.graphql.resolver.stage.security ' ,
740
- 'api_platform.graphql.resolver.stage.security_post_denormalize ' ,
741
- 'api_platform.graphql.resolver.stage.serialize ' ,
742
- 'api_platform.graphql.resolver.stage.deserialize ' ,
743
- 'api_platform.graphql.resolver.stage.write ' ,
744
- 'api_platform.graphql.resolver.stage.validate ' ,
745
- 'api_platform.graphql.resolver.resource_field ' ,
746
- 'api_platform.graphql.query_resolver_locator ' ,
747
- 'api_platform.graphql.mutation_resolver_locator ' ,
748
- 'api_platform.graphql.iterable_type ' ,
749
- 'api_platform.graphql.upload_type ' ,
750
- 'api_platform.graphql.type_locator ' ,
751
- 'api_platform.graphql.types_container ' ,
752
- 'api_platform.graphql.type_converter ' ,
753
- 'api_platform.graphql.type_builder ' ,
754
- 'api_platform.graphql.fields_builder ' ,
755
- 'api_platform.graphql.fields_builder_locator ' ,
756
- 'api_platform.graphql.schema_builder ' ,
757
- 'api_platform.graphql.action.entrypoint ' ,
758
- 'api_platform.graphql.action.graphiql ' ,
759
- 'api_platform.graphql.action.graphql_playground ' ,
760
- 'api_platform.graphql.normalizer.item ' ,
761
- 'api_platform.graphql.normalizer.object ' ,
762
- 'api_platform.graphql.normalizer.error ' ,
763
- 'api_platform.graphql.normalizer.validation_exception ' ,
764
- 'api_platform.graphql.normalizer.http_exception ' ,
765
- 'api_platform.graphql.normalizer.runtime_exception ' ,
766
- 'api_platform.graphql.serializer.context_builder ' ,
767
- 'api_platform.graphql.subscription.subscription_manager ' ,
768
- 'api_platform.graphql.subscription.subscription_identifier_generator ' ,
769
- 'api_platform.graphql.cache.subscription ' ,
770
- 'api_platform.graphql.command.export_command ' ,
771
- ];
772
-
773
- $ this ->assertContainerHas ($ services , []);
774
-
775
- // graphql.xml
776
- $ this ->assertServiceHasTags ('api_platform.graphql.query_resolver_locator ' , ['container.service_locator ' ]);
777
- $ this ->assertServiceHasTags ('api_platform.graphql.mutation_resolver_locator ' , ['container.service_locator ' ]);
778
- $ this ->assertServiceHasTags ('api_platform.graphql.iterable_type ' , ['api_platform.graphql.type ' ]);
779
- $ this ->assertServiceHasTags ('api_platform.graphql.upload_type ' , ['api_platform.graphql.type ' ]);
780
- $ this ->assertServiceHasTags ('api_platform.graphql.type_locator ' , ['container.service_locator ' ]);
781
- $ this ->assertServiceHasTags ('api_platform.graphql.fields_builder_locator ' , ['container.service_locator ' ]);
782
703
$ this ->assertServiceHasTags ('api_platform.graphql.normalizer.item ' , ['serializer.normalizer ' ]);
783
704
$ this ->assertServiceHasTags ('api_platform.graphql.normalizer.object ' , ['serializer.normalizer ' ]);
784
705
$ this ->assertServiceHasTags ('api_platform.graphql.normalizer.error ' , ['serializer.normalizer ' ]);
785
706
$ this ->assertServiceHasTags ('api_platform.graphql.normalizer.validation_exception ' , ['serializer.normalizer ' ]);
786
707
$ this ->assertServiceHasTags ('api_platform.graphql.normalizer.http_exception ' , ['serializer.normalizer ' ]);
787
708
$ this ->assertServiceHasTags ('api_platform.graphql.normalizer.runtime_exception ' , ['serializer.normalizer ' ]);
788
- $ this ->assertServiceHasTags ('api_platform.graphql.cache.subscription ' , ['cache.pool ' ]);
789
- $ this ->assertServiceHasTags ('api_platform.graphql.command.export_command ' , ['console.command ' ]);
790
709
}
791
710
792
711
public function testDoctrineOrmConfiguration (): void
@@ -1004,23 +923,21 @@ public function testDataCollectorConfiguration(): void
1004
923
(new ApiPlatformExtension ())->load ($ config , $ this ->container );
1005
924
1006
925
$ services = [
1007
- // v3/ data_collector.xml
926
+ // data_collector.xml
1008
927
'api_platform.data_collector.request ' ,
1009
928
1010
929
// debug.xml
1011
930
'debug.var_dumper.cloner ' ,
1012
931
'debug.var_dumper.cli_dumper ' ,
1013
-
1014
- // v3/debug.xml
1015
932
'debug.api_platform.debug_resource.command ' ,
1016
933
];
1017
934
1018
935
$ this ->assertContainerHas ($ services , []);
1019
936
1020
- // v3/ data_collector.xml
937
+ // data_collector.xml
1021
938
$ this ->assertServiceHasTags ('api_platform.data_collector.request ' , ['data_collector ' ]);
1022
939
1023
- // v3/ debug.xml
940
+ // debug.xml
1024
941
$ this ->assertServiceHasTags ('debug.api_platform.debug_resource.command ' , ['console.command ' ]);
1025
942
}
1026
943
@@ -1037,13 +954,13 @@ public function testMercureConfiguration(): void
1037
954
// mercure.xml
1038
955
'api_platform.mercure.listener.response.add_link_header ' ,
1039
956
1040
- // v3/ doctrine_orm_mercure_publisher
957
+ // doctrine_orm_mercure_publisher
1041
958
'api_platform.doctrine.orm.listener.mercure.publish ' ,
1042
959
1043
- // v3/ doctrine_odm_mercure_publisher.xml
960
+ // doctrine_odm_mercure_publisher.xml
1044
961
'api_platform.doctrine_mongodb.odm.listener.mercure.publish ' ,
1045
962
1046
- // v3/ graphql_mercure.xml
963
+ // graphql_mercure.xml
1047
964
'api_platform.graphql.subscription.mercure_iri_generator ' ,
1048
965
];
1049
966
@@ -1052,10 +969,10 @@ public function testMercureConfiguration(): void
1052
969
// mercure.xml
1053
970
$ this ->assertServiceHasTags ('api_platform.mercure.listener.response.add_link_header ' , ['kernel.event_listener ' ]);
1054
971
1055
- // v3/ doctrine_orm_mercure_publisher
972
+ // doctrine_orm_mercure_publisher
1056
973
$ this ->assertServiceHasTags ('api_platform.doctrine.orm.listener.mercure.publish ' , ['doctrine.event_listener ' ]);
1057
974
1058
- // v3/ doctrine_odm_mercure_publisher.xml
975
+ // doctrine_odm_mercure_publisher.xml
1059
976
$ this ->assertServiceHasTags ('api_platform.doctrine_mongodb.odm.listener.mercure.publish ' , ['doctrine_mongodb.odm.event_listener ' ]);
1060
977
1061
978
$ this ->assertEquals ([
0 commit comments