Skip to content
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

Fix \yii\filters\Cors::actions when attached to a module #20230

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

timkelty
Copy link
Contributor

@timkelty timkelty commented Jul 17, 2024

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

When attached to a module (vs a controller), \yii\filters\Cors::actions should use the ID defined by \yii\base\ActionFilter::getActionId, so that the controller ID is included.

The AuthMethod already does this properly: https://github.com/yiisoft/yii2/blob/master/framework/filters/auth/AuthMethod.php#L106

Copy link

codecov bot commented Jul 17, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 64.93%. Comparing base (4b0a02e) to head (72af09f).

Files Patch % Lines
framework/filters/Cors.php 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master   #20230   +/-   ##
=========================================
  Coverage     64.93%   64.93%           
  Complexity    11389    11389           
=========================================
  Files           430      430           
  Lines         36911    36912    +1     
=========================================
+ Hits          23969    23970    +1     
  Misses        12942    12942           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@terabytesoftw
Copy link
Member

Please add line in CHANGELOG.md and tests.

Thks.

@samdark samdark merged commit de2e5ea into yiisoft:master Jul 18, 2024
81 of 83 checks passed
@samdark
Copy link
Member

samdark commented Jul 18, 2024

Thank you!

@samdark samdark added this to the 2.0.51 milestone Jul 18, 2024
@samdark
Copy link
Member

samdark commented Jul 18, 2024

I've added a CHANGELOG. Doing another pull request with a test would be awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants