renekorss / Banklink

PHP payment library to easily integrate Baltic banklinks (supports old and new iPizza protocol), E-commerce gateaway (Estcard, Nets Estonia), Liisi Payment Link and Pocopay.

Home Page:http://renekorss.github.io/Banklink/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem of PHP versions

peter279k opened this issue · comments

Expected Behavior

  • All tests will be successful on php-7.1 and php-7.0 versions.

Actual Behavior

  • It will not be worked on php-7.1 and php-7,2 versions because the PHPUnit version is defined as the 8.*. This PHPUnit version will require php-7.2 version at least.
  • And it will output errors when using php-7.0 and php-7.1 versions to install cached dependencies.
    The reason is about this cached dependencies are installed on php-7.2 version at least.
    The error output will be as follows:
 Problem 1
    - Installation request for cedx/coveralls v11.2.0 -> satisfiable by cedx/coveralls[v11.2.0].
    - cedx/coveralls v11.2.0 requires php >=7.2.0 -> your PHP version (7.1.33) does not satisfy that requirement.
  Problem 2
    - Installation request for cedx/lcov v7.0.0 -> satisfiable by cedx/lcov[v7.0.0].
    - cedx/lcov v7.0.0 requires php >=7.2.0 -> your PHP version (7.1.33) does not satisfy that requirement.
  Problem 3
    - Installation request for cedx/which v7.2.0 -> satisfiable by cedx/which[v7.2.0].
    - cedx/which v7.2.0 requires php >=7.2.0 -> your PHP version (7.1.33) does not satisfy that requirement.
  Problem 4
    - Installation request for doctrine/lexer 1.2.0 -> satisfiable by doctrine/lexer[1.2.0].
    - doctrine/lexer 1.2.0 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
  Problem 5
    - Installation request for phpdocumentor/reflection-docblock 5.1.0 -> satisfiable by phpdocumentor/reflection-docblock[5.1.0].
    - phpdocumentor/reflection-docblock 5.1.0 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
  Problem 6
    - Installation request for phpdocumentor/type-resolver 1.1.0 -> satisfiable by phpdocumentor/type-resolver[1.1.0].
    - phpdocumentor/type-resolver 1.1.0 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
  Problem 7
    - Installation request for phpunit/php-code-coverage 7.0.10 -> satisfiable by phpunit/php-code-coverage[7.0.10].
    - phpunit/php-code-coverage 7.0.10 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
  Problem 8
    - Installation request for phpunit/phpunit 8.5.3 -> satisfiable by phpunit/phpunit[8.5.3].
    - phpunit/phpunit 8.5.3 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
  Problem 9
    - Installation request for psr/event-dispatcher 1.0.0 -> satisfiable by psr/event-dispatcher[1.0.0].
    - psr/event-dispatcher 1.0.0 requires php >=7.2.0 -> your PHP version (7.1.33) does not satisfy that requirement.
  Problem 10
    - Installation request for sebastian/global-state 3.0.0 -> satisfiable by sebastian/global-state[3.0.0].
    - sebastian/global-state 3.0.0 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
  Problem 11
    - Installation request for sebastian/type 1.1.3 -> satisfiable by sebastian/type[1.1.3].
    - sebastian/type 1.1.3 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
  Problem 12
    - Installation request for symfony/config v5.0.7 -> satisfiable by symfony/config[v5.0.7].
    - symfony/config v5.0.7 requires php ^7.2.5 -> your PHP version (7.1.33) does not satisfy that requirement.
  Problem 13
    - Installation request for symfony/console v5.0.7 -> satisfiable by symfony/console[v5.0.7].
    - symfony/console v5.0.7 requires php ^7.2.5 -> your PHP version (7.1.33) does not satisfy that requirement.
  Problem 14
    - Installation request for symfony/dependency-injection v5.0.7 -> satisfiable by symfony/dependency-injection[v5.0.7].
    - symfony/dependency-injection v5.0.7 requires php ^7.2.5 -> your PHP version (7.1.33) does not satisfy that requirement.
  Problem 15
    - Installation request for symfony/event-dispatcher v5.0.7 -> satisfiable by symfony/event-dispatcher[v5.0.7].
    - symfony/event-dispatcher v5.0.7 requires php ^7.2.5 -> your PHP version (7.1.33) does not satisfy that requirement.
  Problem 16
    - Installation request for symfony/event-dispatcher-contracts v2.0.1 -> satisfiable by symfony/event-dispatcher-contracts[v2.0.1].
    - symfony/event-dispatcher-contracts v2.0.1 requires php ^7.2.5 -> your PHP version (7.1.33) does not satisfy that requirement.
  Problem 17
    - Installation request for symfony/filesystem v5.0.7 -> satisfiable by symfony/filesystem[v5.0.7].
    - symfony/filesystem v5.0.7 requires php ^7.2.5 -> your PHP version (7.1.33) does not satisfy that requirement.
  Problem 18
    - Installation request for symfony/finder v5.0.7 -> satisfiable by symfony/finder[v5.0.7].
    - symfony/finder v5.0.7 requires php ^7.2.5 -> your PHP version (7.1.33) does not satisfy that requirement.
  Problem 19
    - Installation request for symfony/options-resolver v5.0.7 -> satisfiable by symfony/options-resolver[v5.0.7].
    - symfony/options-resolver v5.0.7 requires php ^7.2.5 -> your PHP version (7.1.33) does not satisfy that requirement.
  Problem 20
    - Installation request for symfony/process v5.0.7 -> satisfiable by symfony/process[v5.0.7].
    - symfony/process v5.0.7 requires php ^7.2.5 -> your PHP version (7.1.33) does not satisfy that requirement.
  Problem 21
    - Installation request for symfony/service-contracts v2.0.1 -> satisfiable by symfony/service-contracts[v2.0.1].
    - symfony/service-contracts v2.0.1 requires php ^7.2.5 -> your PHP version (7.1.33) does not satisfy that requirement.
  Problem 22
    - Installation request for symfony/stopwatch v5.0.7 -> satisfiable by symfony/stopwatch[v5.0.7].
    - symfony/stopwatch v5.0.7 requires php ^7.2.5 -> your PHP version (7.1.33) does not satisfy that requirement.
  Problem 23
    - doctrine/lexer 1.2.0 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
    - doctrine/annotations 1.10.1 requires doctrine/lexer 1.* -> satisfiable by doctrine/lexer[1.2.0].
    - Installation request for doctrine/annotations 1.10.1 -> satisfiable by doctrine/annotations[1.10.1].

Possible solution

  • IMHO, I think we can consider using following solutions to resolve this:
  • Let the package require php-7.0 or php-7.1 version at least.
  • And update the cached dependencies with php-7.0 or php-7.1 version.
  • Let the PHPUnit package version definition be the 7.* and it can be compatible with php-7.1 version during PHPUnit tests.

@renekorss, what do you think about this?

Once this issue is accepted, I can work on this :).

PHP < 7.2 is supported only for usage of package, not development.
So you should install dependencies with composer install --no-dev command.
This way this package dev dependencies won't get installed.
This works?

I think it can also set the PHP version requirement on require-dev block.

And this issue can be resolved.

Is it possible to require different PHP version for require and `require-dev? I can't find any documentation for this nor have I time currently to test it.

I can install this package with php-7.1 version.

And this issue I think it's resolved :).