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

Resource fields mapped to types #110

Open
wants to merge 1 commit into
base: 3.next
Choose a base branch
from

Conversation

asgraf
Copy link
Contributor

@asgraf asgraf commented Mar 18, 2024

Fixes #108

\Muffin\Webservice\Datasource\Marshaller now correctly calls TypeInterface::marshal() on every mapped type.
(code is mostly copied from original CakePHP marshaller)

\Muffin\Webservice\Webservice::_transformResource() now calls $endpoint->newEntity($result); to trigger field mapping logic

Model.afterMarshal event is now correctly called after mapping

@asgraf asgraf changed the title Resource fields are now mapped to types Resource fields mapped to types Mar 18, 2024
@davidyell
Copy link
Collaborator

It would be nice to include a test which asserts that these methods are being called in the correct use-cases

@ADmad ADmad changed the base branch from master to 3.next March 18, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing type casting
2 participants