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

controller improved #2304

Merged
merged 1 commit into from
Feb 4, 2014
Merged

controller improved #2304

merged 1 commit into from
Feb 4, 2014

Conversation

Ragazzo
Copy link
Contributor

@Ragazzo Ragazzo commented Feb 4, 2014

Some code cleanup, related with my comments:

@samdark
Copy link
Member

samdark commented Feb 4, 2014

Looks OK.

@Ragazzo
Copy link
Contributor Author

Ragazzo commented Feb 4, 2014

Done, ready for review. Should we rename apply/clear to load/unload since fixtures are now loading/unloading?

$this->stdout(" Fixture \"{$fixture::className()}\" was successfully loaded. \n", Console::FG_GREEN);
}

$this->loadFixtures($this->createFixtures($fixtures));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only reason for the code duplication is to display the success message after every successful fixture loading.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, i noted this. i think we can skip it, because it is better to show if all fixtures are loaded, since we are using transaction, to avoid confusing user, so he will not be doing extra checks to be sure that fixtures was not accidentally applied.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we change apply/clear actions to load/unload for more consistency?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should add --noDb.
Perhaps add something like --globalFixtures which takes an array of fixture class names. By default, it is InitDbFixture.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps add something like --globalFixtures which takes an array of fixture class names.

sounds good. but you need to add array feature for options like it is done for method params.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. 9779e9c

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so if option is set to '' empty string, array will be empty like [] correct?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

qiangxue added a commit that referenced this pull request Feb 4, 2014
@qiangxue qiangxue merged commit 69ad923 into yiisoft:master Feb 4, 2014
@Ragazzo Ragazzo deleted the fixture_controller_improved branch February 4, 2014 12:33
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.

3 participants