This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Bridge
Fabien Potencier 5a76834aea feature #22273 Add a new Link component (dunglas)
This PR was squashed before being merged into the 3.3-dev branch (closes #22273).

Discussion
----------

Add a new Link component

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  |no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | todo

This a proposal to extract HTTP preloading features introduced in #21478 in their own component.

There are some good reasons to do it:

* HTTP preloading is not (only) about assets: this standalone component could be very useful to replace resources embedding in APIs by HTTP/2 pushes like described in [this article](https://evertpot.com/rest-embedding-hal-http2/) by @evert. In such case, there is no reason to carry the whole asset component for an API.
* There is no dependency nor relation at all between the code of the asset compnent and the one I've added for Preloading features
* It makes the code cleaner (no more optional dependency in the `Asset` Twig extension)

This component would also better fit in HttpFoundation than in Asset. But there is no dependency between it and HttpFoundation and it can easily be used with PSR-7 too, so IMO it better belongs in a standalone component.

Btw, ~~~I plan to add support for prefetching to this component. Except a PR soon.~~~ Prefetching and prerendering support added in this PR.

ping @symfony/deciders

Commits
-------

053de25edf Add a new Link component
2017-04-10 09:55:53 -07:00
..
Doctrine Merge branch '3.2' 2017-04-04 09:47:41 +02:00
Monolog Bump monolog to 1.19 and use the agent regex const from parent, see #22264 2017-04-05 13:03:25 +00:00
PhpUnit add errors as late as possible 2017-03-20 14:28:31 +01:00
ProxyManager Merge branch '3.2' 2017-02-18 18:35:19 +01:00
Twig feature #22273 Add a new Link component (dunglas) 2017-04-10 09:55:53 -07:00