This repository was archived by the owner on Jan 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Provide development mode #345
Merged
weierophinney
merged 4 commits into
zendframework:develop
from
weierophinney:feature/development-mode
Jun 22, 2016
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ nbproject | |
| .idea | ||
| .project | ||
| .settings | ||
| vendor | ||
| vendor/ | ||
| composer.phar | ||
| config/development.config.php | ||
| phpunit.xml | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <?php | ||
| /** | ||
| * Local Configuration Override for DEVELOPMENT MODE. | ||
| * | ||
| * This configuration override file is for providing configuration to use while | ||
| * in development mode. Run: | ||
| * | ||
| * <code> | ||
| * $ composer development-enable | ||
| * </code> | ||
| * | ||
| * from the project root to copy this file to development.local.php and enable | ||
| * the settings it contains. | ||
| * | ||
| * You may also create files matching the glob pattern `{,*.}{global,local}-development.php`. | ||
| */ | ||
|
|
||
| return [ | ||
| 'view_manager' => [ | ||
| 'display_exceptions' => true, | ||
| ], | ||
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,5 +11,5 @@ | |
| * credentials from accidentally being committed into version control. | ||
| */ | ||
|
|
||
| return array( | ||
| ); | ||
| return [ | ||
| ]; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| <?php | ||
| /** | ||
| * @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository | ||
| * @copyright Copyright (c) 2005-2016 Zend Technologies USA Inc. (http://www.zend.com) | ||
| * @license http://framework.zend.com/license/new-bsd New BSD License | ||
| */ | ||
|
|
||
| return [ | ||
| // Additional modules to include when in development mode | ||
| 'modules' => [ | ||
| ], | ||
| // Configuration overrides during development mode | ||
| 'module_listener_options' => [ | ||
| 'config_glob_paths' => ['config/autoload/{,*.}{global,local}-development.php'], | ||
| 'config_cache_enabled' => false, | ||
| 'module_map_cache_enabled' => false, | ||
| ], | ||
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <?php | ||
| /** | ||
| * @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository | ||
| * @copyright Copyright (c) 2005-2016 Zend Technologies USA Inc. (http://www.zend.com) | ||
| * @license http://framework.zend.com/license/new-bsd New BSD License | ||
| */ | ||
|
|
||
| /** | ||
| * List of enabled modules for this application. | ||
| * | ||
| * This should be an array of module namespaces used in the application. | ||
| */ | ||
| return [ | ||
| 'Zend\Router', | ||
| 'Zend\Validator', | ||
| 'Application', | ||
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| <?php | ||
|
|
||
| use Zend\Mvc\Application; | ||
| use Zend\Stdlib\ArrayUtils; | ||
|
|
||
| /** | ||
| * This makes our life easier when dealing with paths. Everything is relative | ||
|
|
@@ -29,5 +30,11 @@ | |
| ); | ||
| } | ||
|
|
||
| // Retrieve configuration | ||
| $appConfig = require __DIR__ . '/../config/application.config.php'; | ||
| if (file_exists(__DIR__ . '/../config/development.config.php')) { | ||
| $appConfig = ArrayUtils::merge($appConfig, require __DIR__ . '/../config/development.config.php'); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. file_exists and require are checking for different files
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, @alextech - fixing now! |
||
| } | ||
|
|
||
| // Run the application! | ||
| Application::init(require __DIR__ . '/../config/application.config.php')->run(); | ||
| Application::init($appConfig)->run(); | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
s/enable/disable