Commit 7336ee1b 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 aa98e5b1
Version 1.24 (not yet released)
============
- Compatibility fix for Symfony ^3.4 ^4.0.
Version 1.23
============
......
......@@ -13,14 +13,21 @@ use \Symfony\Component\DependencyInjection\Definition;
*/
function form_processor_civicrm_container(ContainerBuilder $container) {
// Register the TypeFactory
$container->setDefinition('form_processor_type_factory', new Definition('Civi\FormProcessor\Type\Factory'));
$typeFactoryDefinition = new Definition('Civi\FormProcessor\Type\Factory');
$typeFactoryDefinition->setPrivate(FALSE);
$container->setDefinition('form_processor_type_factory', $typeFactoryDefinition);
// Register the OutputHandlerFactory
$container->setDefinition('form_processor_output_handler_factory', new Definition('Civi\FormProcessor\OutputHandler\Factory'));
$outputHandlerDefinition = new Definition('Civi\FormProcessor\OutputHandler\Factory');
$outputHandlerDefinition->setPrivate(FALSE);
$container->setDefinition('form_processor_output_handler_factory', $outputHandlerDefinition);
// Register the DelayedAction Factoory
$container->setDefinition('form_processor_delayed_action_factory', new Definition('Civi\FormProcessor\DelayedAction\Factory'));
$delayedActionFactoryDefinition = new Definition('Civi\FormProcessor\OutputHandler\Factory');
$delayedActionFactoryDefinition->setPrivate(FALSE);
$container->setDefinition('form_processor_delayed_action_factory', $delayedActionFactoryDefinition);
// Register the validationFactory
$validationFactoryDefinition = new Definition('Civi\FormProcessor\Validation\Factory');
$validationFactoryDefinition->setFactory(['Civi\FormProcessor\Validation\Factory', 'singleton']);
$validationFactoryDefinition->setPrivate(FALSE);
$container->setDefinition('form_processor_validation_factory', $validationFactoryDefinition);
......
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