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

[Suggestion] Modular configuration using ::class #106

Closed
gabbydgab opened this issue Aug 22, 2016 · 2 comments
Closed

[Suggestion] Modular configuration using ::class #106

gabbydgab opened this issue Aug 22, 2016 · 2 comments

Comments

@gabbydgab
Copy link

In respect with PR #54, can we have similar structure with Zend Skeleton App that the modular configuration will be in config/modules.config.php file? In order to leverage the PR Resolve modules using PHP 5.5 ::class

See updated repo branch: https://github.com/gabbydgab/zend-expressive-skeleton/blob/feature/modular/config/modules.config.php

Features:
[x] Enabled zendframework/zend-component-installer (as require-dev)
[x] Enabled mtymek/expressive-config-manager (as required)
[x] Load modules in config/modules.config.php file
[x] Merged configuration for the loaded modules in config/config.php file (can be renamed as expressive.config.php similar to application.config.php in ZendSkeletonApplication)
[x] PR #105 included

Caveat:

<?php
return  [
    Zend\Router\ConfigProvider::class,
    Zend\Validator\ConfigProvider::class,
];
  • it will change the structure of zend-component-installer in pulling 'config-provider' mapper

PS: Haven't updated the test yet. Sorry T_T

@gabbydgab
Copy link
Author

gabbydgab commented Aug 22, 2016

In addition, composer configuration can be either src/ or module/ (as preferred)

Current configuration is still under src/

"autoload": {
        "psr-4": {
            "App\\": "src/App/",
            "ExpressiveInstaller\\": "src/ExpressiveInstaller/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "AppTest\\": "test/AppTest/",
            "ExpressiveInstallerTest\\": "test/ExpressiveInstallerTest/"
        }
    },

@geerteltink
Copy link
Member

@gabbydgab Thanx for the suggestion. This feature is included in #54.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants