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

The InputFilter dependency injection example is incorrect #2

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

The InputFilter dependency injection example is incorrect #2

weierophinney opened this issue Dec 31, 2019 · 2 comments

Comments

@weierophinney
Copy link
Contributor

The InputFilter dependency injection example is incorrect, at least when using Apigility in a ZF3 project

Input filters from the 'input_filter_specs' config are created by \Zend\InputFilter\InputFilterAbstractServiceFactory, which is registered in the InputFilter plugin manager, not the top-level application service manager. And the abstract service itself is configured by zfcampus/zf-content-validation, and not in zendframework/zend-inputfilter.

Since the InputFilterManager's services are not shared by default, the example also misses the call to setData(). And where to get the data. And doesn't mention skipping the 'zf-content-validation' http method mapping.


Originally posted by @Jakovitz at zfcampus/apigility-documentation#87

@weierophinney
Copy link
Contributor Author

@Jakovitz Can you submit PR with this fix, please?


Originally posted by @michalbundyra at zfcampus/apigility-documentation#87 (comment)

@weierophinney
Copy link
Contributor Author

I tried giving it a shot, but soon realized that everything is written with ZF2 in mind, and generally referencing 2.3 components.

It would probably make more sense to update everything to ZF3. Or even better, completely move the framework specific documentation to a separate part, if Expressive support is still planned (or working now - I haven't looked into it for a while). But that's much more work than a simple PR, and probably requires a new branch with a bunch of people working actively toward it. 😃

Also, I'm really not good at writing documentation. It tends to sidetrack into way too many details.


Originally posted by @Jakovitz at zfcampus/apigility-documentation#87 (comment)

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

1 participant