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 3, 2023
1 parent 817a348 commit 137bf01
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"react/async": "^4.1",
"symfony/doctrine-messenger": "^6.3",
"symfony/messenger": "^6.3",
"symfony/orm-pack": "^2.4"
"symfony/orm-pack": "^2.4",
"symfony/webhook": "^6.3"
},
"suggest": {
"amphp/amp": "Provide asynchronous with AMP",
Expand Down
1 change: 1 addition & 0 deletions docs/src/content/en/docs/getting-started/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ toc: true
- Update `tick` that now return a Closure to cleanup tick interval
- Remove `start` and `stop`
- Add Fiber Driver from https://github.com/jolicode/castor/blob/main/src/functions.php
- Add Webhooks from https://speakerdeck.com/fabpot/symfonycon-2022-keynote-webhooks

### 1.1.2

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 137bf01

Please sign in to comment.