You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This effectively doubles the calls to class_exists which doubles the calls to spl_autoload_call and makes tests very slow. In one sample test I was seeing 90K more calls to this function. I have created PRs at: doctrine/annotations#135 symfony/phpunit-bridge#1
As I think this issue should be addressed elsewhere, but I wanted to create this ticket to advertise this problem and seek any advice or recommendations for a better fix.
The text was updated successfully, but these errors were encountered:
If you can update to doctrine/annotations 1.5.0 it improves things substantially, but that upgrade requires PHP 7.1+.
Until we drop PHP 7.0 support in our app we have this in our base test class
publicfunctiontearDown()
{
parent::tearDown();
// We need to keep the registry clean ourselves until we update to doctrine/annotations 1.5.0
AnnotationRegistry::reset();
}
Yeah, we use 7.1 and I updated to 1.5. What I meant is, that it's faster, but still not the same speed as on 3.2. It was 300% slower and now it's 180% slower. Also see this: #24596
I'm only certain that this effects applications that use the PHPunit Bridge, but other bundles may have the same issue.
#21837 registers the
class_exists
loader for annotations which is also added by https://github.com/symfony/phpunit-bridge/blob/master/bootstrap.php#L24This effectively doubles the calls to
class_exists
which doubles the calls tospl_autoload_call
and makes tests very slow. In one sample test I was seeing 90K more calls to this function. I have created PRs at:doctrine/annotations#135
symfony/phpunit-bridge#1
As I think this issue should be addressed elsewhere, but I wanted to create this ticket to advertise this problem and seek any advice or recommendations for a better fix.
The text was updated successfully, but these errors were encountered: