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
Expose field type constant and update documentation #6123
Expose field type constant and update documentation #6123
Conversation
8ecd1b1
to
8d180fb
Compare
e4a482d
to
4255a10
Compare
@greg0ire I added a note |
4255a10
to
c94d92d
Compare
c94d92d
to
146df61
Compare
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.
Maybe these constant are better somewhere else, you'll say.
What about create something like ShowMapperInterface
for these constants?
146df61
to
421ff1e
Compare
These constant will be both used for the showMapper and the listMapper. I don't think creating two For SHOW and LIST, I think that type is mainly (only ?) used to select the right template. In this bundle, we currently used the constants only to register the available ones. So I tried to use a single class, with template-context. |
I understood. Just I think the templating concept is not the best choice here, but I really don't have any better option at first glance 🤔 |
421ff1e
to
97148d6
Compare
Yeah for sure. In
For List/show, type is used
I see a big difference between In a dream world, maybe we should expose and use some Creating these constants seems to be the best benefit/work ratio. |
Do you still request change @phansys ? :) |
97148d6
to
3db2f50
Compare
9697ece
to
9b65c52
Compare
9b65c52
to
1e21008
Compare
Subject
I am targeting this branch, because BC.
This allow to be used in project or others bundle.
Maybe these constant are better somewhere else, you'll say.
This will avoid using non-existent field type, like
https://github.com/sonata-project/SonataDoctrineORMAdminBundle/blob/3.x/src/Guesser/TypeGuesser.php#L36
https://github.com/sonata-project/SonataDoctrineORMAdminBundle/blob/3.x/src/Guesser/TypeGuesser.php#L68
I also updated lot of documentation.
Changelog