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

6.0: Rename EntityTrait::_accessible property to something more appropriate #17375

Closed
LordSimal opened this issue Oct 22, 2023 · 3 comments
Closed

Comments

@LordSimal
Copy link
Contributor

Description

I never really liked the name of the _accessible property inside our Cake\Datasource\EntityTrait since just by its name it indicates some sort of permission system to prevent (general) access to specified properties inside PHP... which it doesn't do.

The concept of mass assignment is properly described in the Docs and the baked entity classes also have a somewhat suitable explenation of what is happening but still the property name itself is a bit missleading imho.

Here are some of my (bad) suggestions that came to my mind:

  • massAssignable (to be right on the nose but still what does assignable mean)
  • massEditable (although this also doesn't represent it correctly because $entity->set('myfield', 'value'); would also be blocked if myfield is set to false)

Would love to hear your thoughts on that one 😁

CakePHP Version

6.0

@LordSimal LordSimal added the RFC label Oct 22, 2023
@ADmad
Copy link
Member

ADmad commented Oct 22, 2023

massAssignable 👍

@ADmad ADmad added this to the 6.0 milestone Oct 22, 2023
@markstory
Copy link
Member

Given that most folks interact with mass-assignment via the ORM methods, what about patchable?

Copy link

This issue is stale because it has been open for 120 days with no activity. Remove the stale label or comment or this will be closed in 15 days

@github-actions github-actions bot added the stale label Apr 30, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants