yokai/safe-command-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

yokai/safe-command-bundle

Composer 安装命令:

composer require yokai/safe-command-bundle

包简介

Prevent from running dangerous commands, or unwanted environment, based on configuration.

README 文档

README

Tests Coverage Contributors

License Latest Stable Version Current Unstable Version Downloads Monthly Total Downloads

Did you find yourself ashamed, running command in the wrong environment ?

"Oups... I dropped the database in the prod environment..." - A guy that lost his job

This bundle want to help. Using configuration, define commands that you are not expecting to be used in your environment.

That's it...

Installation

Add the bundle as dependency with Composer

composer require yokai/safe-command-bundle

Enable the bundle in the kernel

<?php
// config/bundles.php

return [
    // ...
    Yokai\SafeCommandBundle\YokaiSafeCommandBundle::class => ['prod' => true],
];

Note

The bundle is enabled only for prod here, but you are free to do whatever you want.

Configuration

The bundle comes with some commands disabled by default (from Symfony's standards).

That "standard" command list can be overridden:

# config/packages/yokai_safe_command.yaml
when@prod:
    yokai_safe_command:
        standard: []

Note

"standard" disabled commands are viewable via the command:

bin/console config:dump-reference yokai_safe_command

And you can also add your own commands to the list:

# config/packages/yokai_safe_command.yaml
when@prod:
    yokai_safe_command:
        custom:
          - 'vendor:my:dev-command'
          - 'app:my:dev-command'

Note

standard and custom configs are merged together to create the final list of disabled commands.

License

This library is under MIT LICENSE.

Authors

The bundle was originally created by Yann Eugoné.

See the list of contributors.

统计信息

  • 总下载量: 14
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-12-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固