Skip to content

Commit 4f4626c

Browse files
committed
[Notifier] [Mattermost] [BC BREAK] Change constructor signature
| Q | A | ------------- | --- | Branch? | 5.x, but BC BREAK for experimental bridge | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | --- | License | MIT | Doc PR | --- Follows #39545
1 parent dabcf51 commit 4f4626c

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

src/Symfony/Component/Notifier/Bridge/Mattermost/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
CHANGELOG
22
=========
33

4+
5.3.0
5+
-----
6+
7+
* [BC BREAK] Changed signature of `MattermostTransport::__construct()` method from:
8+
`public function __construct(string $token, string $channel, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null, string $path = null)`
9+
to:
10+
`public function __construct(string $token, string $channel, ?string $path = null, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null)`
11+
412
5.1.0
513
-----
614

src/Symfony/Component/Notifier/Bridge/Mattermost/MattermostTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ final class MattermostTransport extends AbstractTransport
3131
private $channel;
3232
private $path;
3333

34-
public function __construct(string $token, string $channel, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null, string $path = null)
34+
public function __construct(string $token, string $channel, ?string $path = null, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null)
3535
{
3636
$this->token = $token;
3737
$this->channel = $channel;

src/Symfony/Component/Notifier/Bridge/Mattermost/MattermostTransportFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function create(Dsn $dsn): TransportInterface
4343
$host = $dsn->getHost();
4444
$port = $dsn->getPort();
4545

46-
return (new MattermostTransport($token, $channel, $this->client, $this->dispatcher, $path))->setHost($host)->setPort($port);
46+
return (new MattermostTransport($token, $channel, $path, $this->client, $this->dispatcher))->setHost($host)->setPort($port);
4747
}
4848

4949
protected function getSupportedSchemes(): array

src/Symfony/Component/Notifier/Bridge/Mattermost/Tests/MattermostTransportTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ final class MattermostTransportTest extends TransportTestCase
2929
*/
3030
public function createTransport(?HttpClientInterface $client = null): TransportInterface
3131
{
32-
return (new MattermostTransport('testAccessToken', 'testChannel', $client ?: $this->createMock(HttpClientInterface::class)))->setHost('host.test');
32+
return (new MattermostTransport('testAccessToken', 'testChannel', null, $client ?: $this->createMock(HttpClientInterface::class)))->setHost('host.test');
3333
}
3434

3535
public function toStringProvider(): iterable

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy