Skip to content
This repository has been archived by the owner on Feb 6, 2020. It is now read-only.

Conflict in doc and implementation #144

Open
robob4him opened this issue Aug 26, 2016 · 4 comments
Open

Conflict in doc and implementation #144

robob4him opened this issue Aug 26, 2016 · 4 comments

Comments

@robob4him
Copy link

The documentation states that a factory stored in a class would implement FactoryInterface but it doesn't reference which one. In ZF3 there still exists the ZF2 FactoryInterface which requires a 'createService' method while the ZF3 interface requires '__invoke'.

It is confusing to still have the ZF2 implementation out there when the clear direction in the docs in ZF3. Perhaps it should be removed?

@weierophinney
Copy link
Member

@robob4him Can you link to a specific page and heading where you see this occurring, please?

@robob4him
Copy link
Author

@weierophinney, np.

https://zendframework.github.io/zend-servicemanager/configuring-the-service-manager/
It's the example after the text:

Alternatively, the above code can be replaced by a factory class instead of a closure. This leads to more readable code. For instance:

@boesing
Copy link
Member

boesing commented May 19, 2017

Uhm, thats all right by the way. There is no specific namespace given and since the new FactoryInterface is located under Zend\ServiceManager\Factory\FactoryInterface, there is no requirement for implementing the old Zend\ServiceManager\FactoryInterface which defined the createService method.

But yes, the lack of the use statement in the top of the snippet might lead to the wrong Interface tho.

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas/laminas-servicemanager; a new issue has been opened at laminas/laminas-servicemanager#23.

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

No branches or pull requests

3 participants