Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: including 'AWS Event Bridge' in 'Notifiers' #7

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php
namespace MageOS\AsyncEventsAWS\Plugin\MageOS\AsyncEventsAdminUi;

use MageOS\AsyncEventsAdminUi\Ui\Source\Notifiers as Subject;

class UiSourceNotifiers
{
public function afterToOptionArray(Subject $subject, $result)
{
$result[] = [
'value' => 'event_bridge',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'label' => 'AWS Event Bridge',
];
return $result;
}
}
4 changes: 4 additions & 0 deletions MageOS/AsyncEventsAWS/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@
</argument>
</arguments>
</type>

<type name="MageOS\AsyncEventsAdminUi\Ui\Source\Notifiers">
Copy link
Member

@gowrizrh gowrizrh Aug 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would mean that this module needs to depend on the MageOSAsyncEventsAdminUi module which hasn't been declared.

rather than adding a plugin here, could we make the change in the admin module to either

  1. accept free text input
  2. auto discover notifiers present in MageOS\AsyncEvents\Service\AsyncEvent\NotifierFactory 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've created a very vague test PR mage-os/mageos-async-events#29

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cheers for the feeedback @gowrizrh ,

this would mean that this module needs to depend on the MageOSAsyncEventsAdminUi module which hasn't been declared.

It doesn't break with it in, but also didn't want expand the admin ui module (as then that would mean all sink types would need adding in there), it also felt a bit of a small plugin to warrant its own module.

What is it you need from me to get this over the line? (The project I'm using this on is almost ready, would rather take a packaged version then a fork live)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm back from holidays and approved @gowrizrh's PR in the main module. We can push forward now. I'd like a change in the Admin UI module more, we can finish that now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamzero1 I'm back from holidays. I'm happy to approve this to get it across the line if updating the Admin UI module is going to be a while @avstudnitz. Once the admin module lists all event sinks automatically I'll likely revert this change 🙂

<plugin name="mageos_async_events_aws" type="MageOS\AsyncEventsAWS\Plugin\MageOS\AsyncEventsAdminUi\UiSourceNotifiers" sortOrder="1" disabled="false" />
</type>
</config>