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

add missing requirements of symfony/http-client to composer plugin #249

Merged
merged 1 commit into from
Jun 19, 2023

Conversation

dbu
Copy link
Contributor

@dbu dbu commented Jun 17, 2023

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

What's in this PR?

As discovered in #248, the composer plugin does not install a functional set of dependencies to actually discover the psr18 client when installing symfony/http-client.

Reproduce

To reproduce the problem, create an empty folder, create composer.json with the following content and run composer update:

{
  "config": {
    "allow-plugins": {
      "php-http/discovery": true
    }
  },
  "require": {
    "psr/http-client-implementation": "*",
    "php-http/discovery": "^1.18"
  }
}

ls vendor/psr shows that psr/http-client is not installed.

Checklist

  • Updated CHANGELOG.md to describe BC breaks / deprecations | new feature | bugfix

@dbu
Copy link
Contributor Author

dbu commented Jun 17, 2023

@nicolas-grekas i will adjust the unit tests and update changelog if you agree that this is the correct thing to do.

Copy link
Collaborator

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct to me. I suppose I was expecting that libs that require an implem would also require the abstraction :)

@dbu
Copy link
Contributor Author

dbu commented Jun 19, 2023

I suppose I was expecting that libs that require an implem would also require the abstraction :)

the trap of optional dependencies... i adjusted the test expectation.

@dbu dbu merged commit 5c757af into 1.x Jun 19, 2023
29 of 30 checks passed
@dbu dbu deleted the composer-plugin branch June 19, 2023 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants