Step 4: Setting the environment type
Innomatic 7 architectural change
Innomatic 7.x will use Symfony native environment type support.
Introduction
Innomatic Platform natively supports 4 types of environments:
Environment | Description |
---|---|
Development | Local development or shared sandbox |
Integration | Continuous integration |
Staging | Multiple UAT, QA, demo, training environments |
Production | Live |
Depending on the current environment, Innomatic Platform and applications may behave in different modes.
The Innomatic desktop top bar also changes color and label, in order to signal different environments to the users.
Examples of Innomatic Desktop in different environments:
Development
Integration
Staging
Production
Setting the environment type
The environment type can be changed with Innocoder Debugger (you can get it from Innomatic Platform public AppCentral repository) or by setting PlatformEnvironment key in innomatic/core/conf/innomatic.ini to one of the following values (“production” is the default):
- development
- integration
- staging
- production
In code you can change the behavior of your application as follows:
If (InnomaticContainer::instance(‘\Innomatic\Core\InnomaticContainer’) == InnomaticContainer::ENVIRONMENT_DEVELOPMENT) { // Here we log some information ... }