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

Conflict in doc and implementation #23

Open
weierophinney opened this issue Dec 31, 2019 · 3 comments
Open

Conflict in doc and implementation #23

weierophinney opened this issue Dec 31, 2019 · 3 comments
Labels

Comments

@weierophinney
Copy link
Member

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?


Originally posted by @robob4him at zendframework/zend-servicemanager#144

@weierophinney
Copy link
Member Author

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


Originally posted by @weierophinney at zendframework/zend-servicemanager#144 (comment)

@weierophinney
Copy link
Member 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:


Originally posted by @robob4him at zendframework/zend-servicemanager#144 (comment)

@weierophinney
Copy link
Member Author

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.


Originally posted by @boesing at zendframework/zend-servicemanager#144 (comment)

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

No branches or pull requests

2 participants