Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3d34fdd

Browse files
committed
[HttpClient][Messenger] addPingWebhook andPingWebhookHandler
1 parent5e6ea11 commit3d34fdd

File tree

4 files changed

+60
-0
lines changed

4 files changed

+60
-0
lines changed

‎src/Symfony/Component/HttpClient/CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CHANGELOG
55
---
66

77
* Add`UriTemplateHttpClient` to use URI templates as specified in the RFC 6570
8+
* Add`PingWehook` and`PingWebhookHandler`
89

910
6.2
1011
---
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespaceSymfony\Component\HttpClient\Messenger;
13+
14+
/**
15+
* @author Kevin Bond <kevinbond@gmail.com>
16+
*/
17+
finalclass PingWebhook
18+
{
19+
publicfunction__construct(
20+
publicreadonlystring$method,
21+
publicreadonlystring$url,
22+
publicreadonlyarray$options = [],
23+
) {
24+
}
25+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespaceSymfony\Component\HttpClient\Messenger;
13+
14+
useSymfony\Contracts\HttpClient\HttpClientInterface;
15+
useSymfony\Contracts\HttpClient\ResponseInterface;
16+
17+
/**
18+
* @author Kevin Bond <kevinbond@gmail.com>
19+
*/
20+
finalclass PingWebhookHandler
21+
{
22+
publicfunction__construct(privatereadonlyHttpClientInterface$httpClient)
23+
{
24+
}
25+
26+
publicfunction__invoke(PingWebhook$message):ResponseInterface
27+
{
28+
$response =$this->httpClient->request($message->method,$message->url,$message->options);
29+
$response->getStatusCode();
30+
31+
return$response;
32+
}
33+
}

‎src/Symfony/Component/HttpClient/composer.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"psr/http-client":"^1.0",
4040
"symfony/dependency-injection":"^5.4|^6.0",
4141
"symfony/http-kernel":"^5.4|^6.0",
42+
"symfony/messenger":"^6.3",
4243
"symfony/process":"^5.4|^6.0",
4344
"symfony/stopwatch":"^5.4|^6.0"
4445
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp