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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Json as an example for custom datatype can be misleading #7906

Open
MolbioUnige opened this issue Aug 21, 2024 · 6 comments
Open

Using Json as an example for custom datatype can be misleading #7906

MolbioUnige opened this issue Aug 21, 2024 · 6 comments

Comments

@MolbioUnige
Copy link
Contributor

Issue Description

Using Json as an example for the custom type might make people think that Cakephp doesn't handle json natively. I found it a bit confusing. Instead, having a section explaining how to use the native JsonType, like the EnumType, would be nice.

@LordSimal
Copy link
Contributor

@jamisonbryant
Copy link

I think what @MolbioUnige might be referring to is that Cake now ships with the JsonType, whereas I don't believe that was always the case. So, users might read these docs and create their own JsonType, not realizing that Cake already has one and their efforts were redundant. At $MYJOB we ran into this ourselves in a recent project.

I think documenting EnumType in place of JsonType (perhaps with a notice that JsonType is already part of Cake) is a good choice because many PHP8 users, myself included, are eager to see an example of its usage.

@LordSimal
Copy link
Contributor

Then it would be best if we'd come up with another, not so straight forward example of a custom Database Type to replace the currently redundant JsonType

@MolbioUnige
Copy link
Contributor Author

There is the PointType example already, and yes @LordSimal the saving complex type explanation is enough

@MolbioUnige
Copy link
Contributor Author

A link "see Saving complex datatype" at some place along with @jamisonbryant suggestion about stating that Json is natively supported could be useful.

@dereuromark
Copy link
Member

dereuromark commented Nov 18, 2024

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

No branches or pull requests

4 participants