承接 softbricks/php-set-env 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

softbricks/php-set-env

Composer 安装命令:

composer require softbricks/php-set-env

包简介

Tool for setting options in .ENV files over the CLI

README 文档

README

This tool helps setting .env file configs via the command line.

Install

We recommend installing the package via composer.

composer require softbricks/php-set-env

After that, it is most practical to create a composer script (within composer.json) for easier usage:

{
    "scripts": {
        "set-env": [
            "SoftBricks\\CLI\\SetEnv::execute"
        ]
    }
}

Usage

Let's say we have a .env file that looks like this ...

FOO=BAR

[CATEGORY1]
NESTED_PARAM=Hi, I am nested

... and we want reset the value of FOO. This can be done with:

composer set-env -- --key=FOO --value="not bar anymore"

This call results in the following .env file:

FOO=not bar anymore

[CATEGORY1]
NESTED_PARAM=Hi, I am nested

It is also possible to add new key / value pairs, with the same call structure. For example:

composer set-env -- --key=NEW --value="wow I'm so new"

To set the NESTED_PARAM within CATEGORY1 we have to structure our call like this:

composer set-env -- --category=CATEGORY1 --key=NESTED_PARAM --value="Changed nested param"

统计信息

  • 总下载量: 3.36k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 4
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2017-10-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固