-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #54194 [PropertyAccess] Fix checking for missing properties (nico…
…las-grekas) This PR was merged into the 6.4 branch. Discussion ---------- [PropertyAccess] Fix checking for missing properties | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #48970, fix #54194, fix #51919 | License | MIT PropertyAccess and PropertyInfo make a few assumptions when magic methods are involved. Namely they assume that if a `__get` method is defined, then any property name is accessible. This assumption is generally wrong, and this becomes more evident with the introduction of lazy objects. The linked issue gives some more details. In this PR, I tweak these assumptions in order to make less of them. Note that there is no bullet-proof way to decide if a *virtual* property exists in PHP. We're missing an `__exists()` magic method for that. Because of this, I'm submitting this PR to 6.4 and not 5.4. Let 5.4 end its life quietly and ensure 6.4 works at its best with lazy ghosts, where they're mainstream. Commits ------- 9610a7c [PropertyAccess] Fix checking for missing properties
- Loading branch information
Showing
4 changed files
with
29 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters