Skip to content

[FrameworkBundle] Cache pool namespace added to configuration #20483

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

Closed
wants to merge 1 commit into from
Closed

[FrameworkBundle] Cache pool namespace added to configuration #20483

wants to merge 1 commit into from

Conversation

asev
Copy link

@asev asev commented Nov 10, 2016

Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
License MIT

Hey. It's already checking for namespace at compiler pass. So I've added an ability to control it via config.

@asev asev changed the title Cache pool namespace added to configuration [FrameworkBundle] Cache pool namespace added to configuration Nov 10, 2016
@nicolas-grekas
Copy link
Member

Needs a doc PR to tell it exists, and most importantly tell why it's useful.

@nicolas-grekas
Copy link
Member

@asev are you OK to create a PR on https://github.com/symfony/symfony-docs/ to document this configuration option?

@@ -732,6 +732,11 @@ private function assertCachePoolServiceDefinitionIsCreated(ContainerBuilder $con
$this->assertTrue(isset($tag[0]['default_lifetime']), 'The default lifetime is stored as an attribute of the "cache.pool" tag.');
$this->assertSame($defaultLifetime, $tag[0]['default_lifetime'], 'The default lifetime is stored as an attribute of the "cache.pool" tag.');

if (null !== $namespace) {
$this->assertTrue(isset($tag[0]['namespace']), 'The namespace is stored as an attribute of the "cache.pool" tag.');
Copy link
Member

@nicolas-grekas nicolas-grekas Nov 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove this line: if the key does not exist, phpunit will throw a exception anyway on the next line.

@nicolas-grekas
Copy link
Member

But before going to write documentation, can you please tell us why this is useful? The namespace is currently automatically generated from the cache pool name and some container parameters, I don't see yet why we'd need something else.

@nicolas-grekas
Copy link
Member

Replaced by #20616, which allows seeding the namespace from a user given config option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants