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

fix(deps): update amphp (master) (major) #792

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 21, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
amphp/amp (source) ^2.6.2 -> ^3.0.2 age adoption passing confidence
amphp/parallel ^1.4.3 -> ^2.2.9 age adoption passing confidence

Release Notes

amphp/amp (amphp/amp)

v3.0.2: 3.0.2

Compare Source

What's Changed

  • Changed Closure(mixed...) annotation to Closure(...) to support PHPStan.

Full Changelog: amphp/amp@v3.0.1...v3.0.2

v3.0.1: 3.0.1

Compare Source

What's Changed

  • Fixed compatibility of Amp\weakClosure() with changes made to closure names in PHP 8.4.

Full Changelog: amphp/amp@v3.0.0...v3.0.1

v3.0.0: 3.0.0

Compare Source

Event Loop

Amp no longer ships its own event loop. It's now based on Revolt. Revolt\EventLoop is quite similar to Amp's previous Amp\Loop. A very important difference is using float $seconds instead of int $milliseconds for timers though!

Promises

Future is a replacement for the previous Promise.
There's no need for callbacks or yield anymore!
Its await() method is based on fibers and replaces generator based coroutines / Amp\Promise\wait().

  • Renamed Amp\Deferred to Amp\DeferredFuture.
  • Removed Amp\Promise\wait(): Use Amp\Future::await() instead, which can be called in any (nested) context unlike before.
  • Removed Amp\call(): Remove the passed closure boilerplate and all yield keywords, interruption is handled via fibers now instead of generator coroutines.
  • Removed Amp\asyncCall(): Replace invocations with Amp\async(), which starts a new fiber instead of using generators.
  • Removed Amp\coroutine(): There's no direct replacement.
  • Removed Amp\asyncCoroutine(): There's no direct replacement.
  • Removed Amp\Promise\timeout(): Future::await() accepts an optional Cancellation, which can be used as a replacement.
  • Removed Amp\Promise\rethrow(): Unhandled errors are now automatically thrown into the event loop, so there's no need for that function anymore.
  • Unhandled errors can be ignored using Future::ignore() if needed, but should usually be handled in some way.
  • Removed Amp\Promise\wrap(): Use Future::finally() instead.
  • Renamed Amp\getCurrentTime() to Amp\now() returning the time in seconds instead of milliseconds.
  • Changed Amp\delay() to accept the delay in seconds now instead of milliseconds.
  • Added Amp\weakClosure() to allow a class to hold a self-referencing Closure without creating a circular reference that prevents automatic garbage collection.
  • Added Amp\trapSignal() to await one or multiple signals.
Promise Combinators

Promise combinators have been renamed:

  • Amp\Promise\race() has been renamed to Amp\Future\awaitFirst()
  • Amp\Promise\first() has been renamed to Amp\Future\awaitAny()
  • Amp\Promise\some() has been renamed to Amp\Future\awaitAnyN()
  • Amp\Promise\any() has been renamed to Amp\Future\awaitAll()
  • Amp\Promise\all() has been renamed to Amp\Future\await()
CancellationToken
  • CancellationToken has been renamed to Cancellation.
  • CancellationTokenSource has been renamed to DeferredCancellation.
  • NullCancellationToken has been renamed to NullCancellation.
  • TimeoutCancellationToken has been renamed to TimeoutCancellation.
  • CombinedCancellationToken has been renamed to CompositeCancellation.
  • SignalCancellation has been added.
Iterators

Iterators have been removed from amphp/amp as 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/pipeline library now.

Closable

Amp\Closable has 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.

v2.6.4: 2.6.4

Compare Source

What's Changed

  • Fix optional before required parameter deprecation

Full Changelog: amphp/amp@v2.6.3...v2.6.4

v2.6.3: 2.6.3

Compare Source

What's Changed

New Contributors

Full Changelog: amphp/amp@v2.6.2...v2.6.3

amphp/parallel (amphp/parallel)

v2.2.9: 2.2.9

Compare Source

What's Changed

  • Fixed a race condition if outstanding accept calls were pending when closing SocketIpcHub.
  • Removed use of error-suppression operator to avoid warnings from mis-configured error handlers (#​200).

Full Changelog: amphp/parallel@v2.2.8...v2.2.9

v2.2.8: 2.2.8

Compare Source

What's Changed

  • Fixed race condition on concurrent IPC connect calls (#​199)
    Thank you @​Nadyita for reporting and debugging this issue.

v2.2.7: 2.2.7

Compare Source

What's Changed

Full Changelog: amphp/parallel@v2.2.6...v2.2.7

v2.2.6: 2.2.6

Compare Source

What's Changed

  • Fixed hang during shutdown if a process or thread context has not ended (fixes amphp/file#75).

Full Changelog: amphp/parallel@v2.2.5...v2.2.6

v2.2.5: 2.2.5

Compare Source

What's Changed

  • Fixed potential hang during shutdown if the process context returned from DefaultContextFactory was not shutdown.

Full Changelog: amphp/parallel@v2.2.4...v2.2.5

v2.2.4: 2.2.4

Compare Source

What's Changed

New Contributors

Full Changelog: amphp/parallel@v2.2.3...v2.2.4

v2.2.3: 2.2.3

Compare Source

What's Changed

  • Fixed accepting a socket with SocketIpcHub::accept() after cancelling a prior accept operation.

Full Changelog: amphp/parallel@v2.2.2...v2.2.3

v2.2.2: 2.2.2

Compare Source

  • Fixed potential hang of a ProcessContext created by DefaultContextFactory if output buffers fill by piping STDOUT and STDERR to the same pipes on the parent process. This also provides parity with the default behavior of ThreadContext.

v2.2.1: 2.2.1

Compare Source

  • Fixed simultaneous creation of workers in ContextWorkerPool.
  • Fixed the IPC pipe in ProcessContext closing immediately after the process exited which potentially prevented reading the last sent data.

v2.2.0: 2.2.0

Compare Source

  • Context::join() may now be called at any time instead of needing to wait until the context has sent or received all data on its channel.
  • The backtrace of exceptions thrown in child processes/threads is now included in the message of ContextPanicError, TaskFailureException, and TaskFailureError to avoid the backtrace being hidden from users due to PHP not calling Throwable::__toString() on previous exceptions. (#​168)
  • Fixed assigning workers to waiting tasks submitted to ContextWorkerPool. Previously, in some circumstances two tasks may have been assigned to a single worker if both were enqueued when the worker finished a prior task. (#​177)

v2.1.0: 2.1.0

Compare Source

  • ContextPanicError is no longer thrown from receive(), send(), and join() in Context. Only ContextException can now be thrown from these methods. A ContextPanicError will be wrapped instead in a ContextException.

v2.0.0: 2.0.0

Compare Source

Stable release compatible with AMPHP v3 and fibers! 🎉

As with other libraries compatible with AMPHP v3, most cases of parameters or returns of Promise<ResolutionType> have been replaced with ResolutionType.

All classes related to ext-pthreads have been removed as this extension does not have releases on PHP 8.x.

Classes in the Amp\Parallel\Sync namespace have been moved to amphp/sync.

Context
  • Process renamed to ProcessContext
  • Parallel renamed to ThreadContext
  • Context::isRunning() and Context::kill() replaced by Context::isClosed() and Context::close()
  • Context related functions:
    • runstartContext
    • factorycontextFactory
    • create has been removed, use startContext
  • Xdebug ini settings are forwarded to processes created by ProcessContext (including workers executing tasks), allowing step debugging through IDEs such as PhpStorm.
  • Improved UX of uncaught exceptions in child processes and task runs. The full stack trace in the context is displayed when converting the ContextPanicError or TaskFailureThrowable to a string, i.e., when the exception is uncaught in the parent and is written to STDERR
  • Added an optional Cancellation argument to ContextFactory::start()
Worker
  • Pool renamed to WorkerPool and DefaultPool renamed to ContextWorkerPool
  • TaskWorker has been marked as internal. Use a WorkerFactory to create Worker instances or use WorkerPool::getWorker() to get a worker from a pool
  • TaskRunner has been removed
  • Removed deprecated TaskException and TaskError
  • Worker::enqueue() renamed to Worker::submit(), which now returns an Execution object
    • Execution::getFuture() returns a future that resolves to the eventual return value of the Task
    • Execution::await() awaits the result of the Task, it is a shortcut to calling Execution::getFuture()->await()
    • Execution::getChannel() returns a Channel that can be used to communicate with the Channel provided to Task::run()
    • The arguments to Task::run() have changed to Channel and Cancellation
IpcHub

Inter-process communication is now exposed as part of the public API for potential use outside of the context and worker components.


Configuration

📅 Schedule: Branch creation - "before 5am on thursday" in timezone Europe/Vienna, 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.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Apr 21, 2023
@renovate renovate bot requested a review from ChristophWurst April 21, 2023 12:06
@renovate
Copy link
Contributor Author

renovate bot commented Apr 21, 2023

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: composer.lock
Command failed: composer update amphp/amp:3.0.1 amphp/parallel:2.2.9 --with-dependencies --ignore-platform-req='ext-*' --ignore-platform-req='lib-*' --no-ansi --no-interaction --no-scripts --no-autoloader --no-plugins
Loading composer repositories with package information
������������������������������������������������������                                                      ������������������������������������������������������Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires amphp/parallel ^2.2.9, found amphp/parallel[v2.2.9] but these were not loaded, likely because it conflicts with another require.
  Problem 2
    - Root composer.json requires amphp/amp ^3.0.1 -> satisfiable by amphp/amp[v3.0.1].
    - amphp/amp v3.0.1 requires php >=8.1 -> your php version (8.0; overridden via config.platform, same as actual) does not satisfy that requirement.
  Problem 3
    - rubix/ml is locked to version dev-chore/bump-flysystem-v2.1.1 and an update of this package was not requested.
    - rubix/ml dev-chore/bump-flysystem-v2.1.1 requires amphp/parallel ^1.3 -> found amphp/parallel[v1.3.0, ..., v1.4.3] but it conflicts with your root composer.json require (^2.2.9).

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

@ChristophWurst ChristophWurst marked this pull request as draft April 21, 2023 12:07
@renovate renovate bot force-pushed the renovate/master-major-amphp branch from dd797f3 to e4ddd29 Compare May 13, 2023 17:52
@renovate renovate bot force-pushed the renovate/master-major-amphp branch from e4ddd29 to 9789b8b Compare May 22, 2023 06:57
@renovate renovate bot force-pushed the renovate/master-major-amphp branch from 9789b8b to 5f47325 Compare August 30, 2023 20:25
@renovate renovate bot force-pushed the renovate/master-major-amphp branch 2 times, most recently from e43bd26 to 964d862 Compare November 29, 2023 05:35
@renovate renovate bot force-pushed the renovate/master-major-amphp branch from 964d862 to bc277ca Compare December 27, 2023 19:18
@renovate renovate bot force-pushed the renovate/master-major-amphp branch from bc277ca to 84751aa Compare January 7, 2024 20:12
@renovate renovate bot force-pushed the renovate/master-major-amphp branch from 84751aa to 489ebd1 Compare January 30, 2024 11:23
@renovate renovate bot force-pushed the renovate/master-major-amphp branch from 489ebd1 to 67f64b4 Compare February 14, 2024 12:20
@renovate renovate bot force-pushed the renovate/master-major-amphp branch 2 times, most recently from 2767520 to 07f32a3 Compare March 19, 2024 20:07
@renovate renovate bot force-pushed the renovate/master-major-amphp branch from 07f32a3 to 31290f4 Compare March 24, 2024 19:33
@renovate renovate bot force-pushed the renovate/master-major-amphp branch from 31290f4 to ce2fa12 Compare April 18, 2024 20:23
@renovate renovate bot force-pushed the renovate/master-major-amphp branch from ce2fa12 to d174be4 Compare May 11, 2024 02:07
Copy link
Contributor Author

renovate bot commented May 11, 2024

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: composer.lock
Command failed: composer update amphp/amp:3.0.2 amphp/parallel:2.2.9 --with-dependencies --ignore-platform-req='ext-*' --ignore-platform-req='lib-*' --no-ansi --no-interaction --no-scripts --no-autoloader --no-plugins
Loading composer repositories with package information
������������������������������������������������������                                                      ������������������������������������������������������Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires amphp/parallel ^2.2.9, found amphp/parallel[v2.2.9] but these were not loaded, likely because it conflicts with another require.
  Problem 2
    - Root composer.json requires amphp/amp ^3.0.2 -> satisfiable by amphp/amp[v3.0.2].
    - amphp/amp v3.0.2 requires php >=8.1 -> your php version (8.0; overridden via config.platform, same as actual) does not satisfy that requirement.
  Problem 3
    - rubix/ml is locked to version dev-chore/bump-flysystem-v2.1.1 and an update of this package was not requested.
    - rubix/ml dev-chore/bump-flysystem-v2.1.1 requires amphp/parallel ^1.3 -> found amphp/parallel[v1.3.0, ..., v1.4.3] but it conflicts with your root composer.json require (^2.2.9).

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants