parameters:
  bin_dir: ./vendor/bin
  git_dir: .
  tasks: ~

services:

    config:
        class: GrumPHP\Configuration\GrumPHP
        arguments: [@service_container]

    filesystem:
        class: Symfony\Component\Filesystem\Filesystem

    process_builder:
        class: Symfony\Component\Process\ProcessBuilder
        prototype: true

    git.repository:
        class: GitElephant\Repository
        arguments: [%git_dir%]

    task_runner:
        class: GrumPHP\Runner\TaskRunner

    locator.external_command:
        class: GrumPHP\Locator\ExternalCommand
        arguments: [%bin_dir%, @filesystem]

    locator.changed_files:
        class: GrumPHP\Locator\ChangedFiles
        arguments: [@git.repository]

    task.phpcs:
        class: GrumPHP\Task\Phpcs
        arguments:
          - @config
          - "@=parameter('tasks')['phpcs'] ? parameter('tasks')['phpcs'] : []"
          - @locator.external_command
          - @process_builder
        tags:
          - {name: grumphp.task, config: phpcs}

    task.phpspec:
        class: GrumPHP\Task\Phpspec
        arguments:
          - @config
          - "@=parameter('tasks')['phpspec'] ? parameter('tasks')['phpspec'] : []"
          - @locator.external_command
          - @process_builder
        tags:
          - {name: grumphp.task, config: phpspec}
parameters:
  bin_dir: ./vendor/bin
  git_dir: .
  tasks: []

services:

    config:
        class: GrumPHP\Configuration\GrumPHP
        arguments: [@service_container]

    filesystem:
        class: Symfony\Component\Filesystem\Filesystem

    process_builder:
        class: Symfony\Component\Process\ProcessBuilder
        prototype: true

    git.repository:
        class: GitElephant\Repository
        arguments: [%git_dir%]

    task_runner:
        class: GrumPHP\Runner\TaskRunner

    locator.external_command:
        class: GrumPHP\Locator\ExternalCommand
        arguments: [%bin_dir%, @filesystem]

    locator.changed_files:
        class: GrumPHP\Locator\ChangedFiles
        arguments: [@git.repository]

    task.phpcs:
        class: GrumPHP\Task\Phpcs
        arguments:
          - @config
          - "@=parameter('tasks')['phpcs'] ? parameter('tasks')['phpcs'] : []"
          - @locator.external_command
          - @process_builder
        tags:
          - {name: grumphp.task, config: phpcs}

    task.phpspec:
        class: GrumPHP\Task\Phpspec
        arguments:
          - @config
          - "@=parameter('tasks')['phpspec'] ? parameter('tasks')['phpspec'] : []"
          - @locator.external_command
          - @process_builder
        tags:
          - {name: grumphp.task, config: phpspec}
Fix issue when no grumphp.yml is available
Fix issue when no grumphp.yml is available
