diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ebb67b37..ce2dbbf3 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -41,7 +41,7 @@ jobs:
git config --global core.eol lf
- name: Checkout code
- uses: actions/checkout@v2
+ uses: actions/checkout@v5
- name: Setup PHP
uses: shivammathur/setup-php@v2
@@ -53,7 +53,7 @@ jobs:
run: echo "::set-output name=dir::$(composer config cache-dir)"
- name: Cache dependencies
- uses: actions/cache@v2
+ uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.*') }}-${{ matrix.composer-flags }}
diff --git a/psalm.xml b/psalm.xml
index eeb587fe..5e8a67c5 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -18,6 +18,12 @@
+
+
+
+
+
+
diff --git a/src/CompositeCancellation.php b/src/CompositeCancellation.php
index 9e428873..4aa7f497 100644
--- a/src/CompositeCancellation.php
+++ b/src/CompositeCancellation.php
@@ -69,7 +69,8 @@ public function __destruct()
public function subscribe(\Closure $callback): string
{
- $id = $this->nextId++;
+ $id = $this->nextId;
+ \PHP_VERSION_ID >= 80300 ? $this->nextId = \str_increment($this->nextId) : ++$this->nextId;
if ($this->exception) {
EventLoop::queue($callback, $this->exception);
diff --git a/src/Internal/Cancellable.php b/src/Internal/Cancellable.php
index 2a4b0c78..011ce4c4 100644
--- a/src/Internal/Cancellable.php
+++ b/src/Internal/Cancellable.php
@@ -58,7 +58,8 @@ private function getException(): CancelledException
public function subscribe(\Closure $callback): string
{
- $id = $this->nextId++;
+ $id = $this->nextId;
+ \PHP_VERSION_ID >= 80300 ? $this->nextId = \str_increment($this->nextId) : ++$this->nextId;
if ($this->requested) {
$exception = $this->getException();
diff --git a/src/Internal/FutureState.php b/src/Internal/FutureState.php
index 1f63cfb9..4d3c1769 100644
--- a/src/Internal/FutureState.php
+++ b/src/Internal/FutureState.php
@@ -67,7 +67,8 @@ public function __destruct()
*/
public function subscribe(\Closure $callback): string
{
- $id = self::$nextId++;
+ $id = self::$nextId;
+ \PHP_VERSION_ID >= 80300 ? self::$nextId = \str_increment(self::$nextId) : ++self::$nextId;
$this->handled = true; // Even if unsubscribed later, consider the future handled.