yii2 icon indicating copy to clipboard operation
yii2 copied to clipboard

Attach behavior via "as behaviorName" with Closure

Open timkelty opened this issue 1 year ago • 3 comments

Allows behaviors attached with the 'as behaviorName' syntax to use a Closure.

In the process of writing a test, I discovered the \yiiunit\framework\base\ComponentTest::testAttachBehavior test was broken (it has assertions that were never reached), so I fixed that as well.

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

timkelty avatar Aug 22 '24 03:08 timkelty

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 64.95%. Comparing base (eb304e7) to head (8724ba3). Report is 7 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #20248      +/-   ##
============================================
- Coverage     64.95%   64.95%   -0.01%     
- Complexity    11395    11396       +1     
============================================
  Files           430      430              
  Lines         36923    36925       +2     
============================================
- Hits          23985    23984       -1     
- Misses        12938    12941       +3     

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

codecov[bot] avatar Aug 22 '24 03:08 codecov[bot]

Added lines #L193 - L194 were not covered by tests

Could you add a test for that.

@schmunk42 the test for that is here. I'm not sure why that warning is showing in the Github diff. It isn't showing here: https://app.codecov.io/gh/yiisoft/yii2/pull/20248

timkelty avatar Aug 23 '24 12:08 timkelty

Can you rollback changes to the two files under db/ ?

@machour Done. CS/lint check will fail, but not from changes in this PR.

timkelty avatar Aug 25 '24 15:08 timkelty

@timkelty thanks for your time and efforts. Can you please resolve the conflict to enable final review and possibly merging it?

mtangoo avatar Sep 21 '24 09:09 mtangoo

All set, @mtangoo.

timkelty avatar Sep 23 '24 13:09 timkelty

All set, @mtangoo.

Thanks for your time and efforts. We will review and merge it if all is good without delay!

mtangoo avatar Sep 23 '24 15:09 mtangoo

@timkelty the PR is good. Can you add a line in changelog so that we can merge this?

mtangoo avatar Sep 25 '24 14:09 mtangoo

@timkelty the PR is good. Can you add a line in changelog so that we can merge this?

Done!

timkelty avatar Sep 25 '24 19:09 timkelty

@timkelty thanks for your time and efforts

mtangoo avatar Sep 26 '24 01:09 mtangoo