Skip to content

[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

Merged
merged 1 commit into from
Mar 8, 2013

Conversation

kriswallsmith
Copy link
Contributor

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 ~


protected function setUp()
{
$this->loader = new UniversalClassLoader();
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@kriswallsmith
Copy link
Contributor Author

ping @fabpot: this will speed up lots of functional tests :)

@@ -104,4 +104,9 @@ public function loadClass($class)
return true;
}
}

public function getClassFinder()
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, please.

@kriswallsmith
Copy link
Contributor Author

@fabpot fixed by @merk

fabpot added a commit that referenced this pull request Mar 8, 2013
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
@fabpot fabpot merged commit 27cc0df into symfony:2.1 Mar 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants