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

Made yii\gii\CodeFile indepdendent of controller context #395

Merged
merged 2 commits into from Feb 2, 2019

Conversation

cebe
Copy link
Member

@cebe cebe commented Jan 2, 2019

do not apply $newDirMode and $newFileMode if module is not available.

Code uses default umask in that case.

Q A
Is bugfix? yes
New feature? no
Breaks BC? no
Tests pass? yes
Fixed issues n/a

do not apply `$newDirMode` and `$newFileMode` if module is not available.

Code uses default umask in that case.
@cebe cebe added the type:enhancement Enhancement label Jan 2, 2019
@cebe cebe added this to the 2.1.0 milestone Jan 2, 2019
@samdark
Copy link
Member

samdark commented Jan 3, 2019

What's the use case?

@cebe
Copy link
Member Author

cebe commented Feb 1, 2019

I spotted this when running unit tests for the gii Generator in https://github.com/cebe/yii2-openapi tests fail with setting file permission of 0 if gii module is not mocked.

Imo the class should not rely on gii module being there, this makes testing much easier as you do not need to mock a whole yii app ffor testing a gii generator.

@samdark samdark merged commit bfe6044 into yiisoft:master Feb 2, 2019
@samdark
Copy link
Member

samdark commented Feb 2, 2019

Merged. Thank you!

@cebe cebe deleted the codefile-module-independent branch February 20, 2019 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants