Add revolt/event-loop dependency to core

Created on 2 March 2024, 10 months ago
Updated 17 September 2024, 3 months ago

Problem/Motivation

As part of 🌱 Adopt the Revolt event loop for async task orchestration Active the proposal to standardize async implementations on the revoltphp/event-loop package was met with enthusiasm. This issue includes the steps needed to add the dependency to the core composer files so that development using the library can begin.

Steps to reproduce

Proposed resolution

For a full reasoning of why the Revolt Event Loop over other options (such as a manual fiber implementation) see 🌱 Adopt the Revolt event loop for async task orchestration Active . The module evaluation has been copied below.

Dependency Evaluation

The package is maintained by the Revolt organization which publicly consists of:

The package lists that it supports the stable 1.x version and uses GitHub's private vulnerability reporting system.

https://github.com/revoltphp/event-loop/security

Current stable release (1.x) has existed since November 3rd 2022. There is no published release cycle but Revolt uses Semantic Versioning.

Written by experienced developers. Covered by Psalm and PHPUnit.

Revolt's only requirement is PHP 8.1 or newer.

It's intentionally built to be adopted by libraries to ensure that things that require an event loop work together.

Remaining tasks

  • @larowlan in #12
  • @catch in #4

Documentation Change

The following snippet can be added to Current PHP dependencies :

		<tr>
			<th>
			<h3 id="revolt-event-loop">Revolt Event Loop</h3>
			</th>
		</tr>
		<tr>
			<th>Repository</th>
			<td>https://github.com/revoltphp/event-loop</td>
		</tr>
		<tr>
			<th>Release&nbsp;cycle</th>
			<td>No fixed schedule. Follows semantic versioning. (<a href="https://github.com/revoltphp/event-loop?tab=readme-ov-file#versioning">Revolt Event Loop Versioning</a>)</td>
		</tr>
		<tr>
			<th>Security&nbsp;policies</th>
			<td><a href="https://github.com/revoltphp/event-loop/security">Revolt Event Loop Security Policy</a></td>
		</tr>
		<tr>
			<th>Security&nbsp;issue&nbsp;reporting</th>
			<td><a href="https://github.com/revoltphp/event-loop/security/advisories/new">Private vulnerability reporting form on GitHub</a></td>
		</tr>
		<tr>
			<th>Contact(s)</th>
			<td></td>
		</tr>

User interface changes

-

API changes

  • Drupal now allows using primitives from the EventLoop provided by Revolt to schedule async tasks.

Data model changes

-

Release notes snippet

Drupal has adopted the Revolt Event Loop which is already used by asynchronous libraries such as Amphp. By adopting the event loop, Drupal lets go of managing its own Fiber invocations which simplifies implementations and improves interoperability with other asynchronous tasks. This allows Drupal contrib to make use of any async libraries that are compatible with the Revolt event loop.

📌 Task
Status

RTBC

Version

11.0 🔥

Component
Composer 

Last updated 28 days ago

No maintainer
Created by

🇳🇱Netherlands kingdutch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024