Skip to content

Commit

Permalink
Merge pull request #1 from Eagle-Eye-Solutions/circa2022
Browse files Browse the repository at this point in the history
AIR-25247: PHP 8 Support
  • Loading branch information
markdavidsonEE authored Jan 23, 2023
2 parents cde16c9 + 3443bcc commit f119a47
Show file tree
Hide file tree
Showing 17 changed files with 920 additions and 1,079 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ composer.phar
composer.lock
/tests/phpunit_report
/docs/source/API/API/cache/
.phpunit.result.cache


31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,37 @@

[![Build Status](https://secure.travis-ci.org/alchemy-fr/RabbitMQ-Management-API-Client.png?branch=master)](https://travis-ci.org/alchemy-fr/RabbitMQ-Management-API-Client)

**Update:** This branch is an update to this library to allow it to work with modern (circa 2019) versions of
PHP (>=7.2), RabbitMQ, Guzzle, React, Doctrine, PHPUnit and related support libraries. (see composer.json for
version details) The existing version had too many dependencies on deprecated versions of other libraries
preventing it from being utilized on new projects. This update fixes that.

Extensive changes were needed under the hood but the API should remain nearly
identical with the exception of the exceptions thrown from the non-async client code.

Cases involving a non-existent entity (now including Add methods, such as trying to add a binding to a
non-existent vhost) are now uniformly thrown as RabbitMQ\Management\Exception\EntityNotFoundException
where previously some were RabbitMQ\Management\Exception\RuntimeException. Other exceptions from the
underlying Guzzle library are now passed through as GuzzleHttp\Exception\ClientException rather than
GuzzleHttp\Exception\RequestException due to changes in Guzzle.

Note that the properties and format thereof returned in queries are dependent on
the rabbitmq server version. The properties defined in the Entity classes of
this package have been updated to include those provided by RabbitMQ 3.8 (with some
older ones retained but not necessarily populated.) These are primarily
provided for reference and code hinting in IDEs but your results may
vary with an actual server. Differences between the defined entity classes
and the properties returned by the server are silently ignored and all
results returned are passed through.

Note also that due to management api caching and statistics collection
intervals, the results returned from queries may be incomplete or delayed.
Creating an object and then immediately querying it may yield incomplete
or missing results. Because of this, the unit tests have built in delays
to wait before checking the returned results in various tests.

*(end update message)*

This library is intended to help management of RabbitMQ server in an application.
It provides two ways to query RabbitMQ : Synchronous query with Guzzle and
Asynchronous query with React.
Expand Down
74 changes: 39 additions & 35 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,42 @@
{
"name": "eagle-eye-solutions/rabbitmq-management-client",
"type": "library",
"description": "RabbitMQ Management Plugin API Client",
"keywords": ["api", "rabbitmq", "management"],
"license": "MIT",
"authors": [
{
"name": "Romain Neutron",
"email": "imprec@gmail.com"
}
],
"require": {
"doctrine/common": ">=2.0",
"guzzlehttp/guzzle": "~6.0"
},
"require-dev": {
"videlalvaro/php-amqplib": "dev-master@dev",
"sami/sami": "~1.0",
"phpunit/phpunit": "7.0.*",
"react/promise": "~1.0",
"react/react": "~0.2.0",
"react/curry": "~1.0"
},
"autoload": {
"psr-0": {
"RabbitMQ": "src"
}
},
"suggest": {
"react/react": "Version 0.2 to use the async client"
},
"extra": {
"branch-alias": {
"dev-master": "0.1.x-dev"
}
"name": "eagle-eye-solutions/rabbitmq-management-client",
"type": "library",
"description": "RabbitMQ Management Plugin API Client",
"keywords": [
"api",
"rabbitmq",
"management"
],
"license": "MIT",
"authors": [
{
"name": "Romain Neutron",
"email": "imprec@gmail.com"
}
],
"require": {
"doctrine/common": ">=2.6.3",
"guzzlehttp/guzzle": ">=6.3.3",
"ext-json": "*"
},
"require-dev": {
"php-amqplib/php-amqplib": "dev-master",
"phpunit/phpunit": ">=7.0",
"react/http-client": "^0.5.9",
"react/partial": "~2.0",
"seregazhuk/react-promise-testing": "dev-master"
},
"autoload": {
"psr-0": {
"RabbitMQ": "src"
}
},
"suggest": {
"react/react": "Version 0.2 to use the async client"
},
"extra": {
"branch-alias": {
"dev-master": "0.1.x-dev"
}
}
}
11 changes: 4 additions & 7 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="true"
verbose="false"
bootstrap="tests/bootstrap.php"
>
<logging>
<log type="coverage-html" target="tests/phpunit_report/report" charset="UTF-8"
yui="true" highlight="false"
<log type="coverage-html" target="tests/phpunit_report/report"
lowUpperBound="35" highLowerBound="70"/>
</logging>
<php>
Expand All @@ -26,10 +24,9 @@
</testsuite>
</testsuites>
<filter>
<blacklist>
<directory>vendor</directory>
<directory>tests</directory>
</blacklist>
<whitelist>
<directory>src</directory>
</whitelist>
</filter>

</phpunit>
Expand Down
Loading

0 comments on commit f119a47

Please # to comment.