-
Notifications
You must be signed in to change notification settings - Fork 84
Always load request_matcher and rule_matcher services #194
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
@@ -43,6 +43,7 @@ public function load(array $configs, ContainerBuilder $container) | |||
$config = $this->processConfiguration($configuration, $configs); | |||
|
|||
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); | |||
$loader->load('matcher.xml'); |
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 now simply always load matcher.xml
, which means rule_matcher
and request_matcher
will be loaded even if they are not used. I don’t find this a big problem. We could make their loading optional, for instance in the createRule|RequestMatcher()
methods.
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.
the services being private, they will be removed when the container is built, so this should have 0 runtime impact
something goes wrong with the tests. or is that coming from an update in the library and has nothing to do with the PR? i don't see the connection... |
ping @ddeboer do we merge this one? |
No, I need to fix the tests first. They fail locally as well. |
now that you fixed tests in master, can you rebase this one? |
39ff00f
to
624d9f4
Compare
Rebased. |
still one failing test, i think because configuration test is not adjusted. can you check please? |
These services where previously defined in cache_control_listener.xml. That file, however, was not loaded e.g. when only invalidation (and no cache control) rules were defined. This PR always load the request_matcher and rule_matcher, as they can be used for cache_control, invalidation and tags.
624d9f4
to
fd5db0a
Compare
Should be fixed now. |
…vice Always load request_matcher and rule_matcher services
Fix #193.
These services where previously defined in
cache_control_listener.xml
. That file, however, was not loaded e.g. when only invalidation (and no cache control) rules were defined. This PR always load therequest_matcher
andrule_matcher
, so they can be used incache_control
,invalidation
and/ortags
.