Skip to content

Commit

Permalink
✨ Add webhook support
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Ledru authored and matyo91 committed Sep 7, 2023
1 parent 44d18cd commit 0dd89dd
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Add Flow\Driver\RevoltDriver
- Add more quality tools from https://github.com/IngeniozIT/php-skeleton
- Add Webhooks from https://speakerdeck.com/fabpot/symfonycon-2022-keynote-webhooks

## v1.1.3

Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"symfony/doctrine-messenger": "^6.3",
"symfony/messenger": "^6.3",
"symfony/orm-pack": "^2.4",
"symfony/webhook": "^6.3",
"revolt/event-loop": "^1.0"
},
"suggest": {
Expand Down
27 changes: 27 additions & 0 deletions src/Flow/WebhookFlow.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

declare(strict_types=1);

namespace Flow\Flow;

use Closure;
use Flow\FlowInterface;
use Flow\Ip;
use Symfony\Component\Webhook\Client\RequestParserInterface;

class WebhookFlow extends FlowInterface
{
public function __construct(RequestParserInterface $requestParserInterface)
{
}

public function __invoke(Ip $ip, ?Closure $callback = null): void
{

}

public function fn(FlowInterface $flow): FlowInterface
{
return $this->flow->fn($flow);
}
}

0 comments on commit 0dd89dd

Please sign in to comment.