Using the getConfiguration
method in the LiipMonitorExtension class
#247
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It would be great to have an opportunity to extend the LiipMonitorExtension class and add some new configuration.
Unfortunately, there is only one way to extend the configuration of this bundle now. To achieve it we have to completely override the
Liip\MonitorBundle\DependencyInjection\LiipMonitorExtension::load
method.Let's suppose that I want to add some new features to the bundle. I have
My\DependencyInjection\Configuration
like this:The next step is to add this new config parameter to Extension. I would do something like that:
But, unfortunately, it does not work, because the
Liip\MonitorBundle\DependencyInjection\Configuration
is instantiated explicitly in theLiip\MonitorBundle\DependencyInjection\LiipMonitorExtension::load
method.