-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
Make implicit TRUE permissions check explicit in API 4 Explorer for PHP #26514
Make implicit TRUE permissions check explicit in API 4 Explorer for PHP #26514
Conversation
(Standard links)
|
a507f95
to
9c02ca3
Compare
In hindsight, I think the OOP pattern of
|
@colemanw Yes, that would have been more readable. |
9c02ca3
to
7ce074a
Compare
@larssandergreen it's kinda not too late to add those 2 functions as wrappers to |
@colemanw We could just use |
Ugh, the whole reason I added the shorter syntax was because people complained about the wordiness of |
I say let 'em complain. If they don't like the output of the API Explorer, they are welcome to use the shorter syntax or the implicit TRUE. |
But we can also merge this as is, that's fine with me too. |
Fine with me too :) |
Overview
It feels like we end up with quite a few bugs because of the implicit TRUE permissions checks in API 4. I think it might make life a little easier if we make the implicit TRUE explicit in the API 4 Explorer, so if we're copying and pasting we're more likely to stop and think if we should be checking permissions or not.
This only changes the PHP.
The downside is possibly a few more lines of code in core when using traditional style PHP, but that seems well worth it if we avoid a few bugs.