Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We've faced the following error while using Billplz\Laravel\Billplz::bill(). No php-http message factories found. Note that the php-http message factories are deprecated in favor of the PSR-17 message factories #10

Open
syahrinseth opened this issue Nov 20, 2023 · 1 comment

Comments

@syahrinseth
Copy link

  • Library Version: 2.3.0
  • API Version: v3
  • Laravel Version: 8.83.27
  • PHP Version: 8.1.19

Description:

We've faced the following error while using Billplz\Laravel\Billplz::bill(). I believe one of the dependencies 'laravie/codex-common' are using deprecated code in the 'Laravie\Codex\Common\Discovery::make()'.

[2023-11-21 03:45:40] local.ERROR: No php-http message factories found. Note that the php-http message factories are deprecated in favor of the PSR-17 message factories. To use the legacy Guzzle, Diactoros or Slim Framework factories of php-http, install php-http/message and php-http/message-factory and the chosen message implementation. {"userId":1,"exception":"[object] (Http\\Discovery\\NotFoundException(code: 0): No php-http message factories found. Note that the php-http message factories are deprecated in favor of the PSR-17 message factories. To use the legacy Guzzle, Diactoros or Slim Framework factories of php-http, install php-http/message and php-http/message-factory and the chosen message implementation. at /Users/muhammadnorsyahrinseth/Documents/projects/kindygo/vendor/php-http/discovery/src/MessageFactoryDiscovery.php:29)
[stacktrace]
#0 /Users/muhammadnorsyahrinseth/Documents/projects/kindygo/vendor/laravie/codex-common/src/Common/Discovery.php(38): Http\\Discovery\\MessageFactoryDiscovery::find()
#1 /Users/muhammadnorsyahrinseth/Documents/projects/kindygo/vendor/laravie/codex-common/src/Common/Discovery.php(26): Laravie\\Codex\\Common\\Discovery::make()
#2 /Users/muhammadnorsyahrinseth/Documents/projects/kindygo/vendor/jomweb/billplz-laravel/src/BillplzServiceProvider.php(62): Laravie\\Codex\\Common\\Discovery::client()
#3 /Users/muhammadnorsyahrinseth/Documents/projects/kindygo/vendor/jomweb/billplz-laravel/src/BillplzServiceProvider.php(44): Billplz\\Laravel\\BillplzServiceProvider->createHttpClient()
#4 /Users/muhammadnorsyahrinseth/Documents/projects/kindygo/vendor/jomweb/billplz-laravel/src/BillplzServiceProvider.php(27): Billplz\\Laravel\\BillplzServiceProvider->createBillplzClient(Array)
#5 /Users/muhammadnorsyahrinseth/Documents/projects/kindygo/vendor/laravel/framework/src/Illuminate/Container/Container.php(873): Billplz\\Laravel\\BillplzServiceProvider->Billplz\\Laravel\\{closure}(Object(Illuminate\\Foundation\\Application), Array)
#6 /Users/muhammadnorsyahrinseth/Documents/projects/kindygo/vendor/laravel/framework/src/Illuminate/Container/Container.php(758): Illuminate\\Container\\Container->build(Object(Closure))
#7 /Users/muhammadnorsyahrinseth/Documents/projects/kindygo/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\\Container\\Container->resolve('billplz', Array, true)
#8 /Users/muhammadnorsyahrinseth/Documents/projects/kindygo/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\\Foundation\\Application->resolve('billplz', Array)
#9 /Users/muhammadnorsyahrinseth/Documents/projects/kindygo/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(836): Illuminate\\Container\\Container->make('billplz', Array)
#10 /Users/muhammadnorsyahrinseth/Documents/projects/kindygo/vendor/laravel/framework/src/Illuminate/Container/Container.php(1419): Illuminate\\Foundation\\Application->make('billplz')
#11 /Users/muhammadnorsyahrinseth/Documents/projects/kindygo/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(198): Illuminate\\Container\\Container->offsetGet('billplz')
#12 /Users/muhammadnorsyahrinseth/Documents/projects/kindygo/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(166): Illuminate\\Support\\Facades\\Facade::resolveFacadeInstance('billplz')
#13 /Users/muhammadnorsyahrinseth/Documents/projects/kindygo/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(255): Illuminate\\Support\\Facades\\Facade::getFacadeRoot()
#14 /Users/muhammadnorsyahrinseth/Documents/projects/kindygo/app/Model/Invoice.php(910): Illuminate\\Support\\Facades\\Facade::__callStatic('bill', Array)

Steps To Reproduce:

Running the following code $bill = \Billplz\Laravel\Billplz::bill(); to reproduce the above error.

@semul
Copy link

semul commented Feb 12, 2024

Temporary Solution For This Issue

composer require php-http/message-factory

Note: Package php-http/message-factory is abandoned!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants