Skip to content
This repository has been archived by the owner on Jan 1, 2020. It is now read-only.

Added env check and changed glob line #39

Merged
merged 4 commits into from
Mar 6, 2012
Merged

Added env check and changed glob line #39

merged 4 commits into from
Mar 6, 2012

Conversation

gabriel403
Copy link
Contributor

added environment check for application_env and changed the glob line for config files

and changed the glob line for config files
$appConfig = include 'config/application.config.php';

$listenerOptions = new Zend\Module\Listener\ListenerOptions($appConfig['module_listener_options']);
$defaultListeners = new Zend\Module\Listener\DefaultListenerAggregate($listenerOptions);
$defaultListeners->getConfigListener()->addConfigGlobPath('config/autoload/*.config.php');
$defaultListeners->getConfigListener()->addConfigGlobPath("config/autoload/*.{global,$env}.php");
Copy link
Member

Choose a reason for hiding this comment

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

To keep or not to keep .config.php?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed it to be {global,$env}.config.php now

$appConfig = include 'config/application.config.php';

$listenerOptions = new Zend\Module\Listener\ListenerOptions($appConfig['module_listener_options']);
$defaultListeners = new Zend\Module\Listener\DefaultListenerAggregate($listenerOptions);
$defaultListeners->getConfigListener()->addConfigGlobPath('config/autoload/*.config.php');
$defaultListeners->getConfigListener()->addConfigGlobPath("config/autoload/*.{global,$env}..configphp");
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be *{global,$env}.config.php ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeh I noticed my mess up after going to bed and tried to fix it on my phone, which ended in disaster. Should be sorted now.

@Ocramius
Copy link
Member

Ocramius commented Mar 3, 2012

@akrabat just wondering, what should be done in these cases? Commit 25971d5 is obviously wrong and unnecessary (but also, I know 0 of git :P )

@gabriel403
Copy link
Contributor Author

@Ocramius the commits could probably be squashed into 1 so you only see the final

@akrabat
Copy link
Contributor

akrabat commented Mar 3, 2012

Why worry? It doesn't really hurt. Though you could probably squash.

…o facilitate local changes pulled in by index.php glob config
EvanDotPro added a commit that referenced this pull request Mar 6, 2012
Added env check and changed glob line
@EvanDotPro EvanDotPro merged commit 1769d77 into zendframework:master Mar 6, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants