Skip to content

Commit d8f2a04

Browse files
committed
Merge branch '5.0'
* 5.0: [MercureBundle] Use PublisherInterface
2 parents e986104 + 97b1d20 commit d8f2a04

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mercure.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,12 @@ service, including controllers::
149149
namespace App\Controller;
150150

151151
use Symfony\Component\HttpFoundation\Response;
152-
use Symfony\Component\Mercure\Publisher;
152+
use Symfony\Component\Mercure\PublisherInterface;
153153
use Symfony\Component\Mercure\Update;
154154

155155
class PublishController
156156
{
157-
public function __invoke(Publisher $publisher): Response
157+
public function __invoke(PublisherInterface $publisher): Response
158158
{
159159
$update = new Update(
160160
'http://example.com/books/1',
@@ -286,7 +286,7 @@ by using the ``AbstractController::addLink`` helper method::
286286
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
287287
use Symfony\Component\HttpFoundation\JsonResponse;
288288
use Symfony\Component\HttpFoundation\Request;
289-
use Symfony\Component\WebLink\LInk;
289+
use Symfony\Component\WebLink\Link;
290290

291291
class DiscoverController extends AbstractController
292292
{
@@ -336,12 +336,12 @@ as the third parameter of the ``Update`` constructor::
336336
namespace App\Controller;
337337

338338
use Symfony\Component\HttpFoundation\Response;
339-
use Symfony\Component\Mercure\Publisher;
339+
use Symfony\Component\Mercure\PublisherInterface;
340340
use Symfony\Component\Mercure\Update;
341341

342342
class PublishController
343343
{
344-
public function __invoke(Publisher $publisher): Response
344+
public function __invoke(PublisherInterface $publisher): Response
345345
{
346346
$update = new Update(
347347
'http://example.com/books/1',

0 commit comments

Comments
 (0)