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.0
release. 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
PromiseInterface
now includes the functionality of the oldandExtendedPromiseInterface
. Each promise now always includes theCancellablePromiseInterface
then()
,catch()
,finally()
andcancel()
methods. The newcatch()
andfinally()
methods replace the deprecatedandotherwise()
methods which continue to exist for BC reasons. The oldalways()
andExtendedPromiseInterface
are no longer needed and have been removed as a consequence. (#75 byCancellablePromiseInterface
@jsor
and #208 by@clue
and@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
mixed
fulfillment 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 (usenull
instead) or reject a promise without a reason (useThrowable
instead). (#93, #141 and #142 by@jsor
, #138, #149 and #247 by@WyriHaximus
and #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.0
release. 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
PromiseInterface
now includes the functionality of the oldandExtendedPromiseInterface
. Each promise now always includes theCancellablePromiseInterface
then()
,catch()
,finally()
andcancel()
methods. The newcatch()
andfinally()
methods replace the deprecatedandotherwise()
methods which continue to exist for BC reasons. The oldalways()
andExtendedPromiseInterface
are no longer needed and have been removed as a consequence. (#75 byCancellablePromiseInterface
@jsor
and #208 by@clue
and@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
mixed
fulfillment 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 (usenull
instead) or reject a promise without a reason (useThrowable
instead). (#93, #141 and #142 by@jsor
, #138, #149 and #247 by@WyriHaximus
and #213 and #246 by@clue
)// old (arguments used to be optional)
... (truncated)
Commits
c86753c
Prepare v3.0.0 released317026
Merge pull request #247 from WyriHaximus-secret-labs/3.0-templatesb14580d
[3.x] Add template annotationsaf5814c
Merge pull request #249 from clue-labs/set-rejection-handlerb1e8940
Add newset_rejection_handler()
functiond87b562
Merge pull request #248 from clue-labs/report-unhandledb0d0f3d
Report any unhandled promise rejectionsd66fa66
Merge pull request #246 from clue-labs/phpstan-v3c4e6145
Improve type definitions and update to PHPStan levelmax
fd5e886
Add 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 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 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)
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication