forked from facebook/hhvm
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix autoload logic in hphpi for interfaces
Summary: When I checked in some fixes to the error handling system, one of the flib tests that was passing under hphpi started failing. After doing some investigation I found that the failure was caused by a bug in hphpi's autoload logic. Specifically, hphpi was not autoloading interfaces correctly. This lead to incorrect results when evaluating statements like "$obj instanceof SomeInterface", because hphpi would return false even though $obj did implement SomeInterface. I also found a few places where autoload could get called twice on the same class or the same interface, and I fixed these places appropriately. I have a test ~andrewparoski/hphptests/reflectbug/reflectbug.php that tests autoloading, instanceof, and the ReflectionClass. Unfortunately we don't currently have a way to add tests that involve multiple PHP files. I will open a separate bug to update the test infrastructure to support multiple PHP files, and then I will check in the reflectbug.php test. Task ID: # Blame Rev: Reviewers: iproctor, mwilliams CC: Test Plan: reflectbug.php make fast_tests Run www under hphpi and browse the site Revert Plan: Tags: hphp - begin *PUBLIC* platform impact section - Bugzilla: # - end platform impact - DiffCamp Revision: 122397
- Loading branch information
1 parent
4e70694
commit b4f82c2
Showing
5 changed files
with
15 additions
and
3 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
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