phpro / grumphp-shim

This repository provides easy way to install GrumPHP without the risk of conflicting dependencies.
MIT License
22 stars 3 forks source link

GrumShim dependency KO #6

Closed TonySma closed 4 years ago

TonySma commented 4 years ago

Hi, When we require grum-shim with php7.1 we have a problem with the grumphp.phar file It's seems that the grumphp.phar in grumphp-shim is compiled with version 0.22 of grumphp which require php7.3

In grumpphp-shim 0.22 there is a dependency on php7.1 (here) then composer accept this version.

After that, on git commit we got this error :

php composer.phar remove phpro/grumphp-shim
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 0 updates, 1 removal

Box Requirements Checker
========================

> Using PHP 7.1.33
> PHP is using the following php.ini file:
  WARNING: No configuration file (php.ini) used by PHP!

> Checking Box requirements:
  E...

 [ERROR] Your system is not ready to run the application.                       

Fix the following mandatory requirements:
=========================================

 * The application requires the version "^7.3" or greater.

GrumPHP can not sniff your commits! (invalid-exit-code)
TonySma commented 4 years ago

Step to reproduce:


$ docker run -it php:7.1 /bin/bash
$ mkdir app && cd app
$ apt-get update && apt-get intall git
...
$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
$ php -r "if (hash_file('sha384', 'composer-setup.php') === '8a6138e2a05a8c28539c9f0fb361159823655d7ad2deecb371b04a83966c61223adc522b0189079e3e9e277cd72b8897') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
Installer verified
$ php composer-setup.php
...
$ php -r "unlink('composer-setup.php');"
$ php composer.phar require phpro/grumphp-shim
...
Writing lock file
Generating autoload files

Box Requirements Checker
========================

> Using PHP 7.1.33
> PHP is using the following php.ini file:
  WARNING: No configuration file (php.ini) used by PHP!

> Checking Box requirements:
  E...

 [ERROR] Your system is not ready to run the application.                       

Fix the following mandatory requirements:
=========================================

 * The application requires the version "^7.3" or greater.

GrumPHP can not sniff your commits! (invalid-exit-code)
veewee commented 4 years ago

Thanks for reporting. I indeed forgot to change the composer file inside this project.

This repo will support the same PHP versions as the main repo: https://github.com/phpro/grumphp/blob/4608d6c502e9c32bea2d81b3337f908f9c5d9327/composer.json#L17

This means we don't support PHP 7.1 anymore in grumphp 0.22.

You can use a lower version instead.

veewee commented 4 years ago

(this will be fixed in next release)