php-dataloader
php-dataloader copied to clipboard
Update react/promise requirement from ^2.7.1 to ^3.0.0
Updates the requirements on react/promise to permit the latest version.
Release notes
Sourced from react/promise's releases.
v3.0.0
A major new feature release, see release announcement.
We'd like to emphasize that this component is production ready and battle-tested. We plan to support all long-term support (LTS) releases for at least 24 months, so you have a rock-solid foundation to build on top of.
The v3 release will be the way forward for this package. However, we will still actively support v2 and v1 to provide a smooth upgrade path for those not yet on the latest versions.
This update involves some major new features and a minor BC break over the
v2.0.0release. We've tried hard to avoid BC breaks where possible and minimize impact otherwise. We expect that most consumers of this package will be affected by BC breaks, but updating should take no longer than a few minutes. See below for more details:
BC break: PHP 8.1+ recommended, PHP 7.1+ required. (#138 and #149 by
@WyriHaximus)Feature / BC break: The
PromiseInterfacenow includes the functionality of the oldandExtendedPromiseInterface. Each promise now always includes theCancellablePromiseInterfacethen(),catch(),finally()andcancel()methods. The newcatch()andfinally()methods replace the deprecatedandotherwise()methods which continue to exist for BC reasons. The oldalways()andExtendedPromiseInterfaceare no longer needed and have been removed as a consequence. (#75 byCancellablePromiseInterface@jsorand #208 by@clueand@WyriHaximus)// old (multiple interfaces may or may not be implemented) assert($promise instanceof PromiseInterface); assert(method_exists($promise, 'then')); if ($promise instanceof ExtendedPromiseInterface) { assert(method_exists($promise, 'otherwise')); } if ($promise instanceof ExtendedPromiseInterface) { assert(method_exists($promise, 'always')); } if ($promise instanceof CancellablePromiseInterface) { assert(method_exists($promise, 'cancel')); }// new (single PromiseInterface with all methods) assert($promise instanceof PromiseInterface); assert(method_exists($promise, 'then')); assert(method_exists($promise, 'catch')); assert(method_exists($promise, 'finally')); assert(method_exists($promise, 'cancel'));
Feature / BC break: Improve type safety of promises. Require
mixedfulfillment value argument andThrowable(orException) as rejection reason. Add PHPStan template types to ensure strict types forresolve(T $value): PromiseInterface<T>andreject(Throwable $reason): PromiseInterface<never>. It is no longer possible to resolve a promise without a value (usenullinstead) or reject a promise without a reason (useThrowableinstead). (#93, #141 and #142 by@jsor, #138, #149 and #247 by@WyriHaximusand #213 and #246 by@clue)// old (arguments used to be optional) $promise = resolve();
... (truncated)
Changelog
Sourced from react/promise's changelog.
3.0.0 (2023-07-11)
A major new feature release, see release announcement.
We'd like to emphasize that this component is production ready and battle-tested. We plan to support all long-term support (LTS) releases for at least 24 months, so you have a rock-solid foundation to build on top of.
The v3 release will be the way forward for this package. However, we will still actively support v2 and v1 to provide a smooth upgrade path for those not yet on the latest versions.
This update involves some major new features and a minor BC break over the
v2.0.0release. We've tried hard to avoid BC breaks where possible and minimize impact otherwise. We expect that most consumers of this package will be affected by BC breaks, but updating should take no longer than a few minutes. See below for more details:
BC break: PHP 8.1+ recommended, PHP 7.1+ required. (#138 and #149 by
@WyriHaximus)Feature / BC break: The
PromiseInterfacenow includes the functionality of the oldandExtendedPromiseInterface. Each promise now always includes theCancellablePromiseInterfacethen(),catch(),finally()andcancel()methods. The newcatch()andfinally()methods replace the deprecatedandotherwise()methods which continue to exist for BC reasons. The oldalways()andExtendedPromiseInterfaceare no longer needed and have been removed as a consequence. (#75 byCancellablePromiseInterface@jsorand #208 by@clueand@WyriHaximus)// old (multiple interfaces may or may not be implemented) assert($promise instanceof PromiseInterface); assert(method_exists($promise, 'then')); if ($promise instanceof ExtendedPromiseInterface) { assert(method_exists($promise, 'otherwise')); } if ($promise instanceof ExtendedPromiseInterface) { assert(method_exists($promise, 'always')); } if ($promise instanceof CancellablePromiseInterface) { assert(method_exists($promise, 'cancel')); }// new (single PromiseInterface with all methods) assert($promise instanceof PromiseInterface); assert(method_exists($promise, 'then')); assert(method_exists($promise, 'catch')); assert(method_exists($promise, 'finally')); assert(method_exists($promise, 'cancel'));
Feature / BC break: Improve type safety of promises. Require
mixedfulfillment value argument andThrowable(orException) as rejection reason. Add PHPStan template types to ensure strict types forresolve(T $value): PromiseInterface<T>andreject(Throwable $reason): PromiseInterface<never>. It is no longer possible to resolve a promise without a value (usenullinstead) or reject a promise without a reason (useThrowableinstead). (#93, #141 and #142 by@jsor, #138, #149 and #247 by@WyriHaximusand #213 and #246 by@clue)// old (arguments used to be optional)
... (truncated)
Commits
c86753cPrepare v3.0.0 released317026Merge pull request #247 from WyriHaximus-secret-labs/3.0-templatesb14580d[3.x] Add template annotationsaf5814cMerge pull request #249 from clue-labs/set-rejection-handlerb1e8940Add newset_rejection_handler()functiond87b562Merge pull request #248 from clue-labs/report-unhandledb0d0f3dReport any unhandled promise rejectionsd66fa66Merge pull request #246 from clue-labs/phpstan-v3c4e6145Improve type definitions and update to PHPStan levelmaxfd5e886Add PHPStan to test environment- Additional commits viewable 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 rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Kudos, SonarCloud Quality Gate passed! 
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication