From c5ec0247869eae351797b3c21d2517995232f01d Mon Sep 17 00:00:00 2001 From: Slavey Karadzhov Date: Mon, 5 Feb 2024 14:46:31 +0100 Subject: [PATCH] Prepare for working with newer versions of OpenSwoole. Signed-off-by: Slavey Karadzhov --- compat/openswoole.php | 14 ++++++++++++++ composer.json | 5 ++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 compat/openswoole.php diff --git a/compat/openswoole.php b/compat/openswoole.php new file mode 100644 index 0000000..c2eb030 --- /dev/null +++ b/compat/openswoole.php @@ -0,0 +1,14 @@ +=')) { + function swoole_set_process_name(string $process_name): void + { + Util::setProcessName($process_name); + } +} diff --git a/composer.json b/composer.json index d969ee4..ec150d4 100644 --- a/composer.json +++ b/composer.json @@ -67,7 +67,10 @@ "autoload": { "psr-4": { "Mezzio\\Swoole\\": "src/" - } + }, + "files": [ + "compat/openswoole.php" + ], }, "autoload-dev": { "psr-4": {