Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adjust mapping paths to the SF best practices for Bundles #4853

Conversation

coldic3
Copy link
Contributor

@coldic3 coldic3 commented Jul 29, 2022

Q A
Branch? main
Tickets -
License MIT
Doc PR -

According to the latest changes in Symfony recommendations for the bundles' directory structure (here) in this PR I add a few additional paths to mapping for bundles. TBH I have no idea how I should write tests for it but if you have any hints, I'll do it 馃檪

@coldic3 coldic3 marked this pull request as draft July 29, 2022 09:17
@coldic3 coldic3 force-pushed the feat/support-new-sf-best-practices-for-bundles branch 2 times, most recently from 58fd854 to bf378e3 Compare July 29, 2022 09:28
@coldic3 coldic3 marked this pull request as ready for review July 29, 2022 09:31
@dunglas
Copy link
Member

dunglas commented Jul 29, 2022

LGTM.

By the way I would also add a directory not related to Doctrine by default, such as ApiResource to clearly state that you can (and probably should) use separate classes for public data models and internal ones. cc @api-platform/core-team

@alanpoulain
Copy link
Member

I'm 馃憤 for the ApiResource directory.

@alanpoulain alanpoulain force-pushed the feat/support-new-sf-best-practices-for-bundles branch from bf378e3 to ce2cf85 Compare August 4, 2022 13:00
@vincentchalamon vincentchalamon merged commit f2833d3 into api-platform:main Aug 5, 2022
@vincentchalamon
Copy link
Contributor

Thanks @coldic3 !

@coldic3 coldic3 deleted the feat/support-new-sf-best-practices-for-bundles branch August 20, 2022 21:28
@rvanlaak
Copy link

rvanlaak commented Sep 19, 2022

Bit late, but some more food for thought with regards to using ApiResource, it would also be interesting to promote DDD a bit more and stimulate others in using /src/UserInterface/Resource or /src/Presentation/Api/Resource (or something similar). Promoting that the view model/resource differs from the domain model indeed is a great thing to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants