amadeus-ws-client icon indicating copy to clipboard operation
amadeus-ws-client copied to clipboard

Dependencies conflict

Open therealartz opened this issue 4 months ago • 0 comments

With upgading psr/log to v3

https://github.com/amabnl/amadeus-ws-client/commit/b382ba263f425fd5d12d37a4f40ee72da72435c2 https://github.com/amabnl/amadeus-ws-client/commit/26641e6cc73d5692a4424c2d1ef6313146556f48

Project is now locked to PHP 8:

- psr/log 3.0.0 requires php >=8.0.0 -> your php version (7.4.33) does not satisfy that requirement.

Which breaks original repository rule that code must work on PHP 5.4

In the meantime, when working on PHP 8, unit tests are not able to run:

amadeus-ws-client % ./vendor/bin/phpunit

Fatal error: Uncaught Error: Call to undefined function each() in ./amadeus-ws-client/vendor/phpunit/phpunit/src/Util/Getopt.php:38
Stack trace:
#0 ./amadeus-ws-client/vendor/phpunit/phpunit/src/TextUI/Command.php(237): PHPUnit_Util_Getopt::getopt(Array, 'd:c:hv', Array)
#1 ./amadeus-ws-client/vendor/phpunit/phpunit/src/TextUI/Command.php(111): PHPUnit_TextUI_Command->handleArguments(Array)
#2 ./amadeus-ws-client/vendor/phpunit/phpunit/src/TextUI/Command.php(100): PHPUnit_TextUI_Command->run(Array, true)
#3 ./amadeus-ws-client/vendor/phpunit/phpunit/phpunit(52): PHPUnit_TextUI_Command::main()
#4 ./amadeus-ws-client/vendor/bin/phpunit(123): include('/Users/...')
#5 {main}
  thrown in ./amadeus-ws-client/vendor/phpunit/phpunit/src/Util/Getopt.php on line 38

Function each was removed in PHP 8. To solve this need either to use PHP < 8 or upgrade PHPUnit version, but it cannot be done, as newever PHPUnit version (>4) requires PHP 5.6+ (so not supported for PHP 5.4). At the same time we'd like to still have newer psr/log.

@DerMika maybe we could release a new major version of amadeus-ws-client (v2?) that is intended for PHP 8? It will have psr/log^3 and phpunit^8|^9 ?

I could try to make a PR with such updates if you don't have time resources, but I just need to know what do you think?

therealartz avatar Oct 21 '24 22:10 therealartz