-
-
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
Add ToDateTime
parameter attribute
#77
Conversation
vjik
commented
Apr 1, 2024
Q | A |
---|---|
Is bugfix? | ❌ |
New feature? | ✔️ |
Breaks BC? | ❌ |
…date-time-immutable
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #77 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 198 234 +36
===========================================
Files 29 31 +2
Lines 524 613 +89
===========================================
+ Hits 524 613 +89 ☔ View full report in Codecov by Sentry. |
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.
As I can see there is not a lot of modification to make the new attribute be able to convert a value to DateTime
or DateTimeImmutable
objects depends on the property type.
Could you make the new attribute to be able to do that?
I'd rename it ToDateTime
or create a separate attribute.
Co-authored-by: Dmitriy Derepko <[email protected]>
Co-authored-by: Dmitriy Derepko <[email protected]>
Co-authored-by: Dmitriy Derepko <[email protected]>
…date-time-immutable
PHP recommends use |
Despite on recommendations people still use mutable objects |
I'd go with immutable and add mutable if/when requested. |
ToDateTimeImmutable
parameter attributeToDateTim
parameter attribute
ToDateTim
parameter attributeToDateTime
parameter attribute