-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
First implementation #1
Conversation
vjik
commented
Apr 27, 2023
Q | A |
---|---|
Is bugfix? | ❌ |
New feature? | ✔️ |
Breaks BC? | ❌ |
Fixed issues |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #1 +/- ##
==========================================
Coverage ? 100.00%
Complexity ? 149
==========================================
Files ? 16
Lines ? 360
Branches ? 0
==========================================
Hits ? 360
Misses ? 0
Partials ? 0 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Alexey Rogachev <[email protected]>
Co-authored-by: Alexey Rogachev <[email protected]>
) { | ||
return (string) $resolvedValue; | ||
} | ||
return ''; |
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.
Isn't it expected to become as an error?
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.
Idea of CastToString
— cast value to string always.
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.
That it's better to handle it and add context: which attribute crashed the runtime
true, | ||
); | ||
|
||
$this->assertSame('.', $model->getA()); |
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.
Why so?
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.
Strict mode. In strcit mode hydrate properties from map only.
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 mean why the dot, but not an empty string, null or exception?
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.
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.
And what would happen if a model doesn't have default value?
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.
Nothing
…-implementation # Conflicts: # tests/Attribute/Parameter/ToStringTest.php