-
Notifications
You must be signed in to change notification settings - Fork 155
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
Add main controller #824
Add main controller #824
Conversation
$valid = $request->attributes->getBoolean('is_valid', true); | ||
if (!$valid) { | ||
$operation = $operation->withWrite(false); | ||
} |
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.
$valid = $request->attributes->getBoolean('is_valid', true); | |
if (!$valid) { | |
$operation = $operation->withWrite(false); | |
} | |
$operation = $operation->withWrite($request->attributes->getBoolean('is_valid', true)); |
But I wonder if is_valid
should not be false by default
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.
If we configure "validate: false" on an operation, we don't have this attribute on request.
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.
I do not agree with your suggestion, the developer could configure Create(write: false), validation is ok, and then it will write and developer does not want that.
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.
Left few comments on previous PR #817 (review)
Thank you, @loic425! |
Extracted from #817