Commit a892989e authored by dsnopek's avatar dsnopek

Update to Symfony 2.6 as lowest supported version, so we can be compatible...

Update to Symfony 2.6 as lowest supported version, so we can be compatible with Symfony 3.x (need new method to replace deprecated method)
parent a0735444
......@@ -89,7 +89,6 @@ class Container {
require_once $file;
$c = new \CachedCiviContainer();
$c->set('service_container', $c);
return $c;
}
......@@ -134,13 +133,13 @@ class Container {
'Civi\Angular\Manager',
array()
))
->setFactoryService(self::SELF)->setFactoryMethod('createAngularManager');
->setFactory([new Reference(self::SELF), 'createAngularManager']);
$container->setDefinition('dispatcher', new Definition(
'Civi\Core\CiviEventDispatcher',
array(new Reference('service_container'))
))
->setFactoryService(self::SELF)->setFactoryMethod('createEventDispatcher');
->setFactory([new Reference(self::SELF), 'createEventDispatcher']);
$container->setDefinition('magic_function_provider', new Definition(
'Civi\API\Provider\MagicFunctionProvider',
......@@ -151,13 +150,13 @@ class Container {
'Civi\API\Kernel',
array(new Reference('dispatcher'), new Reference('magic_function_provider'))
))
->setFactoryService(self::SELF)->setFactoryMethod('createApiKernel');
->setFactory([new Reference(self::SELF), 'createApiKernel']);
$container->setDefinition('cxn_reg_client', new Definition(
'Civi\Cxn\Rpc\RegistrationClient',
array()
))
->setFactoryClass('CRM_Cxn_BAO_Cxn')->setFactoryMethod('createRegistrationClient');
->setFactory([new Reference(self::SELF), 'createRegistrationClient']);
$container->setDefinition('psr_log', new Definition('CRM_Core_Error_Log', array()));
......@@ -170,7 +169,7 @@ class Container {
'type' => array('*memory*', 'SqlGroup', 'ArrayCache'),
),
)
))->setFactoryClass('CRM_Utils_Cache')->setFactoryMethod('create');
))->setFactory('CRM_Utils_Cache::create');
}
$container->setDefinition('sql_triggers', new Definition(
......@@ -184,7 +183,7 @@ class Container {
));
$container->setDefinition('pear_mail', new Definition('Mail'))
->setFactoryClass('CRM_Utils_Mail')->setFactoryMethod('createMailer');
->setFactory('CRM_Utils_Mail::createMailer');
if (empty(\Civi::$statics[__CLASS__]['boot'])) {
throw new \RuntimeException("Cannot initialize container. Boot services are undefined.");
......@@ -206,7 +205,7 @@ class Container {
$container->setDefinition($name, new Definition(
$class
))
->setFactoryClass($class)->setFactoryMethod('singleton');
->setFactory([$class, 'singleton']);
}
$container->setDefinition('civi_token_compat', new Definition(
......
......@@ -36,13 +36,13 @@
"require": {
"dompdf/dompdf" : "0.8.*",
"electrolinux/phpquery": "^0.9.6",
"symfony/config": "~2.5 || ~3.0",
"symfony/dependency-injection": "~2.5 || ~3.0",
"symfony/event-dispatcher": "~2.5 || ~3.0",
"symfony/filesystem": "~2.5 || ~3.0",
"symfony/process": "~2.5 || ~3.0",
"symfony/config": "^2.6.13 || ~3.0",
"symfony/dependency-injection": "^2.6.13 || ~3.0",
"symfony/event-dispatcher": "^2.6.13 || ~3.0",
"symfony/filesystem": "^2.6.13 || ~3.0",
"symfony/process": "^2.6.13 || ~3.0",
"psr/log": "~1.0.0",
"symfony/finder": "~2.5 || ~3.0",
"symfony/finder": "^2.6.13 || ~3.0",
"tecnickcom/tcpdf" : "6.2.*",
"totten/ca-config": "~17.05",
"zetacomponents/base": "1.7.*",
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment