You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, I started to work on the isolation of the configuration process.
The result will be 4 additional bundles:
GraphQLConfigurationXmlBundle
GraphQLConfigurationYamlBundle
GraphQLConfigurationGraphQLBundle
GraphQLConfigurationMetadataBundle
The configuration generation would no longer be part of the Dependency Injection / Container builder process (ie. Removal of ConfigParserPass) but will be a regular service (used by the TypeGenerator).
The main advantages is that the configuration processing will be a regular service and we will be able to extend it, easily add features, remove all static classes, etc...
You can have a look at the bundles here https://github.com/Vincz/graphql-bundles
And at the modified main bundle here: https://github.com/Vincz/GraphQLBundle/tree/config-generator
The "problems" I'm facing are the following:
The namespaces are really long, like for example: Overblog\GraphQL\Bundle\ConfigurationMetadataBundle\Transformer\ArgumentsTranformer
The mapping configuration would now be set in the sub bundles configuration, like:
We have to duplicate the tests, phpstan, phpcs, CI config for each bundle instead of only in the main one (unless we could do that in a main root repositories with different packages? I see this a lot in the Javascript world but not so much in PHP. Example in JS: https://github.com/mui-org/material-ui).
The namespace of annotations would change from Overblog\GraphQLBundle\Annotation to Overblog\GraphQL\Bundle\ConfigurationMetadataBundle\Metadata (as now both annotations and attributes are supported with the same classes, and will be even more when Default property with @NamedArgumentConstructor doctrine/annotations#402 will be publish).
It's not really "problems", it's more like consequences of the split.
Let me know what you think.
So, I started to work on the isolation of the configuration process.
The result will be 4 additional bundles:
GraphQLConfigurationXmlBundleGraphQLConfigurationYamlBundleGraphQLConfigurationGraphQLBundleGraphQLConfigurationMetadataBundleThe configuration generation would no longer be part of the Dependency Injection / Container builder process (ie. Removal of
ConfigParserPass) but will be a regular service (used by theTypeGenerator).The main advantages is that the configuration processing will be a regular service and we will be able to extend it, easily add features, remove all static classes, etc...
You can have a look at the bundles here https://github.com/Vincz/graphql-bundles
And at the modified main bundle here: https://github.com/Vincz/GraphQLBundle/tree/config-generator
The "problems" I'm facing are the following:
Overblog\GraphQL\Bundle\ConfigurationMetadataBundle\Transformer\ArgumentsTranformerOverblog\GraphQLBundle\AnnotationtoOverblog\GraphQL\Bundle\ConfigurationMetadataBundle\Metadata(as now both annotations and attributes are supported with the same classes, and will be even more when Default property with @NamedArgumentConstructor doctrine/annotations#402 will be publish).It's not really "problems", it's more like consequences of the split.
Let me know what you think.