Skip to content

Conversation

@evertharmeling
Copy link

@evertharmeling evertharmeling commented Sep 5, 2025

Fixes the Package php-http/message-factory is abandoned, you should avoid using it. Use psr/http-factory instead. message.

Directly switching to psr/http-factory, results in quite some tests to be refactored, as the (deprecated) \Http\Message\MessageFactory was an interface for multiple interfaces. By using the nyholm/psr7, we can use the \Nyholm\Psr7\Factory\Psr17Factory as a direct drop-in replacement.

Probably this means a bump to a new major version to remain backwards compatible as users could be using the \Http\Message\MessageFactory directly?

Otherwise the upgrade path is as simple as the changes in this PR:

  • Remove php-http/message-factory
  • Require nyholm/psr7
  • Replace Http\Message\MessageFactory with Nyholm\Psr7\Factory\Psr17Factory

I hope I don't miss something obvious, as it's almost to good to be true to still have all tests pass.

When approved/merged I'll take a look at updating the ivory-google-map-bundle too.

@bresam
Copy link
Owner

bresam commented Sep 7, 2025

Hi @evertharmeling

Thank you for yout contribution and the PR.

It's an important task and should be done 👍

But currently I am struggling with the decision to require nyholm instead of psr/http-*
I think I would prefer a generic solution with:

  • psr/http-client
  • psr/http-factory
  • psr/http-client-implementation
  • psr/http-factory-implementation

And f.e. nyholm as a suggested implementation.
So finally it's optional to use nyholm or any other package implementing these two psr's.

You mentioned an increased effort to implement it like that, do you think you can (like to) do it?

@evertharmeling
Copy link
Author

Thanks for the feedback, I was thinking the exact same thing, but I didn't want to impact the code too much yet. I'll dig into it a bit more.

@evertharmeling
Copy link
Author

Refactor was pretty simple :), see #45

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

Successfully merging this pull request may close these issues.

2 participants