1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/15987] Go back to previous table definition type

This will still allow using the 'tables' parameter array but will also ensure
full backward compatibility and compatibility with extensions that will add
more tables to the 'tables' array.

PHPBB3-15987
This commit is contained in:
Marc Alexander
2019-05-14 21:20:51 +02:00
parent 61fa4f006a
commit d72498a9c3
7 changed files with 115 additions and 93 deletions

View File

@@ -77,6 +77,18 @@ namespace
$this->assertTrue($container->isFrozen());
}
public function test_tables_mapping()
{
$this->builder->without_cache();
$container = $this->builder->get_container();
$this->assertTrue($container->hasParameter('tables'));
$tables = $container->getParameter('tables');
$this->assertGreaterThan(0, count($tables));
$this->assertTrue($container->hasParameter('tables.foo_bar'));
$this->assertTrue(isset($tables['foo_bar']));
$this->assertEquals($tables['acl_groups'], 'phpbb_some_other');
}
public function test_without_cache()
{
$this->builder->without_cache();

View File

@@ -1,5 +1,8 @@
parameters:
core: true
tables.acl_groups: '%core.table_prefix%acl_groups'
tables.acl_options: '%core.table_prefix%acl_options'
tables.acl_roles: '%core.table_prefix%acl_roles'
services:
config.php:

View File

@@ -1,5 +1,8 @@
parameters:
core: true
tables.acl_groups: '%core.table_prefix%acl_groups'
tables.acl_options: '%core.table_prefix%acl_options'
tables.acl_roles: '%core.table_prefix%acl_roles'
services:
config.php:

View File

@@ -1,2 +1,4 @@
parameters:
enabled_4: true
tables.foo_bar: '%core.table_prefix%foo_bar'
tables.acl_groups: '%core.table_prefix%some_other'