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 May 19, 2023
1 parent b446e65 commit 2e05781
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@
"phpstan/phpstan": "^1.9",
"phpunit/phpunit": "^9.5",
"react/async": "4.x-dev",
"symfony/doctrine-messenger": "^6.2",
"symfony/messenger": "^6.2",
"symfony/orm-pack": "^2.3"
"symfony/doctrine-messenger": "^6.3.x-dev",
"symfony/messenger": "^6.3.x-dev",
"symfony/orm-pack": "^2.3",
"symfony/webhook": "^6.3.x-dev"
},
"suggest": {
"amphp/amp": "Provide asynchronous with AMP",
Expand Down Expand Up @@ -59,5 +60,5 @@
"phpstan": "Execute PHPStan analysis",
"test": "Launch PHPUnit test suite"
},
"minimum-stability": "stable"
"minimum-stability": "dev"
}
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 2e05781

Please sign in to comment.