torfs-ict/grumphp-php-selector

Select your local PHP executable to execute GrumPHP tasks

1.0.2 2023-10-10 08:11 UTC

This package is auto-updated.

Last update: 2024-04-24 09:43:44 UTC


README

Description

GrumPHP does not allow to select the actual PHP version to use to execute its tasks as it directly uses the bin executable. This extension attempts to solve this by allowing you to define the actual PHP binary in a separate environment variable file.

Installation

$ composer require --dev torfs-ict/grumphp-php-selector

Then, edit your GrumPHP configuration file and register the extension:

# grumphp.yml
grumphp:
  extensions:
    - TorfsICT\GrumPHP\PhpSelector\PhpSelectorGrumPHPExtension

After that, create .env.grumphp in your project root containing the GRUMPHP_PHP_EXECUTABLE variable:

# .env.grumphp
GRUMPHP_PHP_EXECUTABLE=php8.2

We suggest adding this file to your .gitignore so everyone working on the project can choose to use this or not. Note that the .env.grumphp is optional and omitting it will simply make GrumPHP behave as usual.