Skip to content

Remove Closure for 'AsseticBundle\Configuration' and create a factory class instead #166

@parktrip

Description

@parktrip

The use of the Closure for 'getServiceConfig' in Module.php

public function getServiceConfig() { return array( 'factories' => array( 'AsseticBundle\Configuration' => function (ServiceLocatorInterface $serviceLocator) { $configuration = $serviceLocator->get('Configuration'); return new Configuration($configuration['assetic_configuration']); } ), ); }
prevents the use of caching configuration in zf (https://framework.zend.com/manual/2.4/en/tutorials/config.advanced.html)
has Closures can't be serialized

Would it be possible to have instead a Factory in your module ?

Thank you in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions