-
-
Couldn't load subscription status.
- Fork 571
chore(deps): update dependency amphp/amp to v3 - abandoned #1262
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
base: master
Are you sure you want to change the base?
Conversation
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
|
Due to massive breaking changes, supporting both v2 and v3 seems hard, see https://amphp.org/upgrade. Perhaps we should just switch to v3 in our next major version, along with requiring PHP 8.1. |
|
Yup. Can we setup 16.0.x branch so we can start development? Also rename master to 15.1.x. |
|
I am not that eager to make the cut towards a new major version. As long as no one asks for changes that require breakage, I would rather develop the current version. When we do make the change, I would split a |
|
Sure, we can still develop current version but have 16.x alongside it already. Similar case is e.g. with dbal https://github.com/doctrine/dbal where current is v3.6 but v4.0 is developed as well. But nvm if you think it's a bad idea. |
|
I reckon the extra effort of maintaining multiple versions simultanously and merging between them is just not worth it for now. |
Autoclosing SkippedThis PR has been flagged for autoclosing. However, it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error. |
This PR contains the following updates:
^2.6->^3.0Release Notes
amphp/amp
v3.0.0: 3.0.0Compare Source
Event Loop
Amp no longer ships its own event loop. It's now based on Revolt.
Revolt\EventLoopis quite similar to Amp's previousAmp\Loop. A very important difference is usingfloat $secondsinstead ofint $millisecondsfor timers though!Promises
Futureis a replacement for the previousPromise.There's no need for callbacks or
yieldanymore!Its
await()method is based on fibers and replaces generator based coroutines /Amp\Promise\wait().Amp\DeferredtoAmp\DeferredFuture.Amp\Promise\wait(): UseAmp\Future::await()instead, which can be called in any (nested) context unlike before.Amp\call(): Remove the passed closure boilerplate and allyieldkeywords, interruption is handled via fibers now instead of generator coroutines.Amp\asyncCall(): Replace invocations withAmp\async(), which starts a new fiber instead of using generators.Amp\coroutine(): There's no direct replacement.Amp\asyncCoroutine(): There's no direct replacement.Amp\Promise\timeout():Future::await()accepts an optionalCancellation, which can be used as a replacement.Amp\Promise\rethrow(): Unhandled errors are now automatically thrown into the event loop, so there's no need for that function anymore.Future::ignore()if needed, but should usually be handled in some way.Amp\Promise\wrap(): UseFuture::finally()instead.Amp\getCurrentTime()toAmp\now()returning the time in seconds instead of milliseconds.Amp\delay()to accept the delay in seconds now instead of milliseconds.Amp\weakClosure()to allow a class to hold a self-referencing Closure without creating a circular reference that prevents automatic garbage collection.Amp\trapSignal()to await one or multiple signals.Promise Combinators
Promise combinators have been renamed:
Amp\Promise\race()has been renamed toAmp\Future\awaitFirst()Amp\Promise\first()has been renamed toAmp\Future\awaitAny()Amp\Promise\some()has been renamed toAmp\Future\awaitAnyN()Amp\Promise\any()has been renamed toAmp\Future\awaitAll()Amp\Promise\all()has been renamed toAmp\Future\await()CancellationToken
CancellationTokenhas been renamed toCancellation.CancellationTokenSourcehas been renamed toDeferredCancellation.NullCancellationTokenhas been renamed toNullCancellation.TimeoutCancellationTokenhas been renamed toTimeoutCancellation.CombinedCancellationTokenhas been renamed toCompositeCancellation.SignalCancellationhas been added.Iterators
Iterators have been removed from
amphp/ampas normal PHP iterators can be used with fibers now and there's no need for a separate API.However, there's still some need for concurrent iterators, which is covered by the new
amphp/pipelinelibrary now.Closable
Amp\Closablehas been added as a new basic interface for closable resources such as streams or sockets.Strict Types
Strict types now declared in all library files.
This will affect callbacks invoked within this library's code which use scalar types as parameters.
Functions used with
Amp\async()are the most likely to be affected by this change — these functions will now be invoked within a strict-types context.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.