-
-
Notifications
You must be signed in to change notification settings - Fork 958
feat(symfony): allow symfony makers namespace configuration #7497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| $services = $container->services(); | ||
|
|
||
| $services->set('api_platform.maker.command.state_processor', 'ApiPlatform\Symfony\Maker\MakeStateProcessor') | ||
| ->args([service('api_platform.metadata.resource.name_collection_factory')]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
service('api_platform.metadata.resource.name_collection_factory') was introduced in the original PR
But there was no dependency on this class then, or is now, so I'm assuming this was a leftover from an earlier approach
c0c31ee to
2db31bb
Compare
4306e7b to
8eec7c8
Compare
|
Nice thanks, could you run cs and fix your commit ? thanks! |
8eec7c8 to
a4530c0
Compare
|
Done |
a4530c0 to
0f75ef8
Compare
0f75ef8 to
419e021
Compare
|
These other CI failures seem to be unrelated (at least one has an outsanding PR with a fix) |
|
thanks! |
You can now configure the base namespace prefix for all makers but also add a command line option in case you want to customize the namespace even further
This allows developers to organize all api code into a single namespace/directory
Example
will cause all generated classes to be created in
src/ApiCli Example
bin/console make:state-provider --namespace-prefix Api\\StateProviderwill cause the generated provider to be created in
src/Api/StateProviderthe same applies to the processor and filter maker