-
-
Notifications
You must be signed in to change notification settings - Fork 454
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
Improvement to IDE-friendliness when 'wrapper_class' option is used #663
Conversation
…onfiguration is used
); | ||
|
||
$this->assertEquals(TestWrapperClass::class, $container->getDefinition('doctrine.dbal.default_connection')->getClass()); | ||
$this->assertEquals(null, $container->getDefinition('doctrine.dbal.second_connection')->getClass()); |
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.
assertNull()
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.
Ooops
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.
Anything else? Don't want to pollute with commits
It's not meant to be extended. |
Anything else needs to be done? |
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.
@Xymanek Can you resolve the conflict?
// Set class in case "wrapper_class" option was used to assist IDEs | ||
if (isset($options['wrapperClass'])) { | ||
$def->setClass($options['wrapperClass']); | ||
} |
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.
I would move this up to after line 211 - so right after $def =
+1 The |
@weaverryan Fixed and fixed |
@Xymanek can you please rebase instead of merging |
@Ocramius can you please give me a hint on how to do that? I kinda know what you mean but not sure how to do it cross-repository... |
@Xymanek I'll do that now while merging :-) If you never did it before, consider reading https://www.atlassian.com/git/tutorials/rewriting-history |
Sets the
class
property in service definition to assist IDEs in knowing what class the service really is. Since connection services use a factory, theclass
option doesn't affect anything. I've tested the logic with following "hack" and it works without any problems:P.S. Why so many
private
s in\Doctrine\DBAL\Connection
? Makes extending it so hard....