Download the PHP package kingfisherdirect/magento2-env-modules without Composer

On this page you can find all versions of the php package kingfisherdirect/magento2-env-modules. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package magento2-env-modules

Magento 2 env.php Modules

Patch prevents Magento from duplicating env.php defined modules in config.php makint it easier to manage module status per environment

Installation

[!CAUTION] This is not yet fully tested under every circumstances. It works for me.

Install patch source files

Apply patch

Install composer patches plugin, if you don't have it already.

[!NOTE] Details about applying patches can be found on Magento documentation.

In the composer.json under extra.patches add following

Now run composer install which will do the patching.
For git users, after successfull installation you should have observe an untracked file in git status (src/setup/src/Magento/Setup/Model/Installer.php). This file should be commited.

Problem and solution

Pretty much explained in following discussions:

Magento installation saves module status in config.php file that should be tracked in git repository. This file is overwritten every time bin/magento setup:upgrade is run. Whether module status changed, new module is installed everything is overwritten in config.php.

By default Magento also reads env.php file for module statuses. However, because of mentioned overwrites to config.php, it's not convinient to use env.php.

This module amends the default magento behaviour by excluding modules from beeing written to config.php if they're already in env.php.

[!IMPORTANT] Module status can be still changed in by module:enable or module:disable which will write to config.php. In cases when module is defined in both config.php and env.php, status from latter file will be considered.

Example usage scenarious

Since composer allows to define require and require-dev packages, dev tools can be added to require-dev and only manually enabled through env.php. On production require-dev packages doesn't have to be installed, therefore nothing should be in config.php.

On the other hand modules may be in require making it always installed. Because of modules registration.php file, it's automatically loaded and status will (and should) be written to config.php. Each environment may then use env.php to disable module.

Why not a PR to magento/magento2

I don't believe this is ready to be shipped in Magento by default.

This patch makes module:enable and module:disable ineffective for env.php defined modules. I needed a solution that works, not neccessary handles every scenario.


All versions of magento2-env-modules with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kingfisherdirect/magento2-env-modules contains the following files

Loading the files please wait ....