{"action":"created","comment":{"url":"https://api.github.com/repos/api-platform/docs/pulls/comments/165439671","pull_request_review_id":93373569,"id":165439671,"diff_hunk":"@@ -528,97 +562,119 @@ class Book\n \n namespace AppBundle\\Entity;\n \n-use ApiPlatform\\Core\\Annotation\\ApiResource;\n-use Doctrine\\ORM\\Mapping as ORM;\n use Symfony\\Component\\Validator\\Constraints as Assert;\n \n-/**\n- * A review of a book.\n- *\n- * @ApiResource\n- * @ORM\\Entity\n- */\n+// ...\n class Review\n {\n     /**\n-     * @var int The id of this review.\n-     *\n-     * @ORM\\Id\n-     * @ORM\\GeneratedValue\n-     * @ORM\\Column(type=\"integer\")\n-     */\n-    private $id;\n-\n-    /**\n-     * @var int The rating of this review (between 0 and 5).\n-     *\n-     * @ORM\\Column(type=\"smallint\")\n+     * ...\n      * @Assert\\Range(min=0, max=5)\n      */\n-    private $rating;\n+    public $rating;\n \n     /**\n-     * @var string the body of the review.\n-     *\n-     * @ORM\\Column(type=\"text\")\n+     * ...\n      * @Assert\\NotBlank\n      */\n-    private $body;\n+    public $body;\n \n     /**\n-     * @var string The author of the review.\n-     *\n-     * @ORM\\Column\n+     * ...\n      * @Assert\\NotBlank\n      */\n-    private $author;\n+    public $author;\n \n     /**\n-     * @var \\DateTimeInterface The date of publication of this review.\n-     *\n-     * @ORM\\Column(type=\"datetime\")\n+     * ...\n      * @Assert\\NotBlank\n      */\n-    private $publicationDate;\n+    public $publicationDate;\n \n     /**\n-     * @var Book The book this review is about.\n-     *\n-     * @ORM\\ManyToOne(targetEntity=\"Book\", inversedBy=\"reviews\")\n+     * ...\n      * @Assert\\NotNull\n      */\n-    private $book;\n+    public $book;\n \n     // ...\n }\n ```\n \n-After updating the entities by adding those `@Assert\\*` annotations (as for Doctrine, you can use XML or YAML formats if you\n-prefer), try again the previous `POST` request.\n+After updating the entities by adding those `@Assert\\*` annotations (as for Doctrine, you can also use XML or YAML), try\n+again the previous `POST` request.\n+\n+TODO: add the hydra response instead\n \n     isbn: This value is neither a valid ISBN-10 nor a valid ISBN-13.\n     title: This value should not be blank.\n \n-You now get proper validation error messages, always serialized using the Hydra error format (API Problem is also supported).\n+You now get proper validation error messages, always serialized using the Hydra error format ([RFC 7807](https://tools.ietf.org/html/rfc7807)\n+is also supported).\n Those errors are easy to parse client-side. By adding the proper validation constraints, we also noticed that the provided\n ISBN isn't valid...\n \n-Here we are! We have created a working and powerful hypermedia REST API in a few minutes, and by writing only a few\n-lines of PHP. But we only covered the basics.\n+## Adding GraphQL Support\n+\n+Isn't API Platform a REST **and** GraphQL framework? That's true! GraphQL support isn't enabled by default, to add it we\n+just need an extra library, run the following command to install GraphQL PHP:\n+\n+    $ docker-compose exec php composer req webonyx/graphql-php\n+\n+You now have a GraphQL API! Open `http://localhost:8080/graphql` to play with it using the nice [GraphiQL](https://github.com/graphql/graphiql)\n+UI that is shipped with API Platform:\n+\n+TODO screenshot\n+\n+The GraphQL implementation supports [queries](http://graphql.org/learn/queries/), [mutations](http://graphql.org/learn/queries/),\n+[100% of the Relay server specification](https://facebook.github.io/relay/docs/en/graphql-server-specification.html), pagination,\n+[filters](../core/filters.md) and [access control rules](../core/security.md).\n+You can use it with the popular [RelayJS](https://facebook.github.io/relay/) and [Apollo](https://www.apollographql.com/docs/react/)\n+clients.\n+\n+## The Admin\n+\n+Wouldn't it be nice to have an administration backend to manage the data exposed by our API?\n+Wait... You already have one!\n+\n+Open `http://localhost:81` in your browser:\n+\n+TODO: screenshot\n+\n+This [Material Design](https://material.io/guidelines/) admin is a [Progressive Web App](https://developers.google.com/web/progressive-web-apps/)\n+built with [API Platform Admin](../admin/index.md) (Admin On Rest, React and Redux inside). It very powerful and fully customizable,\n+refer to its documentation to learn more.\n+It leverages the Hydra documentation exposed by the API component to build itself. It's 100% dynamic, **no code generation\n+occurs**.\n+\n+## A React/Redux Progressive Web App\n+\n+API Platform also have an awesome [client generator](../client-generator/index.md) able to scaffold fully working React/Redux\n+and [Vue.js](https://vuejs.org/) Progressive Web Apps that you can easily tune and customize. The generator also supports\n+[React Native](https://facebook.github.io/react-native/) if you prefer to leverage all capabilities of mobile devices.\n+\n+The distribution comes with a skeleton ready to welcome the React flavor of the generated code. To bootstrap your app, run:\n+\n+    $ docker-compose exec client generate-api-platform-client\n+\n+Then open `http://localhost/books` in your browser:\n+\n+TODO: screenshot\n \n-## Going Client-Side\n+You can also choose to generate the code for a specific resource with the `--resource` argument (example:\n+`generate-api-platform-client --resource books`). \n \n-API Platform also provides amazing client-side components.\n-Continue [by creating a fancy Material Design administration interface](../admin/index.md) for your API in seconds.\n-Then, [scaffold a ReactJS / Redux Progressive Web App](../client-generator/index.md).\n+The generated code contains a list (including pagination), a delete button, a creation and an edition form. It also includes\n+[Bootstrap 4](http://getbootstrap.com) markup and [ARIA roles](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA)\n+to make the app usable by people with disabilities.\n \n ## Other Features\n \n They are many more features to learn! Read [the full documentation](../core/index.md) to discover how to use them and how\n to extend API Platform to fit your needs.\n-API Platform is incredibly efficient for prototyping and Rapid Application Development (RAD). But the framework is also\n-designed to create complex web APIs far beyond simple CRUD apps. It benefits from **strong extension points** and is **is\n-continuously optimized for performance.** It powers high-traffic websites.\n+API Platform is incredibly efficient for prototyping and Rapid Application Development (RAD). But the framework is mostly\n+designed to create complex API-driven projects, far beyond simple CRUD apps. It benefits from **strong extension points**\n+and is **is continuously optimized for performance.** It powers numerous high-traffic websites.\n \n API Platform has a builtin HTTP cache invalidation system which allows to make API Platform apps blazing fast, and it uses\n [Varnish](https://varnish-cache.org/) by default. Read more in the chapter","path":"distribution/index.md","position":755,"original_position":755,"commit_id":"8d39d00613f285d2658f8bc92c5e0813c96dfb49","original_commit_id":"8d39d00613f285d2658f8bc92c5e0813c96dfb49","user":{"login":"toofff","id":966550,"avatar_url":"https://avatars0.githubusercontent.com/u/966550?v=4","gravatar_id":"","url":"https://api.github.com/users/toofff","html_url":"https://github.com/toofff","followers_url":"https://api.github.com/users/toofff/followers","following_url":"https://api.github.com/users/toofff/following{/other_user}","gists_url":"https://api.github.com/users/toofff/gists{/gist_id}","starred_url":"https://api.github.com/users/toofff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toofff/subscriptions","organizations_url":"https://api.github.com/users/toofff/orgs","repos_url":"https://api.github.com/users/toofff/repos","events_url":"https://api.github.com/users/toofff/events{/privacy}","received_events_url":"https://api.github.com/users/toofff/received_events","type":"User","site_admin":false},"body":"`[Varnish Cache]`","created_at":"2018-02-01T18:04:34Z","updated_at":"2018-02-01T18:24:34Z","html_url":"https://github.com/api-platform/docs/pull/382#discussion_r165439671","pull_request_url":"https://api.github.com/repos/api-platform/docs/pulls/382","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/api-platform/docs/pulls/comments/165439671"},"html":{"href":"https://github.com/api-platform/docs/pull/382#discussion_r165439671"},"pull_request":{"href":"https://api.github.com/repos/api-platform/docs/pulls/382"}}},"pull_request":{"url":"https://api.github.com/repos/api-platform/docs/pulls/382","id":166598353,"html_url":"https://github.com/api-platform/docs/pull/382","diff_url":"https://github.com/api-platform/docs/pull/382.diff","patch_url":"https://github.com/api-platform/docs/pull/382.patch","issue_url":"https://api.github.com/repos/api-platform/docs/issues/382","number":382,"state":"open","locked":false,"title":" Update the Getting Started Guide for 2.2","user":{"login":"dunglas","id":57224,"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},"body":"💪","created_at":"2018-02-01T17:11:58Z","updated_at":"2018-02-01T18:24:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"be3dc7bacf1915b1d62a1880a8a22c3cde78e5d7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/api-platform/docs/pulls/382/commits","review_comments_url":"https://api.github.com/repos/api-platform/docs/pulls/382/comments","review_comment_url":"https://api.github.com/repos/api-platform/docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/api-platform/docs/issues/382/comments","statuses_url":"https://api.github.com/repos/api-platform/docs/statuses/8d39d00613f285d2658f8bc92c5e0813c96dfb49","head":{"label":"dunglas:update-getting-start","ref":"update-getting-start","sha":"8d39d00613f285d2658f8bc92c5e0813c96dfb49","user":{"login":"dunglas","id":57224,"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},"repo":{"id":53446876,"name":"doc","full_name":"dunglas/doc","owner":{"login":"dunglas","id":57224,"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},"private":false,"html_url":"https://github.com/dunglas/doc","description":"API Platform documentation","fork":true,"url":"https://api.github.com/repos/dunglas/doc","forks_url":"https://api.github.com/repos/dunglas/doc/forks","keys_url":"https://api.github.com/repos/dunglas/doc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dunglas/doc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dunglas/doc/teams","hooks_url":"https://api.github.com/repos/dunglas/doc/hooks","issue_events_url":"https://api.github.com/repos/dunglas/doc/issues/events{/number}","events_url":"https://api.github.com/repos/dunglas/doc/events","assignees_url":"https://api.github.com/repos/dunglas/doc/assignees{/user}","branches_url":"https://api.github.com/repos/dunglas/doc/branches{/branch}","tags_url":"https://api.github.com/repos/dunglas/doc/tags","blobs_url":"https://api.github.com/repos/dunglas/doc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dunglas/doc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dunglas/doc/git/refs{/sha}","trees_url":"https://api.github.com/repos/dunglas/doc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dunglas/doc/statuses/{sha}","languages_url":"https://api.github.com/repos/dunglas/doc/languages","stargazers_url":"https://api.github.com/repos/dunglas/doc/stargazers","contributors_url":"https://api.github.com/repos/dunglas/doc/contributors","subscribers_url":"https://api.github.com/repos/dunglas/doc/subscribers","subscription_url":"https://api.github.com/repos/dunglas/doc/subscription","commits_url":"https://api.github.com/repos/dunglas/doc/commits{/sha}","git_commits_url":"https://api.github.com/repos/dunglas/doc/git/commits{/sha}","comments_url":"https://api.github.com/repos/dunglas/doc/comments{/number}","issue_comment_url":"https://api.github.com/repos/dunglas/doc/issues/comments{/number}","contents_url":"https://api.github.com/repos/dunglas/doc/contents/{+path}","compare_url":"https://api.github.com/repos/dunglas/doc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dunglas/doc/merges","archive_url":"https://api.github.com/repos/dunglas/doc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dunglas/doc/downloads","issues_url":"https://api.github.com/repos/dunglas/doc/issues{/number}","pulls_url":"https://api.github.com/repos/dunglas/doc/pulls{/number}","milestones_url":"https://api.github.com/repos/dunglas/doc/milestones{/number}","notifications_url":"https://api.github.com/repos/dunglas/doc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dunglas/doc/labels{/name}","releases_url":"https://api.github.com/repos/dunglas/doc/releases{/id}","deployments_url":"https://api.github.com/repos/dunglas/doc/deployments","created_at":"2016-03-08T21:35:56Z","updated_at":"2016-09-06T12:26:16Z","pushed_at":"2018-02-01T17:12:58Z","git_url":"git://github.com/dunglas/doc.git","ssh_url":"git@github.com:dunglas/doc.git","clone_url":"https://github.com/dunglas/doc.git","svn_url":"https://github.com/dunglas/doc","homepage":"https://api-platform.com/doc/","size":2235,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":2,"open_issues":0,"watchers":1,"default_branch":"1.0"}},"base":{"label":"api-platform:master","ref":"master","sha":"88fb693188b40e8719ed49ee1df68da0aee0df3a","user":{"login":"api-platform","id":13420081,"avatar_url":"https://avatars3.githubusercontent.com/u/13420081?v=4","gravatar_id":"","url":"https://api.github.com/users/api-platform","html_url":"https://github.com/api-platform","followers_url":"https://api.github.com/users/api-platform/followers","following_url":"https://api.github.com/users/api-platform/following{/other_user}","gists_url":"https://api.github.com/users/api-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/api-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/api-platform/subscriptions","organizations_url":"https://api.github.com/users/api-platform/orgs","repos_url":"https://api.github.com/users/api-platform/repos","events_url":"https://api.github.com/users/api-platform/events{/privacy}","received_events_url":"https://api.github.com/users/api-platform/received_events","type":"Organization","site_admin":false},"repo":{"id":38251565,"name":"docs","full_name":"api-platform/docs","owner":{"login":"api-platform","id":13420081,"avatar_url":"https://avatars3.githubusercontent.com/u/13420081?v=4","gravatar_id":"","url":"https://api.github.com/users/api-platform","html_url":"https://github.com/api-platform","followers_url":"https://api.github.com/users/api-platform/followers","following_url":"https://api.github.com/users/api-platform/following{/other_user}","gists_url":"https://api.github.com/users/api-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/api-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/api-platform/subscriptions","organizations_url":"https://api.github.com/users/api-platform/orgs","repos_url":"https://api.github.com/users/api-platform/repos","events_url":"https://api.github.com/users/api-platform/events{/privacy}","received_events_url":"https://api.github.com/users/api-platform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/api-platform/docs","description":"API Platform documentation","fork":false,"url":"https://api.github.com/repos/api-platform/docs","forks_url":"https://api.github.com/repos/api-platform/docs/forks","keys_url":"https://api.github.com/repos/api-platform/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/api-platform/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/api-platform/docs/teams","hooks_url":"https://api.github.com/repos/api-platform/docs/hooks","issue_events_url":"https://api.github.com/repos/api-platform/docs/issues/events{/number}","events_url":"https://api.github.com/repos/api-platform/docs/events","assignees_url":"https://api.github.com/repos/api-platform/docs/assignees{/user}","branches_url":"https://api.github.com/repos/api-platform/docs/branches{/branch}","tags_url":"https://api.github.com/repos/api-platform/docs/tags","blobs_url":"https://api.github.com/repos/api-platform/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/api-platform/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/api-platform/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/api-platform/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/api-platform/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/api-platform/docs/languages","stargazers_url":"https://api.github.com/repos/api-platform/docs/stargazers","contributors_url":"https://api.github.com/repos/api-platform/docs/contributors","subscribers_url":"https://api.github.com/repos/api-platform/docs/subscribers","subscription_url":"https://api.github.com/repos/api-platform/docs/subscription","commits_url":"https://api.github.com/repos/api-platform/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/api-platform/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/api-platform/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/api-platform/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/api-platform/docs/contents/{+path}","compare_url":"https://api.github.com/repos/api-platform/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/api-platform/docs/merges","archive_url":"https://api.github.com/repos/api-platform/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/api-platform/docs/downloads","issues_url":"https://api.github.com/repos/api-platform/docs/issues{/number}","pulls_url":"https://api.github.com/repos/api-platform/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/api-platform/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/api-platform/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/api-platform/docs/labels{/name}","releases_url":"https://api.github.com/repos/api-platform/docs/releases{/id}","deployments_url":"https://api.github.com/repos/api-platform/docs/deployments","created_at":"2015-06-29T14:19:34Z","updated_at":"2018-01-24T16:54:09Z","pushed_at":"2018-02-01T17:12:59Z","git_url":"git://github.com/api-platform/docs.git","ssh_url":"git@github.com:api-platform/docs.git","clone_url":"https://github.com/api-platform/docs.git","svn_url":"https://github.com/api-platform/docs","homepage":"https://api-platform.com/docs/","size":5653,"stargazers_count":45,"watchers_count":45,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":168,"mirror_url":null,"archived":false,"open_issues_count":26,"license":null,"forks":168,"open_issues":26,"watchers":45,"default_branch":"2.1"}},"_links":{"self":{"href":"https://api.github.com/repos/api-platform/docs/pulls/382"},"html":{"href":"https://github.com/api-platform/docs/pull/382"},"issue":{"href":"https://api.github.com/repos/api-platform/docs/issues/382"},"comments":{"href":"https://api.github.com/repos/api-platform/docs/issues/382/comments"},"review_comments":{"href":"https://api.github.com/repos/api-platform/docs/pulls/382/comments"},"review_comment":{"href":"https://api.github.com/repos/api-platform/docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/api-platform/docs/pulls/382/commits"},"statuses":{"href":"https://api.github.com/repos/api-platform/docs/statuses/8d39d00613f285d2658f8bc92c5e0813c96dfb49"}},"author_association":"OWNER"}}
{"actor":{"display_login":"toofff"}}