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

The InputFilter dependency injection example is incorrect #87

Open
Jakovitz opened this issue Jan 29, 2019 · 3 comments
Open

The InputFilter dependency injection example is incorrect #87

Jakovitz opened this issue Jan 29, 2019 · 3 comments

Comments

@Jakovitz
Copy link

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.

@michalbundyra
Copy link
Member

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

@Jakovitz
Copy link
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.

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas-api-tools/documentation; a new issue has been opened at laminas-api-tools/documentation#2.

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