Eliminating ServiceLocatorAwareInterface

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Eliminating ServiceLocatorAwareInterface

Demian Katz

Hello, everyone –

 

As I may have mentioned before, Zend Framework is removing the ServiceLocatorAwareInterface from its v3 release. I think this is a good decision, as globally injecting the top-level service locator everywhere is a lazy practice that can lead to messy code and unclear dependencies. In preparation for the upgrade, I have begun work on eliminating VuFind’s dependence on this mechanism.

 

This is a fairly big job and may have far-reaching consequences, so I’m trying to work on it in stages. A few simple changes have already been committed to master. Others are being worked through in various pull requests.

 

Here is a significant one, for example:

 

https://github.com/vufind-org/vufind/pull/909

 

This removes ServiceLocatorAwareInterface from the search Params and Results classes, instead relying on constructor injection of more targeted dependencies.

 

If anyone has any questions or concerns about this or other changes, please let me know. There’s going to be a fair amount of churn in master over the coming weeks as we work through these changes and get Zend Framework components updated to newer versions. As always, please let me know if this causes any problems for you!

 

- Demian


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Vufind-tech mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/vufind-tech
Loading...