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

Allow pinning the preferred implementations in composer.json #232

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

nicolas-grekas
Copy link
Collaborator

@nicolas-grekas nicolas-grekas commented Apr 26, 2023

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Related tickets fixes #223
Documentation TBD
License MIT

Add this to your composer.json to pin guzzle as PSR-17 implementation even if nyholm/psr7 is installed:

    "extra": {
        "discovery": {
            "psr/http-factory-implementation": "GuzzleHttp\\Psr7\\HttpFactory"
        }
    }

This also works for single interfaces:

    "extra": {
        "discovery": {
            "Psr\\Http\\Message\\RequestFactoryInterface": "Slim\\Psr7\\Factory\\RequestFactory"
        }
    }

@boesing
Copy link
Contributor

boesing commented Apr 26, 2023

Huge! Thanks.

@dbu
Copy link
Contributor

dbu commented Apr 28, 2023

i am adding some documentation for this in php-http/documentation#305

@dbu
Copy link
Contributor

dbu commented Apr 28, 2023

d'oh, i missed php-http/documentation#304

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.

Allow pinning an implementation when several are available
3 participants