doctrine / DoctrineModule

Doctrine Module for Laminas
http://www.doctrine-project.org/projects/doctrine-module.html
MIT License
398 stars 269 forks source link

Added ConfigProvider in line with ZF components #590

Closed asgrim closed 7 years ago

asgrim commented 7 years ago

Many ZF components now use a ConfigProvider to assist in config merging and allow components to be used e.g. in Expressive.

I took the strategy of least interference with existing config loading, so I did not move config here, nor make Module.php load config using the ConfigProvider. If desired, however, I can add this functionality into this PR. Feedback welcome, thanks!

asgrim commented 7 years ago

Test failures don't look related to my change.

TomHAnderson commented 7 years ago

The failing error has been corrected in master. Please go ahead and put this into the Module.php as this is the direction ZF is now headed.

asgrim commented 7 years ago

@TomHAnderson thanks for review; I've gone all-in with this now and moved all of module.config.php into the ConfigProvider. This would only break components which include module.config.php directly, but if you see that could be an issue, I could create a stub module.config.php again but use the ConfigProvider to return the config.

jaapio commented 7 years ago

In order to add better support I think we should remove the zend-mvc from this package as well. Since expressive doesn't need that either. Should I open a new PR for that?

TomHAnderson commented 7 years ago

This module needs a lot of work and that's coming up soon.

We've got a lot of bugs here and while this module falls behind DoctrineORMModule is clean as a whistle. Only recently have other Doctrine libraries fallen into line with Zend to use PHP 7.1 going forward.

Moving this module towards Expressive is a goal and any PRs you can contribute, and indeed any guidance on the architecture to support these new libraries will be appreciated.

jaapio commented 7 years ago

@TomHAnderson let me know if and how I can help to move forward to a beter module. If you create an project and issues that we can discuss I will try to contribute more to this module. We are using it on a daily base. So there must be time to help you guys move forward