We are happy to announce another feature release. It comes with three new commands to work with app/etc/env.php file.

If you do not have env.php in your shop (maybe you cloned a shared project) then it’s now easy to create new file interactivly with the brand new config:env:create command.

The command was originally published by Peter Jaap Blaakmeer. He was was so kind to provide us the code for integration.

n98-magerun2.phar config:env:create

If you already have an existing env.php file then you can now print all the values in a flatten version with config:env:show command.

It’s also possible to provide a key to show only single values. That’s also useful for scripting.

Some examples:

n98-magerun2.phar config:env:show  # whole content
$ n98-magerun2.phar config:env:show backend.frontName

The output can be printed in different formats.

$ n98-magerun2.phar config:env:show --format=json
$ n98-magerun2.phar config:env:show --format=csv
$ n98-magerun2.phar config:env:show --format=xml

If you like to modify or add a new value then the new config:env:set command can help you.

n98-magerun2.phar config:env:set backend.frontName mybackend
$ n98-magerun2.phar config:env:set crypt.key bb5b0075303a9bb8e3d210a971674367
$ n98-magerun2.phar config:env:set session.redis.host 192.168.1.1
$ n98-magerun2.phar config:env:set 'x-frame-options' '*'

Changelog

  • New: Three new commands (config:env:create, config:env:show, config:env:set) (by Peter Jaap Blaakmeer)
  • Imp: Update Composer to 1.10.5
  • Fix: #535: Twig 2.0 compatibility
  • Imp: #538: Support Magento 2.3.4 (by Alexander Menk)

We hope you like the new release.


0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.