yii2 icon indicating copy to clipboard operation
yii2 copied to clipboard

Support BackedEnum attribute typecast behaviour.

Open briedis opened this issue 1 year ago • 1 comments

Q A
Is bugfix?
New feature? ✔️
Breaks BC?

Based on the casting approach that Laravel has implemented. Not sure about validation, I think that should be implemented separately.

briedis avatar Jun 04 '24 13:06 briedis

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 64.84%. Comparing base (65e3369) to head (4b4eb9d). Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
framework/behaviors/AttributeTypecastBehavior.php 0.00% 5 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #20185      +/-   ##
============================================
- Coverage     64.85%   64.84%   -0.01%     
- Complexity    11409    11411       +2     
============================================
  Files           431      431              
  Lines         37142    37146       +4     
============================================
  Hits          24087    24087              
- Misses        13055    13059       +4     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jun 04 '24 13:06 codecov[bot]

Any hope for this one?

briedis avatar Nov 27 '24 12:11 briedis

@briedis can you please add a line in the changelog? Seems last thing before merging!

mtangoo avatar Dec 06 '24 14:12 mtangoo

I added the changelog entry.

What do you think about my second commit? Renaming enum cases so they match the suggested formatting (Pascal case) as in PHP's RFC. It may feel weird, but imho it is a better approach, as enums can't be confused with constants.

briedis avatar Dec 06 '24 17:12 briedis

I don't see an issue with that. Unless we have something implemented in the other way that can cause inconsistency. I can't think of any so I will leave for anyone who thinks otherwise before merging

mtangoo avatar Dec 06 '24 17:12 mtangoo

@briedis thanks for your time and efforts!

mtangoo avatar Dec 07 '24 18:12 mtangoo