Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
parktrip opened this issue Feb 3, 2017 · 5 comments

Comments

@parktrip
Copy link
Contributor

parktrip commented Feb 3, 2017

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

@widmogrod
Copy link
Owner

I will gladly accept PR with Factory :)

@parktrip
Copy link
Contributor Author

parktrip commented Feb 6, 2017

Dear Widmogrod,

I have just submitted PR #167
As this is my first PR, don't hesitate to tell me if I did something wrong.

Regards,

@widmogrod
Copy link
Owner

Great job!

@widmogrod
Copy link
Owner

I released version 2.2.0

@parktrip
Copy link
Contributor Author

parktrip commented Feb 8, 2017

You are welcome ! Thanks for this module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants