Open peter279k opened 3 years ago
The problem is about the wyrihaximus/json-throwable:^2.0
version.
When upgrading the wyrihaximus/json-throwable:^3.0
, it should let this package require php-7.4
version at least because the wyrihaximus/json-throwable:^3.0 requires php-7.4
version at least.
@oscarotero, do you have any idea about this?
@peter279k Or, you could go with wyrihaximus/json-throwable:^4 || ^2
and support both the currently used version and the latest version which includes PHP 8. IIRC they are compatible.
@peter279k Or, you could go with
wyrihaximus/json-throwable:^4 || ^2
and support both the currently used version and the latest version which includes PHP 8. IIRC they are compatible.
Thanks for your reply and recommendation. This issue has been resolved.
But it presents about middlewares/utils
depedency:
Problem 1
- middlewares/utils[v2.1.0, ..., v2.2.0] require php ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
- Root composer.json requires middlewares/utils ^2.1 -> satisfiable by middlewares/utils[v2.1.0, v2.1.1, v2.2.0].
@peter279k You can do the same there, target both v2 and v3. (3.2 adds PHP 8 support.
After upgrading the middlewares/utils
to be ^2.1 || ^3.2
, this will have the failed PHPUnit tests:
PHPUnit 9.5.0 by Sebastian Bergmann and contributors.
Runtime: PHP 7.4.13
Configuration: /data/json-exception-handler/phpunit.xml.dist
Warning: XDEBUG_MODE=coverage or xdebug.mode=coverage has to be set
Warning: Your XML configuration validates against a deprecated schema.
Suggestion: Migrate your XML configuration using "--migrate-configuration"!
EEEE 4 / 4 (100%)
Time: 00:00.150, Memory: 8.00 MB
There were 4 errors:
1) Middlewares\Tests\JsonExceptionHandlerTest::testMiddleware
RuntimeException: No PSR-17 factory detected to create a response
/data/json-exception-handler/vendor/middlewares/utils/src/FactoryDiscovery.php:178
/data/json-exception-handler/vendor/middlewares/utils/src/FactoryDiscovery.php:104
/data/json-exception-handler/vendor/middlewares/utils/src/Factory.php:53
/data/json-exception-handler/src/JsonExceptionHandler.php:39
/data/json-exception-handler/tests/JsonExceptionHandlerTest.php:18
2) Middlewares\Tests\JsonExceptionHandlerTest::testContentType
RuntimeException: No PSR-17 factory detected to create a response
/data/json-exception-handler/vendor/middlewares/utils/src/FactoryDiscovery.php:178
/data/json-exception-handler/vendor/middlewares/utils/src/FactoryDiscovery.php:104
/data/json-exception-handler/vendor/middlewares/utils/src/Factory.php:53
/data/json-exception-handler/src/JsonExceptionHandler.php:39
/data/json-exception-handler/tests/JsonExceptionHandlerTest.php:40
3) Middlewares\Tests\JsonExceptionHandlerTest::testDisableTrace
RuntimeException: No PSR-17 factory detected to create a response
/data/json-exception-handler/vendor/middlewares/utils/src/FactoryDiscovery.php:178
/data/json-exception-handler/vendor/middlewares/utils/src/FactoryDiscovery.php:104
/data/json-exception-handler/vendor/middlewares/utils/src/Factory.php:53
/data/json-exception-handler/src/JsonExceptionHandler.php:39
/data/json-exception-handler/tests/JsonExceptionHandlerTest.php:59
4) Middlewares\Tests\JsonExceptionHandlerTest::testJsonOptions
RuntimeException: No PSR-17 factory detected to create a response
/data/json-exception-handler/vendor/middlewares/utils/src/FactoryDiscovery.php:178
/data/json-exception-handler/vendor/middlewares/utils/src/FactoryDiscovery.php:104
/data/json-exception-handler/vendor/middlewares/utils/src/Factory.php:53
/data/json-exception-handler/src/JsonExceptionHandler.php:39
/data/json-exception-handler/tests/JsonExceptionHandlerTest.php:82
It seems that the behavior will be different for middlewares/utils:^2.1
and midlewares/utils:^3.2
versions.
I think it should be considered or fix the failed tests. Is there any idea about this?
When running the Quality assurance step, it will present following error message:
I think it should be considered.