Skip to content

Commit

Permalink
Merge pull request #12 from MarwanAlsoltany/dev
Browse files Browse the repository at this point in the history
General improvements and new features
  • Loading branch information
MarwanAlsoltany authored May 12, 2022
2 parents f53a0e3 + ac4a66a commit d97e269
Show file tree
Hide file tree
Showing 332 changed files with 1,593 additions and 1,275 deletions.
10 changes: 10 additions & 0 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
risky: false
version: 7
preset: psr12
finder:
exclude:
- build
- demo
- docs
- tests
- vendor
name: '*.php'
28 changes: 27 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ All notable changes to **AMQP Agent** will be documented in this file.

## [[1.1.1] - 2020-09-14](https://github.com/MarwanAlsoltany/amqp-agent/compare/v1.0.1...v1.1.1)
- Update `composer.json`:
- Pump minimum **php-amqplib** version.
- Bump minimum **php-amqplib** version.
- Downgrade minimum php version.
- Update dev requirements versions to match php version.
- Update branch-alias.
Expand Down Expand Up @@ -243,3 +243,29 @@ All notable changes to **AMQP Agent** will be documented in this file.
- Update Continuous Integration config files.
- Update Development Dependencies config files.
- Rebuild documentation.


<br />

## [[2.2.0] - 2022-05-12](https://github.com/MarwanAlsoltany/amqp-agent/compare/v2.1.0...v2.2.0)

