2017 © Pedro PelĂĄez
 

symfony-bundle safe-command-bundle

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

image

yokai/safe-command-bundle

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

  • Sunday, December 18, 2016
  • by yann-eugone
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

YokaiSafeCommandBundle

Tests Coverage Contributors, (*1)

License Latest Stable Version Current Unstable Version Downloads Monthly Total Downloads, (*2)

Did you find yourself ashamed, running command in the wrong environment ?, (*3)

"Oups... I dropped the database in the prod environment..." - A guy that lost his job, (*4)

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

That's it..., (*6)

Installation

Add the bundle as dependency with Composer

``` bash composer require yokai/safe-command-bundle, (*7)


### Enable the bundle in the kernel ``` php <?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., (*8)

Configuration

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

That "standard" command list can be overridden:, (*10)

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

[!NOTE] "standard" disabled commands are viewable via the command:, (*11)

bin/console config:dump-reference yokai_safe_command

And you can also add your own commands to the list:, (*12)

# 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., (*13)

License

This library is under MIT LICENSE., (*14)

Authors

The bundle was originally created by Yann Eugoné., (*15)

See the list of contributors., (*16)

The Versions

18/12 2016

dev-master

9999999-dev

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Yann Eugoné

configuration command