diff --git a/composer.json b/composer.json index d65d778..21e9bc1 100644 --- a/composer.json +++ b/composer.json @@ -45,6 +45,7 @@ "symfony/discord-notifier": "7.1.*", "symfony/doctrine-messenger": "7.1.*", "symfony/dotenv": "7.1.*", + "symfony/engagespot-notifier": "7.1.*", "symfony/expression-language": "7.1.*", "symfony/flex": "^2", "symfony/form": "7.1.*", @@ -59,9 +60,11 @@ "symfony/mime": "7.1.*", "symfony/monolog-bundle": "^3.0", "symfony/notifier": "7.1.*", + "symfony/ntfy-notifier": "7.1.*", "symfony/process": "7.1.*", "symfony/property-access": "7.1.*", "symfony/property-info": "7.1.*", + "symfony/pushover-notifier": "7.1.*", "symfony/rate-limiter": "7.1.*", "symfony/redis-messenger": "7.1.*", "symfony/rocket-chat-notifier": "7.1.*", diff --git a/composer.lock b/composer.lock index 57f3106..3d5498c 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": "c99e351194c8053498e762ed4dac4864", + "content-hash": "1983a126aba2f9d83d15ac3d08b79418", "packages": [ { "name": "api-platform/core", @@ -4647,6 +4647,74 @@ ], "time": "2024-05-31T14:57:53+00:00" }, + { + "name": "symfony/engagespot-notifier", + "version": "v7.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/engagespot-notifier.git", + "reference": "e1beca155abf4ecc838eb9093b82fd7c8c01383f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/engagespot-notifier/zipball/e1beca155abf4ecc838eb9093b82fd7c8c01383f", + "reference": "e1beca155abf4ecc838eb9093b82fd7c8c01383f", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/http-client": "^6.4|^7.0", + "symfony/notifier": "^6.4|^7.0" + }, + "type": "symfony-notifier-bridge", + "autoload": { + "psr-4": { + "Symfony\\Component\\Notifier\\Bridge\\Engagespot\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel Gorgan", + "homepage": "https://github.com/danut007ro" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Engagespot Notifier Bridge", + "homepage": "https://symfony.com", + "keywords": [ + "engagespot", + "notifier", + "push" + ], + "support": { + "source": "https://github.com/symfony/engagespot-notifier/tree/v7.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T14:57:53+00:00" + }, { "name": "symfony/error-handler", "version": "v7.1.2", @@ -6603,6 +6671,73 @@ ], "time": "2024-06-28T08:00:31+00:00" }, + { + "name": "symfony/ntfy-notifier", + "version": "v7.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/ntfy-notifier.git", + "reference": "9fa7e4991eb3f6879e4afdeb1a0112daac09d320" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/ntfy-notifier/zipball/9fa7e4991eb3f6879e4afdeb1a0112daac09d320", + "reference": "9fa7e4991eb3f6879e4afdeb1a0112daac09d320", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/http-client": "^6.4|^7.0", + "symfony/notifier": "^6.4|^7.0" + }, + "type": "symfony-notifier-bridge", + "autoload": { + "psr-4": { + "Symfony\\Component\\Notifier\\Bridge\\Ntfy\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mickael Perraud", + "email": "mikaelkael.fr@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Ntyf Notifier Bridge", + "homepage": "https://symfony.com", + "keywords": [ + "Ntfy", + "notifier" + ], + "support": { + "source": "https://github.com/symfony/ntfy-notifier/tree/v7.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T14:57:53+00:00" + }, { "name": "symfony/options-resolver", "version": "v7.1.1", @@ -7525,6 +7660,76 @@ ], "time": "2024-06-26T07:21:35+00:00" }, + { + "name": "symfony/pushover-notifier", + "version": "v7.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/pushover-notifier.git", + "reference": "76072ef5c5230e201f1ae83229b2d1b1a6455ede" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/pushover-notifier/zipball/76072ef5c5230e201f1ae83229b2d1b1a6455ede", + "reference": "76072ef5c5230e201f1ae83229b2d1b1a6455ede", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/http-client": "^6.4|^7.0", + "symfony/notifier": "^6.4|^7.0" + }, + "require-dev": { + "symfony/event-dispatcher": "^6.4|^7.0" + }, + "type": "symfony-notifier-bridge", + "autoload": { + "psr-4": { + "Symfony\\Component\\Notifier\\Bridge\\Pushover\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "mocodo", + "homepage": "https://github.com/mocodo" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Pushover Notifier Bridge", + "homepage": "https://symfony.com", + "keywords": [ + "notifier", + "pushover" + ], + "support": { + "source": "https://github.com/symfony/pushover-notifier/tree/v7.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T14:57:53+00:00" + }, { "name": "symfony/rate-limiter", "version": "v7.1.1", diff --git a/config/packages/notifier.yaml b/config/packages/notifier.yaml index ee4dc19..0a3508b 100644 --- a/config/packages/notifier.yaml +++ b/config/packages/notifier.yaml @@ -10,6 +10,8 @@ framework: googlechat: '%env(GOOGLE_CHAT_DSN)%' discord: '%env(DISCORD_DSN)%' texter_transports: + engagespot: '%env(ENGAGESPOT_DSN)%' + pushover: '%env(PUSHOVER_DSN)%' channel_policy: # use chat/slack, chat/telegram, sms/twilio or sms/nexmo urgent: ['email'] diff --git a/src/Config/WebhookScheme.php b/src/Config/WebhookScheme.php index 16c54a9..6cbd646 100644 --- a/src/Config/WebhookScheme.php +++ b/src/Config/WebhookScheme.php @@ -3,9 +3,12 @@ namespace App\Config; use Symfony\Component\Notifier\Bridge\Discord\DiscordTransportFactory; +use Symfony\Component\Notifier\Bridge\Engagespot\EngagespotTransportFactory; use Symfony\Component\Notifier\Bridge\GoogleChat\GoogleChatTransportFactory; use Symfony\Component\Notifier\Bridge\Mattermost\MattermostTransportFactory; use Symfony\Component\Notifier\Bridge\MicrosoftTeams\MicrosoftTeamsTransportFactory; +use Symfony\Component\Notifier\Bridge\Ntfy\NtfyTransportFactory; +use Symfony\Component\Notifier\Bridge\Pushover\PushoverTransportFactory; use Symfony\Component\Notifier\Bridge\RocketChat\RocketChatTransportFactory; use Symfony\Component\Notifier\Bridge\Slack\SlackTransportFactory; use Symfony\Component\Notifier\Bridge\Telegram\TelegramTransportFactory; @@ -21,6 +24,9 @@ enum WebhookScheme: string case SLACK = 'slack'; case TELEGRAM = 'telegram'; case ZULIP = 'zulip'; + case PUSHOVER = 'pushover'; + case NTFY = 'ntfy'; + case ENGAGESPOT = 'engagespot'; public function getChatTransportFactory(): string { @@ -32,7 +38,10 @@ enum WebhookScheme: string WebhookScheme::ROCKET_CHAT => RocketChatTransportFactory::class, WebhookScheme::SLACK => SlackTransportFactory::class, WebhookScheme::TELEGRAM => TelegramTransportFactory::class, - WebhookScheme::ZULIP => ZulipTransportFactory::class + WebhookScheme::ZULIP => ZulipTransportFactory::class, + WebhookScheme::PUSHOVER => PushoverTransportFactory::class, + WebhookScheme::NTFY => NtfyTransportFactory::class, + WebhookScheme::ENGAGESPOT => EngagespotTransportFactory::class }; } } diff --git a/symfony.lock b/symfony.lock index 83aa0f0..27aefdb 100644 --- a/symfony.lock +++ b/symfony.lock @@ -162,6 +162,15 @@ "ref": "b97655f9a2fb8fc04d9f4081e0b5599d897b7f6e" } }, + "symfony/engagespot-notifier": { + "version": "7.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "6.1", + "ref": "99e2d9bebabbc56ec54bc93278989853ea6c9256" + } + }, "symfony/flex": { "version": "2.4", "recipe": { @@ -289,6 +298,15 @@ "config/packages/notifier.yaml" ] }, + "symfony/ntfy-notifier": { + "version": "7.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "6.4", + "ref": "0d5e496659d7361bb4e6648eb8332f8cf097533d" + } + }, "symfony/phpunit-bridge": { "version": "7.1", "recipe": { @@ -304,6 +322,15 @@ "tests/bootstrap.php" ] }, + "symfony/pushover-notifier": { + "version": "7.1", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "6.3", + "ref": "b9dc3c716eb686c267d767eb3c78ad47c11c34cb" + } + }, "symfony/rocket-chat-notifier": { "version": "7.1", "recipe": {