-
Notifications
You must be signed in to change notification settings - Fork 14
refactor: add extension point to payload contract handling #301
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this shouldn't be needed - would be easier if we do it directly in ModelClient, like before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
public function supports(Model $model, array|string|object $input): bool; | ||
public function supports(Model $model): bool; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
separate PR
src/Platform/Contract.php
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
questionable instance handling, would be great tho to decouple from globale NormalizerInterface
591474f
to
c6ba1ce
Compare
public function registerTypes(): array | ||
{ | ||
return [ | ||
'string' => 'handleInput', | ||
]; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couldn't we do this using an attribute like the event listeners do?
]; | ||
} | ||
|
||
public function handleInput(string $input): array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public function handleInput(string $input): array | |
#[AsExtension('string')] | |
public function handleInput(string $input): array |
idea
Trying to address pain of #291 and #297