From bdf7792b4d8d83f0fe74a28e05ae4d10720540e6 Mon Sep 17 00:00:00 2001 From: Rui Pedrosa Date: Thu, 28 Jul 2022 08:16:37 +0100 Subject: [PATCH 1/4] UC-6256: support php 8.1 --- .gitignore | 3 +- CHANGELOG.md | 10 + composer.json | 43 +- composer.lock | 658 ++++++++++++++---- examples/events.php | 2 +- .../Asterisk/AMI/Finder/ActionFinder.php | 9 +- .../Asterisk/AMI/Finder/EventFinder.php | 4 +- src/Clearvox/Asterisk/AMI/Manager.php | 23 +- src/Clearvox/Asterisk/AMI/Message/Message.php | 21 +- .../Asterisk/AMI/Message/OutgoingMessage.php | 2 +- .../AMI/Message/Response/ResponseMessage.php | 6 +- src/Clearvox/Asterisk/AMI/Process.php | 10 +- 12 files changed, 597 insertions(+), 194 deletions(-) create mode 100644 CHANGELOG.md diff --git a/.gitignore b/.gitignore index 2da45a7..26101ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /vendor -.idea \ No newline at end of file +.idea +composer.phar \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..4c00c08 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +## 1.0.0 (2022-07-28) + +A major new feature release, see [**release announcement**](https://clue.engineering/2021/announcing-reactphp-default-loop). + +* support php >=8.1 (and drop support older versions) + +* Update library dependencies for major versions + diff --git a/composer.json b/composer.json index 78628b3..53d7ec6 100644 --- a/composer.json +++ b/composer.json @@ -1,20 +1,31 @@ { - "name": "clearvox/react-ami", - "description": "A ReactPHP implementation of communicating with the Asterisk Manager Interface", - "keywords": ["AMI", "Asterisk Manager Interface", "ReactPHP"], - "license": "MIT", - "authors": [ - { - "name": "Leon Rowland", - "email": "leon@rowland.nl" - } - ], - "require": { - "php": ">=5.3", - "react/socket-client": "0.4", - "illuminate/contracts": "~5.1" + "name": "clearvox/react-ami", + "description": "A ReactPHP implementation of communicating with the Asterisk Manager Interface", + "keywords": [ + "AMI", + "Asterisk Manager Interface", + "ReactPHP" + ], + "license": "MIT", + "authors": [ + { + "name": "Leon Rowland", + "email": "leon@rowland.nl" }, - "autoload": { - "psr-0": { "Clearvox\\Asterisk\\AMI": "src/" } + { + "name": "Rui Pedrosa", + "email": "rui.pedrosa@x2com.nl" } + ], + "require": { + "php": ">=8.1", + "react/socket": "^1.11", + "react/stream": "^1.2", + "illuminate/contracts": "^9.0" + }, + "autoload": { + "psr-4": { + "Clearvox\\Asterisk\\AMI\\": "src/Clearvox/Asterisk/AMI" + } + } } diff --git a/composer.lock b/composer.lock index e7bf925..28ab885 100644 --- a/composer.lock +++ b/composer.lock @@ -1,34 +1,32 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "hash": "4d70f5b1cb8b798e8d542f7a221e4bff", + "content-hash": "cf5d07ce0065ce45c4b3359670021409", "packages": [ { "name": "evenement/evenement", - "version": "v2.0.0", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/igorw/evenement.git", - "reference": "f6e843799fd4f4184d54d8fc7b5b3551c9fa803e" + "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/igorw/evenement/zipball/f6e843799fd4f4184d54d8fc7b5b3551c9fa803e", - "reference": "f6e843799fd4f4184d54d8fc7b5b3551c9fa803e", + "url": "https://api.github.com/repos/igorw/evenement/zipball/531bfb9d15f8aa57454f5f0285b18bec903b8fb7", + "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": ">=7.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } + "require-dev": { + "phpunit/phpunit": "^6.0" }, + "type": "library", "autoload": { "psr-0": { "Evenement": "src" @@ -41,8 +39,7 @@ "authors": [ { "name": "Igor Wiedler", - "email": "igor@wiedler.ch", - "homepage": "http://wiedler.ch/igor/" + "email": "igor@wiedler.ch" } ], "description": "Événement is a very simple event dispatching library for PHP", @@ -50,29 +47,35 @@ "event-dispatcher", "event-emitter" ], - "time": "2012-11-02 14:49:47" + "support": { + "issues": "https://github.com/igorw/evenement/issues", + "source": "https://github.com/igorw/evenement/tree/master" + }, + "time": "2017-07-23T21:35:13+00:00" }, { "name": "illuminate/contracts", - "version": "v5.0.0", + "version": "v9.22.1", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "78f1dba092d5fcb6d3a19537662abe31c4d128fd" + "reference": "ac7f63520e18721f214e80fa7e8f0a5c77ed2719" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/78f1dba092d5fcb6d3a19537662abe31c4d128fd", - "reference": "78f1dba092d5fcb6d3a19537662abe31c4d128fd", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/ac7f63520e18721f214e80fa7e8f0a5c77ed2719", + "reference": "ac7f63520e18721f214e80fa7e8f0a5c77ed2719", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": "^8.0.2", + "psr/container": "^1.1.1|^2.0.1", + "psr/simple-cache": "^1.0|^2.0|^3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-master": "9.x-dev" } }, "autoload": { @@ -87,166 +90,383 @@ "authors": [ { "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" + "email": "taylor@laravel.com" } ], "description": "The Illuminate Contracts package.", - "time": "2015-01-30 16:27:08" + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2022-07-26T14:41:38+00:00" }, { - "name": "react/cache", - "version": "v0.4.0", + "name": "psr/container", + "version": "2.0.2", "source": { "type": "git", - "url": "https://github.com/reactphp/cache.git", - "reference": "9882ab5d8b00617baae83c6996f5a34668c11beb" + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/cache/zipball/9882ab5d8b00617baae83c6996f5a34668c11beb", - "reference": "9882ab5d8b00617baae83c6996f5a34668c11beb", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { - "php": ">=5.4.0", - "react/promise": "~2.0" + "php": ">=7.4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "0.4-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "React\\Cache\\": "" + "Psr\\Container\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Async caching.", + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", "keywords": [ - "cache" + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" ], - "time": "2014-02-02 01:11:26" + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" }, { - "name": "react/dns", - "version": "v0.4.1", + "name": "psr/simple-cache", + "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/reactphp/dns.git", - "reference": "8c5ccc35dcb4b06b70eb9201842363fac7b0f3cf" + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/dns/zipball/8c5ccc35dcb4b06b70eb9201842363fac7b0f3cf", - "reference": "8c5ccc35dcb4b06b70eb9201842363fac7b0f3cf", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", "shasum": "" }, "require": { - "php": ">=5.4.0", - "react/cache": "0.4.*", - "react/promise": "~2.0", - "react/socket": "0.4.*" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "0.4-dev" + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" + }, + "time": "2021-10-29T13:26:27+00:00" + }, + { + "name": "react/cache", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/reactphp/cache.git", + "reference": "4bf736a2cccec7298bdf745db77585966fc2ca7e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/cache/zipball/4bf736a2cccec7298bdf745db77585966fc2ca7e", + "reference": "4bf736a2cccec7298bdf745db77585966fc2ca7e", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "react/promise": "^3.0 || ^2.0 || ^1.1" + }, + "require-dev": { + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Async, Promise-based cache interface for ReactPHP", + "keywords": [ + "cache", + "caching", + "promise", + "reactphp" + ], + "support": { + "issues": "https://github.com/reactphp/cache/issues", + "source": "https://github.com/reactphp/cache/tree/v1.1.1" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" } + ], + "time": "2021-02-02T06:47:52+00:00" + }, + { + "name": "react/dns", + "version": "v1.9.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/dns.git", + "reference": "6d38296756fa644e6cb1bfe95eff0f9a4ed6edcb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/dns/zipball/6d38296756fa644e6cb1bfe95eff0f9a4ed6edcb", + "reference": "6d38296756fa644e6cb1bfe95eff0f9a4ed6edcb", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "react/cache": "^1.0 || ^0.6 || ^0.5", + "react/event-loop": "^1.2", + "react/promise": "^3.0 || ^2.7 || ^1.2.1", + "react/promise-timer": "^1.8" }, + "require-dev": { + "clue/block-react": "^1.2", + "phpunit/phpunit": "^9.3 || ^4.8.35" + }, + "type": "library", "autoload": { "psr-4": { - "React\\Dns\\": "" + "React\\Dns\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Async DNS resolver.", + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Async DNS resolver for ReactPHP", "keywords": [ + "async", "dns", - "dns-resolver" + "dns-resolver", + "reactphp" + ], + "support": { + "issues": "https://github.com/reactphp/dns/issues", + "source": "https://github.com/reactphp/dns/tree/v1.9.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } ], - "time": "2014-04-12 14:09:10" + "time": "2021-12-20T08:46:54+00:00" }, { "name": "react/event-loop", - "version": "v0.4.1", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/reactphp/event-loop.git", - "reference": "18c5297087ca01de85518e2b55078f444144aa1b" + "reference": "187fb56f46d424afb6ec4ad089269c72eec2e137" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/event-loop/zipball/18c5297087ca01de85518e2b55078f444144aa1b", - "reference": "18c5297087ca01de85518e2b55078f444144aa1b", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/187fb56f46d424afb6ec4ad089269c72eec2e137", + "reference": "187fb56f46d424afb6ec4ad089269c72eec2e137", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" }, "suggest": { - "ext-event": "~1.0", - "ext-libev": "*", - "ext-libevent": ">=0.1.0" + "ext-event": "~1.0 for ExtEventLoop", + "ext-pcntl": "For signal handling support when using the StreamSelectLoop", + "ext-uv": "* for ExtUvLoop" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.4-dev" - } - }, "autoload": { "psr-4": { - "React\\EventLoop\\": "" + "React\\EventLoop\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Event loop abstraction layer that libraries can use for evented I/O.", + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.", "keywords": [ + "asynchronous", "event-loop" ], - "time": "2014-02-26 17:36:58" + "support": { + "issues": "https://github.com/reactphp/event-loop/issues", + "source": "https://github.com/reactphp/event-loop/tree/v1.3.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-03-17T11:10:22+00:00" }, { "name": "react/promise", - "version": "v2.2.0", + "version": "v2.9.0", "source": { "type": "git", "url": "https://github.com/reactphp/promise.git", - "reference": "365fcee430dfa4ace1fbc75737ca60ceea7eeeef" + "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/365fcee430dfa4ace1fbc75737ca60ceea7eeeef", - "reference": "365fcee430dfa4ace1fbc75737ca60ceea7eeeef", + "url": "https://api.github.com/repos/reactphp/promise/zipball/234f8fd1023c9158e2314fa9d7d0e6a83db42910", + "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910", "shasum": "" }, "require": { "php": ">=5.4.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } + "require-dev": { + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36" }, + "type": "library", "autoload": { - "psr-4": { - "React\\Promise\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "React\\Promise\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -255,126 +475,237 @@ "authors": [ { "name": "Jan Sorgalla", - "email": "jsorgalla@googlemail.com" + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" } ], "description": "A lightweight implementation of CommonJS Promises/A for PHP", - "time": "2014-12-30 13:32:42" + "keywords": [ + "promise", + "promises" + ], + "support": { + "issues": "https://github.com/reactphp/promise/issues", + "source": "https://github.com/reactphp/promise/tree/v2.9.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-02-11T10:27:51+00:00" }, { - "name": "react/socket", - "version": "v0.4.2", + "name": "react/promise-timer", + "version": "v1.9.0", "source": { "type": "git", - "url": "https://github.com/reactphp/socket.git", - "reference": "a6acf405ca53fc6cfbfe7c77778ededff46aa7cc" + "url": "https://github.com/reactphp/promise-timer.git", + "reference": "aa7a73c74b8d8c0f622f5982ff7b0351bc29e495" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/socket/zipball/a6acf405ca53fc6cfbfe7c77778ededff46aa7cc", - "reference": "a6acf405ca53fc6cfbfe7c77778ededff46aa7cc", + "url": "https://api.github.com/repos/reactphp/promise-timer/zipball/aa7a73c74b8d8c0f622f5982ff7b0351bc29e495", + "reference": "aa7a73c74b8d8c0f622f5982ff7b0351bc29e495", "shasum": "" }, "require": { - "evenement/evenement": "~2.0", - "php": ">=5.4.0", - "react/event-loop": "0.4.*", - "react/stream": "0.4.*" + "php": ">=5.3", + "react/event-loop": "^1.2", + "react/promise": "^3.0 || ^2.7.0 || ^1.2.1" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.4-dev" - } + "require-dev": { + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" }, + "type": "library", "autoload": { + "files": [ + "src/functions_include.php" + ], "psr-4": { - "React\\Socket\\": "src" + "React\\Promise\\Timer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Library for building an evented socket server.", + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "A trivial implementation of timeouts for Promises, built on top of ReactPHP.", + "homepage": "https://github.com/reactphp/promise-timer", "keywords": [ - "Socket" + "async", + "event-loop", + "promise", + "reactphp", + "timeout", + "timer" + ], + "support": { + "issues": "https://github.com/reactphp/promise-timer/issues", + "source": "https://github.com/reactphp/promise-timer/tree/v1.9.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } ], - "time": "2014-05-25 17:02:16" + "time": "2022-06-13T13:41:03+00:00" }, { - "name": "react/socket-client", - "version": "v0.4.0", + "name": "react/socket", + "version": "v1.11.0", "source": { "type": "git", - "url": "https://github.com/reactphp/socket-client.git", - "reference": "6ec8c3aefc018acec763fa6e950e1baa947231fc" + "url": "https://github.com/reactphp/socket.git", + "reference": "f474156aaab4f09041144fa8b57c7d70aed32a1c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/socket-client/zipball/6ec8c3aefc018acec763fa6e950e1baa947231fc", - "reference": "6ec8c3aefc018acec763fa6e950e1baa947231fc", + "url": "https://api.github.com/repos/reactphp/socket/zipball/f474156aaab4f09041144fa8b57c7d70aed32a1c", + "reference": "f474156aaab4f09041144fa8b57c7d70aed32a1c", "shasum": "" }, "require": { - "php": ">=5.4.0", - "react/dns": "0.4.*", - "react/event-loop": "0.4.*", - "react/promise": "~2.0" + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.0", + "react/dns": "^1.8", + "react/event-loop": "^1.2", + "react/promise": "^2.6.0 || ^1.2.1", + "react/promise-timer": "^1.8", + "react/stream": "^1.2" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.4-dev" - } + "require-dev": { + "clue/block-react": "^1.5", + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35", + "react/promise-stream": "^1.2" }, + "type": "library", "autoload": { "psr-4": { - "React\\SocketClient\\": "" + "React\\Socket\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Async connector to open TCP/IP and SSL/TLS based connections.", + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP", "keywords": [ - "Socket" + "Connection", + "Socket", + "async", + "reactphp", + "stream" + ], + "support": { + "issues": "https://github.com/reactphp/socket/issues", + "source": "https://github.com/reactphp/socket/tree/v1.11.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } ], - "time": "2014-02-02 01:11:26" + "time": "2022-01-14T10:14:32+00:00" }, { "name": "react/stream", - "version": "v0.4.2", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/reactphp/stream.git", - "reference": "acc7a5fec02e0aea674560e1d13c40ed0c8c5465" + "reference": "7a423506ee1903e89f1e08ec5f0ed430ff784ae9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/stream/zipball/acc7a5fec02e0aea674560e1d13c40ed0c8c5465", - "reference": "acc7a5fec02e0aea674560e1d13c40ed0c8c5465", + "url": "https://api.github.com/repos/reactphp/stream/zipball/7a423506ee1903e89f1e08ec5f0ed430ff784ae9", + "reference": "7a423506ee1903e89f1e08ec5f0ed430ff784ae9", "shasum": "" }, "require": { - "evenement/evenement": "~2.0", - "php": ">=5.4.0" + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "php": ">=5.3.8", + "react/event-loop": "^1.2" }, "require-dev": { - "react/event-loop": "0.4.*", - "react/promise": "~2.0" - }, - "suggest": { - "react/event-loop": "0.4.*", - "react/promise": "~2.0" + "clue/stream-filter": "~1.2", + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.5-dev" - } - }, "autoload": { "psr-4": { "React\\Stream\\": "src" @@ -384,12 +715,54 @@ "license": [ "MIT" ], - "description": "Basic readable and writable stream interfaces that support piping.", + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering", + "homepage": "https://clue.engineering/" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "reactphp@ceesjankiewiet.nl", + "homepage": "https://wyrihaximus.net/" + }, + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com", + "homepage": "https://sorgalla.com/" + }, + { + "name": "Chris Boden", + "email": "cboden@gmail.com", + "homepage": "https://cboden.dev/" + } + ], + "description": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP", "keywords": [ + "event-driven", + "io", + "non-blocking", "pipe", - "stream" + "reactphp", + "readable", + "stream", + "writable" + ], + "support": { + "issues": "https://github.com/reactphp/stream/issues", + "source": "https://github.com/reactphp/stream/tree/v1.2.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + }, + { + "url": "https://github.com/clue", + "type": "github" + } ], - "time": "2014-09-10 03:32:31" + "time": "2021-07-11T12:37:55+00:00" } ], "packages-dev": [], @@ -399,7 +772,8 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.3" + "php": ">=8.1" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "2.3.0" } diff --git a/examples/events.php b/examples/events.php index bed124d..89d42c8 100644 --- a/examples/events.php +++ b/examples/events.php @@ -12,7 +12,7 @@ use React\Dns\Query\Executor; use React\Dns\Resolver\Resolver; use React\EventLoop\Factory; -use React\SocketClient\Connector; +use React\Socket\Connector; use React\Stream\Stream; require __DIR__ . '/../vendor/autoload.php'; diff --git a/src/Clearvox/Asterisk/AMI/Finder/ActionFinder.php b/src/Clearvox/Asterisk/AMI/Finder/ActionFinder.php index 36fef0f..e9e5baa 100644 --- a/src/Clearvox/Asterisk/AMI/Finder/ActionFinder.php +++ b/src/Clearvox/Asterisk/AMI/Finder/ActionFinder.php @@ -1,9 +1,11 @@ "Clearvox\\Asterisk\\AMI\\Message\\Action\\AGIAction", "AbsoluteTimeout" => "Clearvox\\Asterisk\\AMI\\Message\\Action\\AbsoluteTimeoutAction", "AgentLogoff" => "Clearvox\\Asterisk\\AMI\\Message\\Action\\AgentLogoffAction", @@ -102,12 +104,15 @@ class ActionFinder "WaitEvent" => "Clearvox\\Asterisk\\AMI\\Message\\Action\\WaitEventAction", ); - public function register($name, $class) + public function register($name, $class): static { $this->actions[$name] = $class; return $this; } + /** + * @throws ReflectionException + */ public function find($name, $arguments = array()) { if (array_key_exists($name, $this->actions)) { diff --git a/src/Clearvox/Asterisk/AMI/Finder/EventFinder.php b/src/Clearvox/Asterisk/AMI/Finder/EventFinder.php index 9c44224..8eebea5 100644 --- a/src/Clearvox/Asterisk/AMI/Finder/EventFinder.php +++ b/src/Clearvox/Asterisk/AMI/Finder/EventFinder.php @@ -3,7 +3,7 @@ class EventFinder { - protected $events = array( + protected array $events = array( "AGIExec" => "Clearvox\\Asterisk\\AMI\\Message\\Event\\AGIExecEvent", "AgentConnect" => "Clearvox\\Asterisk\\AMI\\Message\\Event\\AgentConnectEvent", "Agentlogin" => "Clearvox\\Asterisk\\AMI\\Message\\Event\\AgentloginEvent", @@ -85,7 +85,7 @@ class EventFinder "vgsm_sms_rx" => "Clearvox\\Asterisk\\AMI\\Message\\Event\\vgsm_sms_rxEvent", ); - public function registerEvent($eventName, $class) + public function registerEvent($eventName, $class): void { $this->events[$eventName] = $class; } diff --git a/src/Clearvox/Asterisk/AMI/Manager.php b/src/Clearvox/Asterisk/AMI/Manager.php index 8aecf40..8e11536 100644 --- a/src/Clearvox/Asterisk/AMI/Manager.php +++ b/src/Clearvox/Asterisk/AMI/Manager.php @@ -4,7 +4,8 @@ use Clearvox\Asterisk\AMI\Message\Action\ActionMessage; use Evenement\EventEmitter; use React\Promise\Deferred; -use React\Stream\Stream; +use React\Promise\Promise; +use React\Stream\ReadableStreamInterface; /** * Holds the connected AMI Stream and has the Process class to @@ -18,19 +19,19 @@ class Manager extends EventEmitter { /** - * @var \React\Stream\Stream + * @var ReadableStreamInterface */ - protected $stream; + protected ReadableStreamInterface $stream; /** * @var Process */ - protected $process; + protected Process $process; /** * @var array */ - protected $actions = array(); + protected array $actions = array(); public function __construct(Process $process) { @@ -40,9 +41,9 @@ public function __construct(Process $process) /** * Set the stream for the Manager instance. * - * @param Stream $stream + * @param ReadableStreamInterface $stream */ - public function setStream(Stream $stream) + public function setStream(ReadableStreamInterface $stream) { $this->stream = $stream; @@ -67,9 +68,9 @@ function ($part) use ($process, $that) { * promise inside this class. * * @param ActionMessage $actionMessage - * @return \React\Promise\Promise + * @return Promise */ - public function send(ActionMessage $actionMessage) + public function send(ActionMessage $actionMessage): Promise { $deferred = new Deferred(); @@ -81,9 +82,9 @@ public function send(ActionMessage $actionMessage) /** * Get all the actions currently stored with this Manager. - * @return array | action id => Promise + * @return array id => Promise */ - public function getActions() + public function getActions(): array { return $this->actions; } diff --git a/src/Clearvox/Asterisk/AMI/Message/Message.php b/src/Clearvox/Asterisk/AMI/Message/Message.php index f0bb440..f9fc7ec 100644 --- a/src/Clearvox/Asterisk/AMI/Message/Message.php +++ b/src/Clearvox/Asterisk/AMI/Message/Message.php @@ -3,6 +3,7 @@ use Illuminate\Contracts\Support\Arrayable; use Illuminate\Contracts\Support\Jsonable; +use JetBrains\PhpStorm\ArrayShape; /** * All Messages, Incoming and Outgoing, are classes of this larger abstract @@ -31,19 +32,19 @@ abstract class Message implements Jsonable, Arrayable /** * @var array */ - protected $keys = array(); + protected array $keys = array(); /** * @var array */ - protected $variables = array(); + protected array $variables = array(); /** * Get all Keys for this message. * * @return array */ - public function getKeys() + public function getKeys(): array { return $this->keys; } @@ -54,7 +55,7 @@ public function getKeys() * @param string $key * @return string|bool */ - public function getKey($key) + public function getKey($key): bool|string { return (array_key_exists($key, $this->keys) ? $this->keys[$key] : false); } @@ -66,7 +67,7 @@ public function getKey($key) * @param string $value * @return $this */ - public function setKey($key, $value) + public function setKey(string $key, string $value): static { $this->keys[$key] = $value; return $this; @@ -77,7 +78,7 @@ public function setKey($key, $value) * this format: Variable: $variable=$value * @return array */ - public function getVariables() + public function getVariables(): array { return $this->variables; } @@ -88,7 +89,7 @@ public function getVariables() * @param string $variable * @return string|bool */ - public function getVariable($variable) + public function getVariable(string $variable): bool|string { return (array_key_exists($variable, $this->variables) ? $this->variables[$variable] : false); } @@ -100,7 +101,7 @@ public function getVariable($variable) * @param string $value * @return $this */ - public function setVariable($variable, $value) + public function setVariable(string $variable, string $value): static { $this->variables[$variable] = $value; return $this; @@ -111,7 +112,7 @@ public function setVariable($variable, $value) * * @return array */ - public function toArray() + #[ArrayShape(['keys' => "array", 'variables' => "array"])] public function toArray(): array { return array( 'keys' => $this->keys, @@ -125,7 +126,7 @@ public function toArray() * @param int $options * @return string */ - public function toJson($options = 0) + public function toJson($options = 0): string { return json_encode($this->toArray(), $options); } diff --git a/src/Clearvox/Asterisk/AMI/Message/OutgoingMessage.php b/src/Clearvox/Asterisk/AMI/Message/OutgoingMessage.php index f31a31f..b570306 100644 --- a/src/Clearvox/Asterisk/AMI/Message/OutgoingMessage.php +++ b/src/Clearvox/Asterisk/AMI/Message/OutgoingMessage.php @@ -21,7 +21,7 @@ class OutgoingMessage extends Message * * @return string */ - public function toString() + public function toString(): string { $prepared = array(); diff --git a/src/Clearvox/Asterisk/AMI/Message/Response/ResponseMessage.php b/src/Clearvox/Asterisk/AMI/Message/Response/ResponseMessage.php index 897ca9c..5ff1854 100644 --- a/src/Clearvox/Asterisk/AMI/Message/Response/ResponseMessage.php +++ b/src/Clearvox/Asterisk/AMI/Message/Response/ResponseMessage.php @@ -5,12 +5,12 @@ class ResponseMessage extends IncomingMessage { - public function isSuccessful() + public function isSuccessful(): bool { - return (bool) (false === strstr($this->getKey('Response'), 'Error')); + return !str_contains($this->getKey('Response'), 'Error'); } - public function getMessage() + public function getMessage(): bool|string { return $this->getKey('Message'); } diff --git a/src/Clearvox/Asterisk/AMI/Process.php b/src/Clearvox/Asterisk/AMI/Process.php index 954895d..bd2bd01 100644 --- a/src/Clearvox/Asterisk/AMI/Process.php +++ b/src/Clearvox/Asterisk/AMI/Process.php @@ -19,12 +19,12 @@ class Process /** * @var Finder\EventFinder */ - protected $eventFinder; + protected EventFinder $eventFinder; /** * @var string */ - protected $buffer = ''; + protected string $buffer = ''; public function __construct( EventFinder $eventFinder @@ -41,7 +41,7 @@ public function __construct( * @param string $part * @return array */ - public function read($part) + public function read(string $part): array { $messages = array(); $this->buffer .= $part; @@ -70,7 +70,7 @@ public function read($part) * @param Manager $manager * @param $message */ - public function run(Manager $manager, $message) + public function run(Manager $manager, $message): void { $eventPosition = strpos($message, 'Event:'); $responsePosition = strpos($message, 'Response:'); @@ -108,7 +108,7 @@ public function run(Manager $manager, $message) * @param string $message * @return string */ - protected function determineEventName($eventPosition, $message) + protected function determineEventName(int $eventPosition, string $message): string { $eventNameStart = $eventPosition + 7; From 0b6ac8ab8ee12d8ea304335b4f70489d8fcd6dea Mon Sep 17 00:00:00 2001 From: Rui Pedrosa Date: Thu, 28 Jul 2022 08:34:47 +0100 Subject: [PATCH 2/4] UC-6256: remove array shape php storm annotation by now --- src/Clearvox/Asterisk/AMI/Message/Message.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Clearvox/Asterisk/AMI/Message/Message.php b/src/Clearvox/Asterisk/AMI/Message/Message.php index f9fc7ec..528db1c 100644 --- a/src/Clearvox/Asterisk/AMI/Message/Message.php +++ b/src/Clearvox/Asterisk/AMI/Message/Message.php @@ -3,7 +3,6 @@ use Illuminate\Contracts\Support\Arrayable; use Illuminate\Contracts\Support\Jsonable; -use JetBrains\PhpStorm\ArrayShape; /** * All Messages, Incoming and Outgoing, are classes of this larger abstract @@ -55,7 +54,7 @@ public function getKeys(): array * @param string $key * @return string|bool */ - public function getKey($key): bool|string + public function getKey(string $key): bool|string { return (array_key_exists($key, $this->keys) ? $this->keys[$key] : false); } @@ -112,7 +111,7 @@ public function setVariable(string $variable, string $value): static * * @return array */ - #[ArrayShape(['keys' => "array", 'variables' => "array"])] public function toArray(): array + public function toArray(): array { return array( 'keys' => $this->keys, From 3cf56894dbe6770d6778efc2e45e84f23e86321a Mon Sep 17 00:00:00 2001 From: Rui Pedrosa Date: Tue, 25 Jul 2023 12:08:54 +0100 Subject: [PATCH 3/4] update composer.json and readme file --- CHANGELOG.md | 2 +- composer.json | 6 +- composer.lock | 262 +++++++++++++++----------------------------------- readme.MD | 15 +++ 4 files changed, 96 insertions(+), 189 deletions(-) create mode 100644 readme.MD diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c00c08..9696429 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ A major new feature release, see [**release announcement**](https://clue.engineering/2021/announcing-reactphp-default-loop). -* support php >=8.1 (and drop support older versions) +* support php ^8.0 (and drop support older versions) * Update library dependencies for major versions diff --git a/composer.json b/composer.json index 53d7ec6..162f1cb 100644 --- a/composer.json +++ b/composer.json @@ -18,14 +18,14 @@ } ], "require": { - "php": ">=8.1", + "php":"^8.0", "react/socket": "^1.11", "react/stream": "^1.2", - "illuminate/contracts": "^9.0" + "illuminate/contracts": "^10.0" }, "autoload": { "psr-4": { "Clearvox\\Asterisk\\AMI\\": "src/Clearvox/Asterisk/AMI" } } -} +} \ No newline at end of file diff --git a/composer.lock b/composer.lock index 28ab885..c9c48b2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "cf5d07ce0065ce45c4b3359670021409", + "content-hash": "dac7214387a4e93fa13b8edb357bf20a", "packages": [ { "name": "evenement/evenement", @@ -55,27 +55,27 @@ }, { "name": "illuminate/contracts", - "version": "v9.22.1", + "version": "v10.15.0", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "ac7f63520e18721f214e80fa7e8f0a5c77ed2719" + "reference": "ec47d1aa1a1b1a679d8553836b417343881b8215" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/ac7f63520e18721f214e80fa7e8f0a5c77ed2719", - "reference": "ac7f63520e18721f214e80fa7e8f0a5c77ed2719", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/ec47d1aa1a1b1a679d8553836b417343881b8215", + "reference": "ec47d1aa1a1b1a679d8553836b417343881b8215", "shasum": "" }, "require": { - "php": "^8.0.2", + "php": "^8.1", "psr/container": "^1.1.1|^2.0.1", "psr/simple-cache": "^1.0|^2.0|^3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "9.x-dev" + "dev-master": "10.x-dev" } }, "autoload": { @@ -99,7 +99,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-07-26T14:41:38+00:00" + "time": "2023-06-27T14:35:49+00:00" }, { "name": "psr/container", @@ -207,16 +207,16 @@ }, { "name": "react/cache", - "version": "v1.1.1", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/reactphp/cache.git", - "reference": "4bf736a2cccec7298bdf745db77585966fc2ca7e" + "reference": "d47c472b64aa5608225f47965a484b75c7817d5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/cache/zipball/4bf736a2cccec7298bdf745db77585966fc2ca7e", - "reference": "4bf736a2cccec7298bdf745db77585966fc2ca7e", + "url": "https://api.github.com/repos/reactphp/cache/zipball/d47c472b64aa5608225f47965a484b75c7817d5b", + "reference": "d47c472b64aa5608225f47965a484b75c7817d5b", "shasum": "" }, "require": { @@ -224,7 +224,7 @@ "react/promise": "^3.0 || ^2.0 || ^1.1" }, "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35" }, "type": "library", "autoload": { @@ -267,49 +267,45 @@ ], "support": { "issues": "https://github.com/reactphp/cache/issues", - "source": "https://github.com/reactphp/cache/tree/v1.1.1" + "source": "https://github.com/reactphp/cache/tree/v1.2.0" }, "funding": [ { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "time": "2021-02-02T06:47:52+00:00" + "time": "2022-11-30T15:59:55+00:00" }, { "name": "react/dns", - "version": "v1.9.0", + "version": "v1.11.0", "source": { "type": "git", "url": "https://github.com/reactphp/dns.git", - "reference": "6d38296756fa644e6cb1bfe95eff0f9a4ed6edcb" + "reference": "3be0fc8f1eb37d6875cd6f0c6c7d0be81435de9f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/dns/zipball/6d38296756fa644e6cb1bfe95eff0f9a4ed6edcb", - "reference": "6d38296756fa644e6cb1bfe95eff0f9a4ed6edcb", + "url": "https://api.github.com/repos/reactphp/dns/zipball/3be0fc8f1eb37d6875cd6f0c6c7d0be81435de9f", + "reference": "3be0fc8f1eb37d6875cd6f0c6c7d0be81435de9f", "shasum": "" }, "require": { "php": ">=5.3.0", "react/cache": "^1.0 || ^0.6 || ^0.5", "react/event-loop": "^1.2", - "react/promise": "^3.0 || ^2.7 || ^1.2.1", - "react/promise-timer": "^1.8" + "react/promise": "^3.0 || ^2.7 || ^1.2.1" }, "require-dev": { - "clue/block-react": "^1.2", - "phpunit/phpunit": "^9.3 || ^4.8.35" + "phpunit/phpunit": "^9.5 || ^4.8.35", + "react/async": "^4 || ^3 || ^2", + "react/promise-timer": "^1.9" }, "type": "library", "autoload": { "psr-4": { - "React\\Dns\\": "src" + "React\\Dns\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -347,49 +343,43 @@ ], "support": { "issues": "https://github.com/reactphp/dns/issues", - "source": "https://github.com/reactphp/dns/tree/v1.9.0" + "source": "https://github.com/reactphp/dns/tree/v1.11.0" }, "funding": [ { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "time": "2021-12-20T08:46:54+00:00" + "time": "2023-06-02T12:45:26+00:00" }, { "name": "react/event-loop", - "version": "v1.3.0", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/reactphp/event-loop.git", - "reference": "187fb56f46d424afb6ec4ad089269c72eec2e137" + "reference": "6e7e587714fff7a83dcc7025aee42ab3b265ae05" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/event-loop/zipball/187fb56f46d424afb6ec4ad089269c72eec2e137", - "reference": "187fb56f46d424afb6ec4ad089269c72eec2e137", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/6e7e587714fff7a83dcc7025aee42ab3b265ae05", + "reference": "6e7e587714fff7a83dcc7025aee42ab3b265ae05", "shasum": "" }, "require": { "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36" }, "suggest": { - "ext-event": "~1.0 for ExtEventLoop", - "ext-pcntl": "For signal handling support when using the StreamSelectLoop", - "ext-uv": "* for ExtUvLoop" + "ext-pcntl": "For signal handling support when using the StreamSelectLoop" }, "type": "library", "autoload": { "psr-4": { - "React\\EventLoop\\": "src" + "React\\EventLoop\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -425,39 +415,36 @@ ], "support": { "issues": "https://github.com/reactphp/event-loop/issues", - "source": "https://github.com/reactphp/event-loop/tree/v1.3.0" + "source": "https://github.com/reactphp/event-loop/tree/v1.4.0" }, "funding": [ { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "time": "2022-03-17T11:10:22+00:00" + "time": "2023-05-05T10:11:24+00:00" }, { "name": "react/promise", - "version": "v2.9.0", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/reactphp/promise.git", - "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910" + "reference": "c86753c76fd3be465d93b308f18d189f01a22be4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/234f8fd1023c9158e2314fa9d7d0e6a83db42910", - "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910", + "url": "https://api.github.com/repos/reactphp/promise/zipball/c86753c76fd3be465d93b308f18d189f01a22be4", + "reference": "c86753c76fd3be465d93b308f18d189f01a22be4", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": ">=7.1.0" }, "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36" + "phpstan/phpstan": "1.10.20 || 1.4.10", + "phpunit/phpunit": "^9.5 || ^7.5" }, "type": "library", "autoload": { @@ -501,130 +488,43 @@ ], "support": { "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v2.9.0" + "source": "https://github.com/reactphp/promise/tree/v3.0.0" }, "funding": [ { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "time": "2022-02-11T10:27:51+00:00" - }, - { - "name": "react/promise-timer", - "version": "v1.9.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/promise-timer.git", - "reference": "aa7a73c74b8d8c0f622f5982ff7b0351bc29e495" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise-timer/zipball/aa7a73c74b8d8c0f622f5982ff7b0351bc29e495", - "reference": "aa7a73c74b8d8c0f622f5982ff7b0351bc29e495", - "shasum": "" - }, - "require": { - "php": ">=5.3", - "react/event-loop": "^1.2", - "react/promise": "^3.0 || ^2.7.0 || ^1.2.1" - }, - "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "React\\Promise\\Timer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Lück", - "email": "christian@clue.engineering", - "homepage": "https://clue.engineering/" - }, - { - "name": "Cees-Jan Kiewiet", - "email": "reactphp@ceesjankiewiet.nl", - "homepage": "https://wyrihaximus.net/" - }, - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com", - "homepage": "https://sorgalla.com/" - }, - { - "name": "Chris Boden", - "email": "cboden@gmail.com", - "homepage": "https://cboden.dev/" - } - ], - "description": "A trivial implementation of timeouts for Promises, built on top of ReactPHP.", - "homepage": "https://github.com/reactphp/promise-timer", - "keywords": [ - "async", - "event-loop", - "promise", - "reactphp", - "timeout", - "timer" - ], - "support": { - "issues": "https://github.com/reactphp/promise-timer/issues", - "source": "https://github.com/reactphp/promise-timer/tree/v1.9.0" - }, - "funding": [ - { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" - } - ], - "time": "2022-06-13T13:41:03+00:00" + "time": "2023-07-11T16:12:49+00:00" }, { "name": "react/socket", - "version": "v1.11.0", + "version": "v1.13.0", "source": { "type": "git", "url": "https://github.com/reactphp/socket.git", - "reference": "f474156aaab4f09041144fa8b57c7d70aed32a1c" + "reference": "cff482bbad5848ecbe8b57da57e4e213b03619aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/socket/zipball/f474156aaab4f09041144fa8b57c7d70aed32a1c", - "reference": "f474156aaab4f09041144fa8b57c7d70aed32a1c", + "url": "https://api.github.com/repos/reactphp/socket/zipball/cff482bbad5848ecbe8b57da57e4e213b03619aa", + "reference": "cff482bbad5848ecbe8b57da57e4e213b03619aa", "shasum": "" }, "require": { "evenement/evenement": "^3.0 || ^2.0 || ^1.0", "php": ">=5.3.0", - "react/dns": "^1.8", + "react/dns": "^1.11", "react/event-loop": "^1.2", - "react/promise": "^2.6.0 || ^1.2.1", - "react/promise-timer": "^1.8", + "react/promise": "^3 || ^2.6 || ^1.2.1", "react/stream": "^1.2" }, "require-dev": { - "clue/block-react": "^1.5", - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35", - "react/promise-stream": "^1.2" + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35", + "react/async": "^4 || ^3 || ^2", + "react/promise-stream": "^1.4", + "react/promise-timer": "^1.9" }, "type": "library", "autoload": { @@ -668,32 +568,28 @@ ], "support": { "issues": "https://github.com/reactphp/socket/issues", - "source": "https://github.com/reactphp/socket/tree/v1.11.0" + "source": "https://github.com/reactphp/socket/tree/v1.13.0" }, "funding": [ { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "time": "2022-01-14T10:14:32+00:00" + "time": "2023-06-07T10:28:34+00:00" }, { "name": "react/stream", - "version": "v1.2.0", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/reactphp/stream.git", - "reference": "7a423506ee1903e89f1e08ec5f0ed430ff784ae9" + "reference": "6fbc9672905c7d5a885f2da2fc696f65840f4a66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/stream/zipball/7a423506ee1903e89f1e08ec5f0ed430ff784ae9", - "reference": "7a423506ee1903e89f1e08ec5f0ed430ff784ae9", + "url": "https://api.github.com/repos/reactphp/stream/zipball/6fbc9672905c7d5a885f2da2fc696f65840f4a66", + "reference": "6fbc9672905c7d5a885f2da2fc696f65840f4a66", "shasum": "" }, "require": { @@ -703,12 +599,12 @@ }, "require-dev": { "clue/stream-filter": "~1.2", - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35" + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35" }, "type": "library", "autoload": { "psr-4": { - "React\\Stream\\": "src" + "React\\Stream\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -750,19 +646,15 @@ ], "support": { "issues": "https://github.com/reactphp/stream/issues", - "source": "https://github.com/reactphp/stream/tree/v1.2.0" + "source": "https://github.com/reactphp/stream/tree/v1.3.0" }, "funding": [ { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "time": "2021-07-11T12:37:55+00:00" + "time": "2023-06-16T10:52:11+00:00" } ], "packages-dev": [], @@ -772,7 +664,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=8.1" + "php": "^8.0" }, "platform-dev": [], "plugin-api-version": "2.3.0" diff --git a/readme.MD b/readme.MD new file mode 100644 index 0000000..289fa03 --- /dev/null +++ b/readme.MD @@ -0,0 +1,15 @@ +## package-php-react-ami + +A clearvox PHP lib with asterisk AMI + +### How to update + +1. make (code) changes + +2. regenerate composer.lock file + +``` +# https://getcomposer.org/doc/00-intro.md#docker-image +docker pull composer/composer +docker run --rm -it -v "$(pwd):/src" composer/composer install +``` \ No newline at end of file From ebf059e30bf73974bc1923412229c3ee88bb57ad Mon Sep 17 00:00:00 2001 From: Rui Pedrosa Date: Tue, 25 Jul 2023 16:28:36 +0100 Subject: [PATCH 4/4] UC-6256 rollback illuminate contracts to 6.0 --- composer.json | 4 ++-- composer.lock | 55 +++++++++++++++++++++++---------------------------- 2 files changed, 27 insertions(+), 32 deletions(-) diff --git a/composer.json b/composer.json index 162f1cb..1796171 100644 --- a/composer.json +++ b/composer.json @@ -18,10 +18,10 @@ } ], "require": { - "php":"^8.0", + "php": "^8.0", "react/socket": "^1.11", "react/stream": "^1.2", - "illuminate/contracts": "^10.0" + "illuminate/contracts": "^6.0" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index c9c48b2..5e97844 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "dac7214387a4e93fa13b8edb357bf20a", + "content-hash": "463fa2a8ba9b8ed89edd3b8a1e91f66e", "packages": [ { "name": "evenement/evenement", @@ -55,27 +55,27 @@ }, { "name": "illuminate/contracts", - "version": "v10.15.0", + "version": "v6.20.44", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "ec47d1aa1a1b1a679d8553836b417343881b8215" + "reference": "2aeb1ea8985f7a79abaf7186234c94b543a04165" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/ec47d1aa1a1b1a679d8553836b417343881b8215", - "reference": "ec47d1aa1a1b1a679d8553836b417343881b8215", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/2aeb1ea8985f7a79abaf7186234c94b543a04165", + "reference": "2aeb1ea8985f7a79abaf7186234c94b543a04165", "shasum": "" }, "require": { - "php": "^8.1", - "psr/container": "^1.1.1|^2.0.1", - "psr/simple-cache": "^1.0|^2.0|^3.0" + "php": "^7.2.5|^8.0", + "psr/container": "^1.0", + "psr/simple-cache": "^1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "10.x-dev" + "dev-master": "6.x-dev" } }, "autoload": { @@ -99,31 +99,26 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-06-27T14:35:49+00:00" + "time": "2021-12-01T12:53:22+00:00" }, { "name": "psr/container", - "version": "2.0.2", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", "shasum": "" }, "require": { "php": ">=7.4.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -150,31 +145,31 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" + "source": "https://github.com/php-fig/container/tree/1.1.2" }, - "time": "2021-11-05T16:47:00+00:00" + "time": "2021-11-05T16:50:12+00:00" }, { "name": "psr/simple-cache", - "version": "3.0.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/php-fig/simple-cache.git", - "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", - "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", "shasum": "" }, "require": { - "php": ">=8.0.0" + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { @@ -189,7 +184,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "homepage": "http://www.php-fig.org/" } ], "description": "Common interfaces for simple caching", @@ -201,9 +196,9 @@ "simple-cache" ], "support": { - "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" + "source": "https://github.com/php-fig/simple-cache/tree/master" }, - "time": "2021-10-29T13:26:27+00:00" + "time": "2017-10-23T01:57:42+00:00" }, { "name": "react/cache",