phpro / grumphp

A PHP code-quality tool
MIT License
4.15k stars 430 forks source link

Environment section #785

Closed veewee closed 4 years ago

veewee commented 4 years ago
Q A
Branch master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Documented? yes
Fixed tickets #676, #769 (partially)

Example configuration:

grumphp:
  git_hook_variables:
      # These variables are injected into your "local" git hook
      # When you change them, you still need to run git:init
      # They are separated from the environment section to give you more flexibility
      # Note that currently these env vars could be overwitten by the once in environment once grumphp starts again
      ENV:
          A: B
          C: D
  environment:
    # First .env files can be loaded:
    files:
        - .env
        - .env.local
    # You can overwrite them with .env VARS directly:
    variables:
        GRUMPHP_PROJECT_DIR: .
        SOME_COMPLETELY_RANDOM_ENV_VAR: FOO
    # These paths will be prepended in your PATH variable
    # This makes it possible to e.g. add the project's phive tools directory besides the composer bin dir
    paths:
        - tools

TODO:

To decide: