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 Jul 16, 2023
1 parent a78a000 commit 5e879bc
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 @@ -30,7 +30,8 @@
"react/async": "4.x-dev",
"symfony/doctrine-messenger": "^6.3",
"symfony/messenger": "^6.3",
"symfony/orm-pack": "^2.3"
"symfony/orm-pack": "^2.3",
"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 @@ -17,6 +17,7 @@ toc: true

- Upgrade to Symfony 6.3
- Refactor docs structure
- 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 5e879bc

Please sign in to comment.