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

[Zend\ServiceManager] Add alternatives services proposals when service not found is thrown #24

Closed
weierophinney opened this issue Dec 31, 2019 · 1 comment

Comments

@weierophinney
Copy link
Member

This issue has been moved from the zendframework repository as part of the bug migration program as outlined here - http://framework.zend.com/blog/2016-04-11-issue-closures.html


Original Issue: https://api.github.com/repos/zendframework/zendframework/issues/6836
User: @blanchonvincent
Created On: 2014-11-03T14:33:39Z
Updated At: 2015-02-19T20:09:54Z
Body
This idea comes from symfony, it would be good to add some details about services that are close (about name). This point can help developer to save time during the debug.


Comment

User: @blanchonvincent
Created On: 2014-11-03T17:21:43Z
Updated At: 2014-11-03T17:21:43Z
Body
The travis fail seems pretty strange


Comment

User: @manchuck
Created On: 2014-11-03T19:57:41Z
Updated At: 2014-11-03T19:57:41Z
Body
I would want an option to disable this feature for production.


Comment

User: @blanchonvincent
Created On: 2014-11-03T20:01:19Z
Updated At: 2014-11-03T20:01:19Z
Body
@manchuck why?


Comment

User: @manchuck
Created On: 2014-11-03T20:10:51Z
Updated At: 2014-11-03T20:10:51Z
Body
If by some chance something gets released to prod with that causes this to be called, having a lev look up can cause a slowdown. If someone finds this out, it could bring the sever to a crawl doing all these look ups


Comment

User: @blanchonvincent
Created On: 2014-11-03T20:15:55Z
Updated At: 2014-11-03T20:17:24Z
Body
@manchuck I think the lev method consume less memory cpu/memory than a big sql request, so if someone want to put the mess in your server with malicious action, it's pretty easy to do that without these lines :)


Comment

User: @blanchonvincent
Created On: 2014-11-04T20:29:08Z
Updated At: 2014-11-04T20:29:08Z
Body
@manchuck After considering it, if the developers want to handle the exception from the service manager to load services from another manager as a fallback of provide a default action, it can be good to allow to deactivate this feature. I would like other reviews about this PR. Thank you for your time. 👍


Comment

User: @mpalourdio
Created On: 2014-11-04T20:33:58Z
Updated At: 2014-11-04T20:41:06Z
Body
I'm definitely +1 with this feature for a dev environment. I like this feature in symfony. I once thought about adding it into ZDT. Maybe it would better land in ZDT, as it's more a dev specific information, no ?


Comment

User: @Ocramius
Created On: 2014-11-22T08:19:34Z
Updated At: 2014-11-22T08:19:34Z
Body
I had implemented this as an abstract factory once :-) I suggest doing the same in this case ;-)


Comment

User: @Pittiplatsch
Created On: 2014-11-24T17:54:00Z
Updated At: 2014-11-24T17:54:00Z
Body
@Ocramius Nice idea. If done properly, this abstract factory can be configured for dev env's only. 👍


Comment

User: @Ocramius
Created On: 2014-12-06T01:33:11Z
Updated At: 2014-12-06T01:33:21Z
Body
I suggest looking at https://github.com/Ocramius/zf2/blob/95ad5fd6877335f8670b3635952e5bdaa696dc00/library/Zend/ServiceManager/Zf2Compat/ServiceNameNormalizerAbstractFactory.php for that.


Comment

User: @weierophinney
Created On: 2015-02-19T20:09:54Z
Updated At: 2015-02-19T20:09:54Z
Body
I'm with @Ocramius on this one; let's implement it as an abstract factory. Developers can then enable/disable at will, and it doesn't require changes to the service manager itself.



Originally posted by @GeeH at zendframework/zend-servicemanager#129

@GeeH
Copy link
Contributor

GeeH commented Jun 8, 2020

I'm closing this; it's been migrated twice now and is super duper old.

@GeeH GeeH closed this as completed Jun 8, 2020
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