[PR #64] [MERGED] Event subscriber #79

Closed
opened 2026-03-04 23:24:12 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/yswery/PHP-DNS-SERVER/pull/64
Author: @ivanstan
Created: 9/14/2018
Status: Merged
Merged: 9/15/2018
Merged by: @samuelwilliams

Base: version-1Head: feature/event-subscriber


📝 Commits (3)

  • 0273130 Event subscribers
  • d57ee46 Event subscribers - adds exception event
  • 09e02e7 EchoLogger rewritten to extend EventSubscriberInterface

📊 Changes

14 files changed (+378 additions, -29 deletions)

View changed files

docs/events.md (+43 -0)
📝 example/example.php (+1 -1)
📝 src/EchoLogger.php (+43 -2)
src/Event/Event.php (+12 -0)
src/Event/EventSubscriberInterface.php (+8 -0)
src/Event/EventSubscriberTrait.php (+47 -0)
src/Event/ExceptionEvent.php (+18 -0)
src/Event/MessageEvent.php (+29 -0)
src/Event/QueryReceiveEvent.php (+20 -0)
src/Event/QueryResponseEvent.php (+8 -0)
src/Event/ServerStartEvent.php (+20 -0)
📝 src/Server.php (+22 -26)
src/Tests/EventSubscriberTest.php (+62 -0)
src/Tests/ExampleEventSubscriber.php (+45 -0)

📄 Description

Possibility to decouple additional logic for (caching, logging, etc) from server class using event subscribers.

Merge request defines event classes, implements throwing events in server class, adds tests and documentation for developers explaining feature usage.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/yswery/PHP-DNS-SERVER/pull/64 **Author:** [@ivanstan](https://github.com/ivanstan) **Created:** 9/14/2018 **Status:** ✅ Merged **Merged:** 9/15/2018 **Merged by:** [@samuelwilliams](https://github.com/samuelwilliams) **Base:** `version-1` ← **Head:** `feature/event-subscriber` --- ### 📝 Commits (3) - [`0273130`](https://github.com/yswery/PHP-DNS-SERVER/commit/0273130f48fbd05a7025fb7fafb684d40a5ecd16) Event subscribers - [`d57ee46`](https://github.com/yswery/PHP-DNS-SERVER/commit/d57ee46c287b88cd392925f0b1f75766809310f9) Event subscribers - adds exception event - [`09e02e7`](https://github.com/yswery/PHP-DNS-SERVER/commit/09e02e7171374d190545828ccf9a3e973c01196a) EchoLogger rewritten to extend EventSubscriberInterface ### 📊 Changes **14 files changed** (+378 additions, -29 deletions) <details> <summary>View changed files</summary> ➕ `docs/events.md` (+43 -0) 📝 `example/example.php` (+1 -1) 📝 `src/EchoLogger.php` (+43 -2) ➕ `src/Event/Event.php` (+12 -0) ➕ `src/Event/EventSubscriberInterface.php` (+8 -0) ➕ `src/Event/EventSubscriberTrait.php` (+47 -0) ➕ `src/Event/ExceptionEvent.php` (+18 -0) ➕ `src/Event/MessageEvent.php` (+29 -0) ➕ `src/Event/QueryReceiveEvent.php` (+20 -0) ➕ `src/Event/QueryResponseEvent.php` (+8 -0) ➕ `src/Event/ServerStartEvent.php` (+20 -0) 📝 `src/Server.php` (+22 -26) ➕ `src/Tests/EventSubscriberTest.php` (+62 -0) ➕ `src/Tests/ExampleEventSubscriber.php` (+45 -0) </details> ### 📄 Description Possibility to decouple additional logic for (caching, logging, etc) from server class using event subscribers. Merge request defines event classes, implements throwing events in server class, adds tests and documentation for developers explaining feature usage. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 23:24:12 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/PHP-DNS-SERVER#79
No description provided.