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

Prefer php-http/discovery over nyholm/psr7 when installed #1198

Merged
merged 1 commit into from
May 6, 2023

Conversation

nicolas-grekas
Copy link
Member

Q A
License MIT
Doc issue/PR -

Note that php-http/discovery itself defaults to nyholm/psr7 so in practice this shouldn't change much, except for people that want to rely on another PSR-17 implementation.

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) May 3, 2023 15:15
@github-actions
Copy link

github-actions bot commented May 3, 2023

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes/flex/pull-1198/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes/flex/pull-1198/index.json
  2. Install the package(s) related to this recipe:

    composer req 'symfony/flex:^1.16'
    composer req 'nyholm/psr7:^1.0' 'php-http/discovery:^1.18'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes.
I'm going keep this comment up to date with any updates of the attached patch.

@symfony-recipes-bot symfony-recipes-bot merged commit eb27ff3 into main May 6, 2023
@symfony-recipes-bot symfony-recipes-bot deleted the discovery branch May 6, 2023 16:42
@tacman
Copy link
Contributor

tacman commented Sep 8, 2024

The recipe throws a warning about not being installable.

Skipping recipe for nyholm/psr7: all versions of the recipe conflict with your package versions.

~/g/museado/museado$ composer why nyholm/psr7
php-http/discovery 1.19.4 conflicts nyholm/psr7 (<1.0)   
toshy/bunnynet-php 4.5.0  requires  nyholm/psr7 (^1.6.1)
 
~/g/museado/museado$ composer why php-http/discovery
knplabs/github-api                v3.14.1 requires  php-http/discovery (^1.12) 
meilisearch/meilisearch-php       v1.10.0 requires  php-http/discovery (^1.7)  
php-http/multipart-stream-builder 1.4.2   requires  php-http/discovery (^1.15) 
symfony/http-client               v7.1.4  conflicts php-http/discovery (<1.15) 
symfony/psr-http-message-bridge   v7.1.4  conflicts php-http/discovery (<1.15) 

I got an explanation here: ToshY/BunnyNet-PHP#141

but is there a way to remove the warning? It's not causing any harm, of course.

@derrabus
Copy link
Member

derrabus commented Sep 8, 2024

Is this a warning? I read this as: FYI, I didn't install a recipe for this package and here's the reason why.

@tacman
Copy link
Contributor

tacman commented Sep 8, 2024

Yes, it's not a warning, but it's a message that says "I didn't do something because there was a conflict". So I'd love to avoid seeing that message, I think it happens on every deployment.

@nicolas-grekas
Copy link
Member Author

I don't have a solution for skipping this warning. You can just ignore it for now.
We don't want this recipe installed when php-http/discovery is also installed, and that's the way to do it...

@tacman
Copy link
Contributor

tacman commented Sep 9, 2024

ah, that makes more sense. Thanks.

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.

6 participants