prepare release 1.12 (#2183)

* updated dependencies (#2125)
* display application name and version in console (#2150)
This commit is contained in:
Kevin Papst
2020-12-10 16:25:14 +01:00
committed by GitHub
parent 78d8212e57
commit 26c2d5aa81
29 changed files with 2042 additions and 2376 deletions

View File

@@ -56,7 +56,6 @@ class AppExtensionTest extends TestCase
],
],
'data_dir' => '/tmp/',
'plugin_dir' => '/tmp/', // still here, to make sure that this value is NOT applied!
'timesheet' => [],
'saml' => [
'connection' => []
@@ -325,6 +324,21 @@ class AppExtensionTest extends TestCase
$this->extension->load($minConfig, $container = $this->getContainer());
}
/**
* @expectedDeprecation Changing the plugin directory via "kimai.plugin_dir" is not supported since 1.9
* @group legacy
*/
public function testChangingPluginsIsIgnoredAndTriggersDeprecation()
{
$minConfig = $this->getMinConfig();
$minConfig['kimai']['plugin_dir'] = '/tmp/';
$expected = realpath(__DIR__ . '/../../') . '/var/plugins';
$this->extension->load($minConfig, $container = $this->getContainer());
$this->assertEquals($expected, $container->getParameter('kimai.plugin_dir'), 'Invalid config: kimai.plugin_dir');
}
public function testLdapDefaultValues()
{
$minConfig = $this->getMinConfig();

View File

@@ -18,11 +18,10 @@ use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
*/
class ConfigurationTest extends TestCase
{
protected function getMinConfig($dataDir = '/tmp/', $pluginDir = '/tmp/')
protected function getMinConfig($dataDir = '/tmp/')
{
return [
'data_dir' => $dataDir,
'plugin_dir' => $pluginDir,
'timesheet' => [],
];
}
@@ -52,12 +51,17 @@ class ConfigurationTest extends TestCase
$this->assertConfig($this->getMinConfig('sdfsdfsdfds'), []);
}
/**
* @expectedDeprecation Changing the plugin directory via "kimai.plugin_dir" is not supported since 1.9
* @group legacy
*/
public function testValidatePluginDir()
{
$finalizedConfig = $this->getCompiledConfig($this->getMinConfig());
$finalizedConfig['plugin_dir'] = 'sdfsdfs';
$config = $this->getMinConfig();
$config['plugin_dir'] = '/tmp/';
$config = $this->getMinConfig('/tmp/', 'sdfsdfs');
$finalizedConfig = $this->getCompiledConfig($config);
$finalizedConfig['plugin_dir'] = '/tmp/';
$this->assertConfig($config, $finalizedConfig);
}
@@ -257,7 +261,6 @@ class ConfigurationTest extends TestCase
{
$fullDefaultConfig = [
'data_dir' => '/tmp/',
'plugin_dir' => '/tmp/',
'timesheet' => [
'default_begin' => 'now',
'mode' => 'default',