{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/28875","repository_url":"https://api.github.com/repos/symfony/symfony","labels_url":"https://api.github.com/repos/symfony/symfony/issues/28875/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/28875/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/28875/events","html_url":"https://github.com/symfony/symfony/pull/28875","id":370122610,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyODc0OTQx","number":28875,"title":"[FWBundle] Add a new method AbstractController::addLink()","user":{"login":"dunglas","id":57224,"node_id":"MDQ6VXNlcjU3MjI0","avatar_url":"https://avatars2.githubusercontent.com/u/57224?v=4","gravatar_id":"","url":"https://api.github.com/users/dunglas","html_url":"https://github.com/dunglas","followers_url":"https://api.github.com/users/dunglas/followers","following_url":"https://api.github.com/users/dunglas/following{/other_user}","gists_url":"https://api.github.com/users/dunglas/gists{/gist_id}","starred_url":"https://api.github.com/users/dunglas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dunglas/subscriptions","organizations_url":"https://api.github.com/users/dunglas/orgs","repos_url":"https://api.github.com/users/dunglas/repos","events_url":"https://api.github.com/users/dunglas/events{/privacy}","received_events_url":"https://api.github.com/users/dunglas/received_events","type":"User","site_admin":false},"labels":[{"id":100378,"node_id":"MDU6TGFiZWwxMDAzNzg=","url":"https://api.github.com/repos/symfony/symfony/labels/Feature","name":"Feature","color":"02e10c","default":false},{"id":237003792,"node_id":"MDU6TGFiZWwyMzcwMDM3OTI=","url":"https://api.github.com/repos/symfony/symfony/labels/Status:%20Needs%20Review","name":"Status: Needs Review","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-15T11:39:52Z","updated_at":"2018-10-15T11:53:26Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/28875","html_url":"https://github.com/symfony/symfony/pull/28875","diff_url":"https://github.com/symfony/symfony/pull/28875.diff","patch_url":"https://github.com/symfony/symfony/pull/28875.patch"},"body":"| Q             | A\r\n| ------------- | ---\r\n| Branch?       | master\r\n| Bug fix?      |no\r\n| New feature?  | yes <!-- don't forget to update src/**/CHANGELOG.md files -->\r\n| BC breaks?    | no     <!-- see https://symfony.com/bc -->\r\n| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->\r\n| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->\r\n| Fixed tickets | n/a   <!-- #-prefixed issue number(s), if any -->\r\n| License       | MIT\r\n| Doc PR        | todo\r\n\r\nThis provides a convenient method to add `Link` headers to the current `Response` directly from the controller.\r\nIt improves the developer experience and the discoverability of [the WebLink component](https://github.com/symfony/symfony-docs/pull/10309).\r\n\r\nUsage:\r\n\r\n```php\r\nnamespace App\\Controller;\r\n\r\nuse Fig\\Link\\Link;\r\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController;\r\nuse Symfony\\Component\\HttpFoundation\\Request;\r\nuse Symfony\\Component\\HttpFoundation\\Response;\r\n\r\nclass MyAction extends AbstractController\r\n{\r\n    public function __invoke(Request $request): Response\r\n    {\r\n        $this->addLink($request, new Link('mercure', 'https://demo.mercure.rocks'));\r\n\r\n        return $this->json(['foo' => 'bar']);\r\n    }\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/429822301","html_url":"https://github.com/symfony/symfony/pull/28875#issuecomment-429822301","issue_url":"https://api.github.com/repos/symfony/symfony/issues/28875","id":429822301,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTgyMjMwMQ==","user":{"login":"dunglas","id":57224,"node_id":"MDQ6VXNlcjU3MjI0","avatar_url":"https://avatars2.githubusercontent.com/u/57224?v=4","gravatar_id":"","url":"https://api.github.com/users/dunglas","html_url":"https://github.com/dunglas","followers_url":"https://api.github.com/users/dunglas/followers","following_url":"https://api.github.com/users/dunglas/following{/other_user}","gists_url":"https://api.github.com/users/dunglas/gists{/gist_id}","starred_url":"https://api.github.com/users/dunglas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dunglas/subscriptions","organizations_url":"https://api.github.com/users/dunglas/orgs","repos_url":"https://api.github.com/users/dunglas/repos","events_url":"https://api.github.com/users/dunglas/events{/privacy}","received_events_url":"https://api.github.com/users/dunglas/received_events","type":"User","site_admin":false},"created_at":"2018-10-15T11:53:26Z","updated_at":"2018-10-15T11:53:26Z","author_association":"MEMBER","body":"@ro0NL very good idea. Updated accordingly."}}
{"actor":{"display_login":"dunglas"}}