Skip to content

Commit 7096d54

Browse files
committed
Merge branch '3.4' into 4.3
* 3.4: Fix EvolvableLink attribute
2 parents 63922b7 + 7e5f4db commit 7096d54

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

web_link.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ You can also add links to the HTTP response directly from controllers and servic
170170

171171
// alternative if you don't want to use the addLink() shortcut
172172
$linkProvider = $request->attributes->get('_links', new GenericLinkProvider());
173-
$request->attributes->set('_links', $linkProvider->withLink(new Link('preload', '/app.css', ['as' : 'style'])));
173+
$request->attributes->set('_links', $linkProvider->withLink(
174+
(new Link('preload', '/app.css'))->withAttribute('as', 'style')
175+
));
174176

175177
return $this->render('...');
176178
}

0 commit comments

Comments
 (0)