Description
Q | A |
---|---|
Bug report? | no |
Feature request? | no |
BC Break report? | no |
RFC? | yes |
Version/Branch | 1.0 |
Before starting to separate the bundle into modules, we need to decide naming conventions.
This discussion addresses following topics:
- Naming on GitHub
- Naming on Packagist (for
composer require
command) - Naming of the bundle class, e.g.
OverblogGraphQLBundle
- Namespaces
- Naming of configs
Some rules from Symfony best practices for reusable bundles:
- Bundle name should not contain more than 2 words + suffix
Bundle
- The bundle class name should be used as the name of the repository (AcmeBlogBundle and not BlogBundle for instance).
- Symfony core Bundles do not prefix the Bundle class with
Symfony
and always add aBundle
sub-namespace; for example:Symfony\Bundle\FrameworkBundle\FrameworkBundle
.
If module defines it's own services, than it should be a normal Symfony bundle, otherwise it can be a generic php library.
Questions:
-
Should we include the prefix "graphql" to module names? Including it makes names sometimes too long, but not including it deprives the module of information that it deals with GraphQL.
Examples:
overblog/profiler-bundle
oroverblog/graphql-profiler-bundle
overblog/graphql-expression-language-bundle
oroverblog/graphql-expression-language-bundle
OverblogProfilerBundle
orOverblogGraphqlProfilerBundle
(this breaks the best practices rule "no more than 2 words")
-
Should we rename the core bundle and in what?
Suggestion:overblog/graphql-core-bundle
-
What namespaces should we use?
Current namespace isOverblog/GraphQLBundle
Suggested:Oveblog/GraphQL/CoreBundle
,Oveblog/GraphQL/ProfilerBundle
etc. -
What config filenames and key names should we use?
Current filename isgraphql.yaml
and key name isoverblog_graphql
.
Suggestion:- Option 1:
overblog_graphql.core
,overblog_graphql.profiler
,overblog_graphql.expression_language
- Option 2:
overblog.graphql.core
,overblog.graphql.profiler
,overblog.graphql.expression_language
- Option 3:
overblog.graphql_core
,overblog.graphql_profiler
,overblog.graphql_expression_language
- Option 1:
Please write your opinions and suggestions as detailed as possible.