-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[ClassLoader] made DebugClassLoader idempotent #7245
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
Conversation
|
||
protected function setUp() | ||
{ | ||
$this->loader = new UniversalClassLoader(); |
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.
You should use the ClassLoader rather than the UniversalClassLoader as it is the recommended one
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.
Fixed.
ping @fabpot: this will speed up lots of functional tests :) |
@@ -104,4 +104,9 @@ public function loadClass($class) | |||
return true; | |||
} | |||
} | |||
|
|||
public function getClassFinder() |
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.
What is it for? If this is just for the unit tests, this should be removed and reflection should be used instead.
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.
Yes, it's just for the test. I'll switch to reflection if you prefer.
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.
yes, please.
Fixed test to use Reflection
This PR was merged into the 2.1 branch. Commits ------- 27cc0df Merge pull request #1 from merk/class-loader/idempotent 95af84c Fixed test to use Reflection bb08247 [ClassLoader] tweaked test 73bead7 [ClassLoader] made DebugClassLoader idempotent Discussion ---------- [ClassLoader] made DebugClassLoader idempotent The DebugClassLoader will wrap itself if `enable()` is called multiple time, such as when running functional tests. Please merge to 2.2 and master ASAP. | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | ~ | License | MIT | Doc PR | ~ --------------------------------------------------------------------------- by kriswallsmith at 2013-03-07T16:38:55Z ping @fabpot: this will speed up lots of functional tests :) --------------------------------------------------------------------------- by kriswallsmith at 2013-03-08T04:51:51Z @fabpot fixed by @merk
The DebugClassLoader will wrap itself if
enable()
is called multiple time, such as when running functional tests.Please merge to 2.2 and master ASAP.