Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add webhook support #33

Open
wants to merge 1 commit into
base: 1.x-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Check failure on line 12 in src/Flow/WebhookFlow.php

View workflow job for this annotation

GitHub Actions / Execute PHPStan analysis (8.2)

Class Flow\Flow\WebhookFlow extends interface Flow\FlowInterface.
{
public function __construct(RequestParserInterface $requestParserInterface)

Check failure on line 14 in src/Flow/WebhookFlow.php

View workflow job for this annotation

GitHub Actions / Execute PHPStan analysis (8.2)

Constructor of class Flow\Flow\WebhookFlow has an unused parameter $requestParserInterface.

Check failure on line 14 in src/Flow/WebhookFlow.php

View workflow job for this annotation

GitHub Actions / Execute PHPStan analysis (8.2)

Parameter $requestParserInterface of method Flow\Flow\WebhookFlow::__construct() has invalid type Symfony\Component\Webhook\Client\RequestParserInterface.
{
}

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

}

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

Check failure on line 25 in src/Flow/WebhookFlow.php

View workflow job for this annotation

GitHub Actions / Execute PHPStan analysis (8.2)

Access to an undefined property Flow\Flow\WebhookFlow::$flow.
}
}
Loading