Skip to content

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

Merged
merged 1 commit into from
Feb 20, 2015

Conversation

ddeboer
Copy link
Member

@ddeboer ddeboer commented Jan 25, 2015

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 the request_matcher and rule_matcher, so they can be used in cache_control, invalidation and/or tags.

@@ -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');
Copy link
Member Author

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.

Copy link
Contributor

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

@dbu
Copy link
Contributor

dbu commented Jan 26, 2015

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...

@dbu
Copy link
Contributor

dbu commented Feb 5, 2015

ping @ddeboer do we merge this one?

@ddeboer
Copy link
Member Author

ddeboer commented Feb 5, 2015

No, I need to fix the tests first. They fail locally as well.

@dbu
Copy link
Contributor

dbu commented Feb 16, 2015

now that you fixed tests in master, can you rebase this one?

@ddeboer ddeboer force-pushed the fix-request-matcher-service branch from 39ff00f to 624d9f4 Compare February 16, 2015 12:34
@ddeboer
Copy link
Member Author

ddeboer commented Feb 16, 2015

Rebased.

@dbu
Copy link
Contributor

dbu commented Feb 16, 2015

still one failing test, i think because configuration test is not adjusted. can you check please?

@ddeboer ddeboer self-assigned this Feb 17, 2015
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.
@ddeboer ddeboer force-pushed the fix-request-matcher-service branch from 624d9f4 to fd5db0a Compare February 20, 2015 15:12
@ddeboer
Copy link
Member Author

ddeboer commented Feb 20, 2015

Should be fixed now.

dbu added a commit that referenced this pull request Feb 20, 2015
…vice

Always load request_matcher and rule_matcher services
@dbu dbu merged commit 8cb0cc2 into master Feb 20, 2015
@dbu dbu deleted the fix-request-matcher-service branch February 20, 2015 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

issue when using symfony HttpCache cache
3 participants