-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add magic __isset to classes with __get #2231
Conversation
@lonnieezell or @jim-parry I don't foresee any issues with this but would still appreciate a glance. |
Weird that the same purpose method has to be done so differently across the classes; suggests that it is a good idea. |
Yeah, it's a bummer but PHP uses I suppose we could add tests for each class that received the new magic function, but might make more sense to find a way to exempt them? EDIT: Exemption is silly, because they could easily have failures. Let me know if you'd prefer a MagicIssetTest.php prior to merge. |
Actually something seems to be buggy (or I'm ignorant of something) with coverage tests right now. See for example:
|
That would make sense, or adding them to existing tests. The troublesome one, IMHO, is the Model, as the property could be interpreted in different ways. Is it a problem if two or more of the possible properties exist? |
The model |
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.
I believe they all look fine. I had one comment on the Model that I think we need to consider. Part of me is wondering if the session handler needs to handle some of the other situations, like flash data or temp data, but i can't recall exactly how they're stored if they'd need a special case for that or not.
Also - yes , please add a tests suite for these. Or add to existing tests.
Description
See #2219
This PR adds
isset()
methods to the following classes, modeled after each class's__get()
method:Checklist: