-
Notifications
You must be signed in to change notification settings - Fork 50
Don't remove abstract plugins #247
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
These abstract definitions are needed for client plugin definitions, even if plugins weren't configured at root level. Removal of unused abstract definitions is job of DI container.
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.
thanks for this. i think its fine to just leave the abstract definition in - the container is cleaned up by symfony anyways, and abstract definitions should not pose any problem. much less complicated than having to figure out for each abstract plugin if we need it somewhere or not.
|
||
/** | ||
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException | ||
* @expectedExceptionMessage The child node "cache_pool" at path "httplug.clients.test.plugins.0.cache" must be configured. |
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.
please use $this->expectException and $this->expectExceptionMessage instead of the annotations. the annotations have been deprecated in favor of the method. they have the upsides of being able to use the ::class constant and (not relevant in this case here) of only accepting the exception at the place you actually expect it, not before that.
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.
There is no instance in this code base where expectExceptionMessage is used. I've followed style of existing code.
Furthermore, expectException is PHPUnit 6+ only.
If you decided to change the code style, please do it yourself with refactoring commit which replaces it in all places at once.
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.
sorry, my bad. i am working in too many repositories that are at different states of upgrading those things... indeed, its better to be consistent with this. i created #248
|
||
/** | ||
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException | ||
* @expectedExceptionMessage The child node "cache_pool" at path "httplug.plugins.cache" must be configured. |
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.
same here
I think this is ready to merge. @Nyholm @fbourigault do you agree with this change? |
Thank you! |
These abstract definitions are needed for client plugin definitions, even if plugins weren't configured at root level.
Allows to configure plugin this way
instead of forcing unneeded configuration at httplug.plugins.cache level. See linked issue.