php - Zend Framework 2 - Separate Environment Development/Staging/Production/Testing -


I am having trouble finding those information.

It is possible to split into the environment in ZF1 development, production, scaffolding and testing.

In ZF1, I have a database configuration different for each type of environment data. I have 4 settings ready and the files are written in application.ini. I

In ZF2, I suspect how to make these 4 environments, I actually use 4 in my application cycle.

I have many files on / config / autoload

  cache.local.php global.php zenddevelopertools.local.php zfcuser.global.php   

The documentation says: By default, this app is < / p>

  'is configured to load all the configuration. / Config / autoload / {*. } {Global, local} 'php   

2 indicates that only the environment, global and local in my development machine

My main question:

1 - How does the structure recognize the environment, like Global / Local? ZF1 was set in index.php by line

  defined ('APPLICATION_ENV'). | Define ('APPLICATION_ENV' (getenv ('APPLICATION_ENV')? Getenv ('APPLICATION_ENV') 'output'));   

which does not actually appear in ZF2.

2 - How can these 2 environments be expanded to 4?

  Global - Production Staging - Staging AB Testing - For PHPUnit testing complete (I tested DBS also, the future I would go with sqlite, but today was mysql) Development - My Computer   

3 - I have not found a clear way to declare a development environment for testing. If you need to set ANV through HTACE, will it do the right job only for Apache? What is the time to set up a trial in PHPUnit? How to load and identify the Pro ZF2 Absolutely Test Bench? The concept created in different environments By default, the 'global' config files are checked in source control but are not 'local' configurations, so the idea is that most of your configuration is in global files, but the environment-specific configuration goes into local files.

Assume that your cache.local.php is in env-config-specific stuff like path if so, then you will have this file on production, platform and development; But its content will vary.

If you really want to stick to ZF1's way, and want environment-specific configuration in your control, then it can be easily achieved. Check out this blog post: You'll need to define APPLICATION_ENV stability to work for it (you can cut the line from ' public / index.php with your question '.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -