Skip to content
This repository was archived by the owner on Jun 4, 2020. It is now read-only.
This repository was archived by the owner on Jun 4, 2020. It is now read-only.

Enable different enviroments #6

@ThaDafinser

Description

@ThaDafinser

We can now enable/disable a development mode with this module, but this only works for the "base configuration". Also if you have more than 2 enviroment, its stuck because some modules are only needed in production.

When using other components which have enviroment settings, this is also not enough:

  • DoctrineORMModule -> caching / database
  • Zend\Translate -> caching
  • Zend\View -> error reporting
  • ...

You can achieve this with config/autoload/local.php...but than you have to it manually currently.

_So my suggestion is:_

  • copy needed enviroment *config/autoload/*.local.php.dist to config/autoload/local.php
  • copy needed enviroment config/*.config.php.dist to config/enviroment.php

_New command (replacing the old):_

  • php index.php enviroment [none|development|production|testing|....]
  • or php index.php switch [none|development|production|testing|....]
  • or php index.php switch enviroment [none|development|production|testing|....]
  • or php index.php enable enviroment [none|development|production|testing|....]
    (if none is provided, just remove the current enabled files)

_the config/autoload folder could look like_

  • global.php
  • development.local.php.dist
  • production.local.php.dist
  • testing.local.php.dist

E.g. I you only want to use EdpSuperluminal modul in production, you can move it to config/production.config.php.dist which will be copied to config/enviroment.php (instead of development.config.php) with the command above

Things to keep in mind:

  • overwrite existing config/autoload/local.php and config/enviroment.php dangerous? Maybe a "force" parameter?

_Good idea / bad idea? Feedback?_

Pinging @akrabat @ezimuel @weierophinney
(sorry for the pings, but since this modules is forket, i though it's a good idea)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions