Skip to content

Commit 9a4d2bd

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 270e64d commit 9a4d2bd

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ CHANGELOG
55
-----
66

77
* The bridge is not marked as `@experimental` anymore
8+
* [BC BREAK] Changed signature of `MattermostTransport::__construct()` method from:
9+
`public function __construct(string $token, string $channel, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null, string $path = null)`
10+
to:
11+
`public function __construct(string $token, string $channel, ?string $path = null, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null)`
812

913
5.1.0
1014
-----

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

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

32-
public function __construct(string $token, string $channel, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null, string $path = null)
32+
public function __construct(string $token, string $channel, ?string $path = null, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null)
3333
{
3434
$this->token = $token;
3535
$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
@@ -41,7 +41,7 @@ public function create(Dsn $dsn): TransportInterface
4141
$host = $dsn->getHost();
4242
$port = $dsn->getPort();
4343

44-
return (new MattermostTransport($token, $channel, $this->client, $this->dispatcher, $path))->setHost($host)->setPort($port);
44+
return (new MattermostTransport($token, $channel, $path, $this->client, $this->dispatcher))->setHost($host)->setPort($port);
4545
}
4646

4747
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