Skip to content

the new config.php approach #800

Closed
Closed
@tzyganu

Description

@tzyganu

I've seen that in the latest alpha versions there is no more local.xml. Instead there is a config.php that contains the db credentials (and others).
I've also seen that there is not more active attribute in the module.xml of every module. Instead this functionality was moved to the same config.php mentioned above.
I see a possible issue with this approach.
Since config.php contains the db credentials, this file is not going to be versioned, but the list of enabled/disabled modules should be versioned.
In the current implementation, each time I create a new module and want to deploy it, after getting the code from the versioning system I have to manually edit the config.php file from the instance where I'm deploying to add declare my new module.

How about putting the module list in a separate file modules.php?.. that can look like this:

return array (
    'Magento_Core' => 1,
    'Magento_Authorization' => 1,
    'Magento_Store' => 1,
    ....
 );

and in the config.php just get the modules like this:

'modules' => require_once 'modules.php';

I know that the list of modules is generated on install. This means that in the approach I'm proposing, the setup script needs to check if modules.php exists. If it does, move along, if not create it.

Does this make sense?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions