Commit 2a4b61a3 authored by fsnet's avatar fsnet
Browse files

setPrivate(FALSE) for all services

Compatibility fix for Symfony ^3.4 ^4.0: Symfony\Component\DependencyInjection\Compiler\ResolvePrivatesPass
removes services marked as private from the container even if they are also marked as public.
parent a45a17cf
Version 1.54 (not yet released)
------------
- Compatibility fix for Symfony ^3.4 ^4.0.
Version 1.53
------------
......
......@@ -11,11 +11,12 @@ use Symfony\Component\DependencyInjection\Definition;
*/
function action_provider_civicrm_container($container) {
if (!$container->has('action_provider')) {
// Only add our container when it does not exists.
// This way other extensions might override the container method.
$actionProviderDefinition = new Definition('Civi\ActionProvider\Container');
$actionProviderDefinition->setFactory(['Civi\ActionProvider\Container', 'getinstance']);
$container->setDefinition('action_provider', $actionProviderDefinition);
// Only add our container when it does not exists.
// This way other extensions might override the container method.
$actionProviderDefinition = new Definition('Civi\ActionProvider\Container');
$actionProviderDefinition->setFactory(['Civi\ActionProvider\Container', 'getinstance']);
$actionProviderDefinition->setPrivate(FALSE);
$container->setDefinition('action_provider', $actionProviderDefinition);
}
}
......
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