Skip to content

Use PSR-13 implementation from WebLink component #12144

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

Merged
merged 1 commit into from
Aug 13, 2019
Merged
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
4 changes: 2 additions & 2 deletions components/web_link.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Usage

The following example shows the component in action::

use Fig\Link\GenericLinkProvider;
use Fig\Link\Link;
use Symfony\Component\WebLink\HttpHeaderSerializer;
use Symfony\Component\WebLink\GenericLinkProvider;
use Symfony\Component\WebLink\Link;

$linkProvider = (new GenericLinkProvider())
->withLink(new Link('preload', '/bootstrap.min.css'));
Expand Down
4 changes: 2 additions & 2 deletions mercure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,10 @@ by using the ``AbstractController::addLink`` helper method::
// src/Controller/DiscoverController.php
namespace App\Controller;

use Fig\Link\Link;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\WebLink\LInk;

class DiscoverController extends AbstractController
{
Expand Down Expand Up @@ -383,12 +383,12 @@ And here is the controller::
// src/Controller/DiscoverController.php
namespace App\Controller;

use Fig\Link\Link;
use Lcobucci\JWT\Builder;
use Lcobucci\JWT\Signer\Hmac\Sha256;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\WebLink\Link;

class DiscoverController extends AbstractController
{
Expand Down
4 changes: 2 additions & 2 deletions web_link.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ You can also add links to the HTTP response directly from controllers and servic
// src/Controller/BlogController.php
namespace App\Controller;

use Fig\Link\GenericLinkProvider;
use Fig\Link\Link;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\WebLink\GenericLinkProvider;
use Symfony\Component\WebLink\Link;

class BlogController extends AbstractController
{
Expand Down