- Update `composer.json`:
- Bump minimum **php-amqplib** version.
- Update **php** requirement.
- Update branch-alias.
- Update `WorkerFacilitationInterface`:
- Change `work()` method return value type hint (from `bool` to `void`).
- Update `Publisher` class:
- Update `publishBatch()` method, it takes now `$parameters` (array) instead of `$_exchange` (string) just like the `publish()` method.
- Update `publishBatch()` method signature on the corresponding interface (`PublisherInterface`).
- Update `work()` method implementation to cover the new changes introduced to the `WorkerFacilitationInterface`.
- Update DocBlock on the corresponding `PublisherSingleton` class of the affected methods.
- Update `Consumer` class:
- Update `work()` method implementation to cover the new changes introduced to the `WorkerFacilitationInterface`.
- Update `consume()` method to shut down all opened channels and connections.
- Update DocBlock on the corresponding `ConsumerSingleton` class of the affected methods.
- Update `Utility` class:
- Add `respond()` method.
- Update tests to cover the new changes.
- Fix some typos in DocBlocks and other parts of the codebase.
- Rebuild documentation.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ AMQP Agent exposes a number of concrete classes that can be directly used and ot
| [AbstractEndpoint](./src/RPC/AbstractEndpoint.php) <sup><code>*A</code></sup> | An abstract class implementing the basic functionality of an endpoint. | [Doc](https://marwanalsoltany.github.io/amqp-agent/classes/MAKS_AmqpAgent_RPC_AbstractEndpoint.html) |
| [ClientEndpoint](./src/RPC/ClientEndpoint.php) <sup><code>*C</code></sup> | A class specialized in requesting. Implementing only the methods needed for a client. | [Doc](https://marwanalsoltany.github.io/amqp-agent/classes/MAKS_AmqpAgent_RPC_ClientEndpoint.html) |
| [ServerEndpoint](./src/RPC/ServerEndpoint.php) <sup><code>*C</code></sup> | A class specialized in responding. Implementing only the methods needed for a server. | [Doc](https://marwanalsoltany.github.io/amqp-agent/classes/MAKS_AmqpAgent_RPC_ServerEndpoint.html) |
| [AmqpAgentParameters](./src/Config/Utility.php) <sup><code>*C\*H</code></sup> | A class that contains all AMQP Agent parameters as constants. | [Doc](https://marwanalsoltany.github.io/amqp-agent/classes/MAKS_AmqpAgent_Config_AmqpAgentParameters.html) |
| [AmqpAgentParameters](./src/Config/AmqpAgentParameters.php) <sup><code>*C\*H</code></sup> | A class that contains all AMQP Agent parameters as constants. | [Doc](https://marwanalsoltany.github.io/amqp-agent/classes/MAKS_AmqpAgent_Config_AmqpAgentParameters.html) |
| [Utility](./src/Helper/Utility.php) <sup><code>*C\*H</code></sup> | A class containing miscellaneous helper functions. | [Doc](https://marwanalsoltany.github.io/amqp-agent/classes/MAKS_AmqpAgent_Helper_Utility.html) |
| [Event](./src/Helper/Event.php) <sup><code>*C\*H</code></sup> | A simple class for handling events (dispatching and listening). | [Doc](https://marwanalsoltany.github.io/amqp-agent/classes/MAKS_AmqpAgent_Helper_Event.html) |
| [ArrayProxy](./src/Helper/ArrayProxy.php) <sup><code>*C\*H</code></sup> | A class containing methods for for manipulating and working arrays. | [Doc](https://marwanalsoltany.github.io/amqp-agent/classes/MAKS_AmqpAgent_Helper_ArrayProxy.html) |
Expand Down Expand Up @@ -375,7 +375,7 @@ $publisher = new Publisher();
// connect() method does not take any parameters.
// Public assignment notation is used instead.
// Starting from v1.1.0, you can use getNewConnection(),
// setConnection(), getNewChannel, and setChannel() instead.
// setConnection(), getNewChannel(), and setChannel() instead.
$publisher->connectionOptions = [
'host' => 'localhost',
'user' => 'guest',
Expand Down Expand Up @@ -477,7 +477,7 @@ $consumer = new Consumer();
// connect() method does not take any parameters.
// Public assignment notation is used instead.
// Starting from v1.1.0, you can use getNewConnection(),
// setConnection(), getNewChannel, and setChannel() instead.
// setConnection(), getNewChannel(), and setChannel() instead.
$consumer->connectionOptions = [
'host' => 'localhost',
'user' => 'guest',
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"issues": "https://github.com/MarwanAlsoltany/amqp-agent/issues"
},
"require": {
"php" : "^7.1",
"php-amqplib/php-amqplib": "^2.12"
"php" : ">=7.1",
"php-amqplib/php-amqplib": "^3.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.5.5",
Expand Down Expand Up @@ -62,7 +62,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.1-dev"
"dev-master": "2.2-dev"
}
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion docs/classes.html
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ <h2 id="MAKS_AmqpAgent_Worker">\MAKS\AmqpAgent\Worker</h2>
</div>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/classes/Exception.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ <h4>public</h4>
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/classes/Exception/__clone.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h2 id="return">Returns</h2>
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/classes/Exception/__construct.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ <h2 id="return">Returns</h2>
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/classes/Exception/__toString.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h2 id="return">Returns</h2>
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/classes/Exception/getCode.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h2 id="return">Returns</h2>
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/classes/Exception/getFile.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h2 id="return">Returns</h2>
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/classes/Exception/getLine.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h2 id="return">Returns</h2>
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/classes/Exception/getMessage.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h2 id="return">Returns</h2>
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/classes/Exception/getPrevious.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h2 id="return">Returns</h2>
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/classes/Exception/getTrace.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h2 id="return">Returns</h2>
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/classes/Exception/getTraceAsString.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h2 id="return">Returns</h2>
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
10 changes: 5 additions & 5 deletions docs/classes/MAKS_AmqpAgent_Client.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h2 id="coverage">Coverage</h2>
<tr>
<td>Lines</td>
<td class="percent">100%</td>
<td class="nummeric">61 / 61</td>
<td class="nummeric">60 / 60</td>
</tr>
</table>
<h2 id="members">Members</h2>
Expand Down Expand Up @@ -171,7 +171,7 @@ <h4>public</h4>
<h2 id="history">History</h2>
<ul class="styled history">
<li>
<h3>2021-01-12T14:21:43+00:00 (commit #<span title="3f28e02c4e25ef92561c42ecd3b5055da1cc0bf8">3f28e02</span>)</h3>
<h3>2021-01-12T21:10:21+00:00 (commit #<span title="f7f7e61d0335f8858b6691cea34bde62637a3215">f7f7e61</span>)</h3>
<div>
<p>
Author: Marwan Al-Soltany ([email protected]) /
Expand All @@ -183,7 +183,7 @@ <h3>2021-01-12T14:21:43+00:00 (commit #<span title="3f28e02c4e25ef92561c42ecd3b5
</div>
</li>
<li>
<h3>2021-01-12T04:37:11+00:00 (commit #<span title="861e7c31dcff65d67632fc77bd461db1d537f660">861e7c3</span>)</h3>
<h3>2021-01-12T21:10:21+00:00 (commit #<span title="177c444aaea9971815545fa2d18e59f2c3e2f7d0">177c444</span>)</h3>
<div>
<p>
Author: Marwan Al-Soltany ([email protected]) /
Expand All @@ -194,7 +194,7 @@ <h3>2021-01-12T04:37:11+00:00 (commit #<span title="861e7c31dcff65d67632fc77bd46
</div>
</li>
<li>
<h3>2021-01-11T14:31:31+00:00 (commit #<span title="ca1996b058a8841c1df7443af775a41da6ca36b4">ca1996b</span>)</h3>
<h3>2021-01-12T21:10:21+00:00 (commit #<span title="d09424b5b493da3afb38d515714cc695e7afbeb9">d09424b</span>)</h3>
<div>
<p>
Author: Marwan Al-Soltany ([email protected]) /
Expand Down Expand Up @@ -315,7 +315,7 @@ <h3>2020-06-13T06:01:42+00:00 (commit #<span title="2fc3ca5fb1c4b950fafccdca2c1c
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/classes/MAKS_AmqpAgent_Client/__construct.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ <h3>Tests</h3>
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/classes/MAKS_AmqpAgent_Client/__get.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ <h3>Tests</h3>
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/classes/MAKS_AmqpAgent_Client/get.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ <h3>Tests</h3>
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/classes/MAKS_AmqpAgent_Client/getClientEndpoint.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h3>Tests</h3>
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/classes/MAKS_AmqpAgent_Client/getConfig.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h3>Tests</h3>
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/classes/MAKS_AmqpAgent_Client/getConsumer.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h3>Tests</h3>
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/classes/MAKS_AmqpAgent_Client/getLogger.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h3>Tests</h3>
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/classes/MAKS_AmqpAgent_Client/getPublisher.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h3>Tests</h3>
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/classes/MAKS_AmqpAgent_Client/getSerializer.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h3>Tests</h3>
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/classes/MAKS_AmqpAgent_Client/getServerEndpoint.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h3>Tests</h3>
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
4 changes: 2 additions & 2 deletions docs/classes/MAKS_AmqpAgent_Client/gettable.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ <h2 id="tests">Test Coverage</h2>
<div class="styled">
<h3>Information</h3>
<ul class="styled">
<li>Coverage: 11/11 Lines (100%)</li>
<li>Coverage: 10/10 Lines (100%)</li>
<li>Tests: 2</li>
<li>Passed: 2 (100%)</li>
</ul>
Expand All @@ -101,7 +101,7 @@ <h3>Tests</h3>
</section>
</div>
<footer>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2021 by Arne Blankerts and Contributors</span>
<span>Generated using phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors</span>
</footer>
</body>
</html>
Loading

0 comments on commit d97e269

Please sign in to comment.