-
Notifications
You must be signed in to change notification settings - Fork 196
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
AL-553 - Added Config class to use in lieu of constants #1162
Conversation
@TeslaDethray, thanks for your PR! By analyzing the blame information on this pull request, we identified @bensheldon and @joshkoenig to be potential reviewers |
f50658b
to
12afdfd
Compare
@TeslaDethray Looks like you need a mkdir somewhere around here. There may be other places; might be convenient to add mkdir as a side effect of |
c091307
to
15f5cd9
Compare
0394ac9
to
30b8cad
Compare
/** | ||
* @var string | ||
*/ | ||
protected $collected_class = 'Terminus\Models\SiteAuthorizations'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be singular.
|
||
/** | ||
* Changes connection mode | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did that function disappear or were the inline docs just duplicated?
8c26139
to
ed99a9a
Compare
ed99a9a
to
d588402
Compare
I'm a big supporter of the concept but have a couple of notes:
Taken together, the logical conclusion of this would be to make sure all of our code works with the Symfony DI container: http://symfony.com/doc/current/components/dependency_injection.html Given how much there is to do in this refactor and that either of these items could send us down a rabbit-hole, I'm comfortable endorsing this PR as-is though. +1 |
@ronan there are a few other good DI containers out there, Symfony isn't the only option. League's container can work really well. |
@dustinleblanc I was about to suggest league/container as well! I find it much nicer to work with than the Symfony DI container. Also, I have been meaning to write a config system for Robo based on the Symfony Config class for some time. I agree with Ronan's conclusion that doing that at this point would be a rabbit-hole (said after already merged :P ) |
The old method of setting configurabls constnats necessitated the creation of a Configurator object, properly belonging to WP-CLI's dispatcher, to make use of Terminus' configuration. I've separated the Terminus Config from the Configurator and ended the widespread use of constants in favor of static methods from the Config class.
Also: