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

[filters] Feature request: cycle entities interception #75

Closed
rauanmayemir opened this issue Jan 20, 2020 · 1 comment · Fixed by #87
Closed

[filters] Feature request: cycle entities interception #75

rauanmayemir opened this issue Jan 20, 2020 · 1 comment · Fixed by #87
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@rauanmayemir
Copy link

This expands on spiral/validation#4 and develops on the idea of working with relations before they reach the domain/persistence layer.

Simple example: an order form where users select their existing address, and application sends address_id to the API. OrderRequest schema indicates that address_id field is of Address entity and it must exist.

After the validation $request->toArray() should return populated address (a schema key) field with an object of Address.

CycleInterceptor is a significant boost to productivity, I believe this would also help streamlining all the tedious routine involving cleaning up and populating relations from forms.

@SerafimArts SerafimArts transferred this issue from spiral/filters Sep 19, 2020
@SerafimArts SerafimArts changed the title Feature request: cycle entities interception [filters] Feature request: cycle entities interception Sep 19, 2020
@butschster butschster self-assigned this Apr 18, 2023
@butschster butschster transferred this issue from spiral/framework Aug 16, 2023
@butschster butschster added the enhancement New feature or request label Aug 16, 2023
@butschster butschster added this to the v2.x milestone Jan 3, 2024
butschster added a commit that referenced this issue Jan 5, 2024
butschster added a commit that referenced this issue Jan 8, 2024
…component (#87)

* Adds EntityCaster for spiral/filters component

fixes #75

* Fixes unit tests

* Add error suppression for cases when invalid data is used for entity retrieval.
@rauanmayemir
Copy link
Author

Good things take a while. 😄

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

Successfully merging a pull request may close this issue.

2 participants