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

Update php-http/promise requirement from ~1.2.0 to ~1.2.0 || ~1.3.0 #159

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jul 30, 2024

Updates the requirements on php-http/promise to permit the latest version.

Release notes

Sourced from php-http/promise's releases.

1.3.1

  • Made nullable parameter types explicit (PHP 8.4 compatibility)
Changelog

Sourced from php-http/promise's changelog.

1.3.1 - 2024-03-15

  • Made nullable parameter types explicit (PHP 8.4 compatibility)

1.3.0 - 2024-01-04

Fixed

  • Reverted generic annotations on promise - as then returns another promise, there seems no way to properly document this.

1.2.1 - 2023-11-08

Added

  • Fixed PHPDoc for wait() and then()'s onRejected callable

1.2.0 - 2023-10-24

Added

  • Generic annotations

1.1.0 - 2020-07-07

Added

  • Test with PHP 7.1, 7.2, 7.3, 7.4 and 8.0

Removed

  • PHP 5 and 7.0 support

Fixed

  • Fixed PHPDoc for Promise::then

1.0.0 - 2016-01-26

Removed

  • PSR-7 dependency

1.0.0-RC1 - 2016-01-12

Added

  • Tests for full coverage

Changed

... (truncated)

Commits
  • fc85b1f prepare release
  • 5caa0bc Merge pull request #34 from derrabus/bugfix/implicit-nullable
  • 35fa82d Make nullable parameter types explicit
  • 13d7636 Merge pull request #33 from php-http/phpdoc-revert
  • 2916a60 revert generic annotations
  • 44a67cb prepare release
  • 7fa2284 Accept Throwable for onRejected and expand return type for wait() (#30)
  • See full diff in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [php-http/promise](https://github.com/php-http/promise) to permit the latest version.
- [Release notes](https://github.com/php-http/promise/releases)
- [Changelog](https://github.com/php-http/promise/blob/1.x/CHANGELOG.md)
- [Commits](php-http/promise@1.2.0...1.3.1)

---
updated-dependencies:
- dependency-name: php-http/promise
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot requested a review from a team as a code owner July 30, 2024 21:10
@dependabot dependabot bot added dependencies Pull requests that update a dependency file php Pull requests that update Php code labels Jul 30, 2024
@SilasKenneth
Copy link
Member

Breaking

Copy link
Contributor Author

dependabot bot commented on behalf of github Jul 31, 2024

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot dependabot bot deleted the dependabot/composer/php-http/promise-approx-1.2.0or-approx-1.3.0 branch July 31, 2024 09:03
@baywet
Copy link
Member

baywet commented Jul 31, 2024

@SilasKenneth why do you consider this to be breaking?

@SilasKenneth
Copy link
Member

SilasKenneth commented Jul 31, 2024

Version 1.3.0 removes the generics for Promise which were introduced in 1.2.0. Updating to 1.3 would mean that this

/** 
@returns Promise<Type> 
**/
public function get(): Promise {}

will no-longer be valid and this is used in the RequestAdapter

* @return Promise<T|null> with the deserialized response model.

@baywet

@baywet
Copy link
Member

baywet commented Jul 31, 2024

Thanks for the additional context here. I remember the discussions at the time and it seems we collectively forgot about resolving this.
What I'm worried about is that at some point a client application will have a different version of the dependency and get into a complicated situation because of that.

Here is some more context
php-http/promise#27
php-http/promise#33
php-http/client-common#235

Ideally: we'd be able to submit another pull request to the upstream dependency which enables genericity while solving the concerns that were discovered.
As an alternative: we should evaluate the impact of bumping to this latest version (is request adapter the only dependency here?)
As another alternative: could we make a generic promise construct that derives from the php-http one? what would be the impacts?

Can you create an issue capturing all those aspects so we can schedule work on this please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file php Pull requests that update Php code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants