{"action":"created","comment":{"url":"https://api.github.com/repos/phpbb/documentation/pulls/comments/31385651","id":31385651,"diff_hunk":"@@ -0,0 +1,297 @@\n+========\n+Tutorial\n+========\n+\n+Introduction\n+============\n+\n+This tutorial explains the basic functionality of extensions:\n+\n+ * Basics: `Extension folder`_ and `composer.json`_\n+ * `HTML Events`_\n+ * `php Events`_\n+ * Administration Module (ACP)\n+ * Migrations (Database management)\n+ * Controllers (Frontpage)\n+ * Unit tests\n+ * Automatic testing of changes on Travis CI\n+\n+.. seealso::\n+\n+   If you know modifications from phpBB 3.0, you may also have a look at\n+   :doc:`modification_to_extension` which helps you to transform your\n+   modification into an extension step by step.\n+\n+Extension folder\n+================\n+\n+The first thing you need to do, in order to make phpBB aware of your extension,\n+is to create a ``composer.json``. The file needs to be in a subfolder of the\n+``ext/`` folder that is shipped with phpBB.\n+Inside this folder you need to create a folder with your author (vendor) name.\n+Then create the folder of the extension inside the vendor folder.\n+\n+.. note::\n+\n+    Both, the vendor and extension folder names, must start with a lower or\n+    upper case ASCII letter (a to z), followed by ASCII letters and numbers\n+    only!\n+\n+In this tutorial we use ``acme`` as vendor name and ``demo`` as extension name.\n+So the ``composer.json`` should be located at ``ext/acme/demo/composer.json``.\n+\n+composer.json\n+=============\n+\n+The content of the ``composer.json`` is very technical and contains the\n+relevant information about the extension as a json array. The details are\n+explained after the sample, but now let's have a look at the complete file:\n+\n+.. code-block:: json\n+\n+    {\n+        \"name\": \"acme/demo\",\n+        \"type\": \"phpbb-extension\",\n+        \"description\": \"Acme Demo Extension for phpBB 3.1\",\n+        \"homepage\": \"https://github.com/nickvergessen/phpbb-ext-acme-demo\",\n+        \"version\": \"0.1.0\",\n+        \"time\": \"2013-11-05\",\n+        \"license\": \"GPL-2.0\",\n+        \"authors\": [{\n+                \"name\": \"Nickv\",\n+                \"email\": \"nickvergessen@localhost\",\n+                \"homepage\": \"https://github.com/nickvergessen/\",\n+                \"role\": \"Lead Developer\"\n+            }],\n+        \"require\": {\n+            \"php\": \">=5.3.3\"\n+        },\n+        \"require-dev\": {\n+            \"phpbb/epv\": \"dev-master\"\n+        },\n+        \"extra\": {\n+            \"display-name\": \"Acme Demo Extension\",\n+            \"soft-require\": {\n+                \"phpbb/phpbb\": \"~3.1\"\n+            }\n+        }\n+    }\n+\n+.. csv-table::\n+   :header: \"Field\", \"Content\"\n+   :delim: |\n+\n+   ``name`` | \"Must contain the vendor and extension name, matching the folder\n+   structure\"\n+   ``type`` | ``phpbb-extension`` **must not be changed**\n+   ``description`` | \"A short description of your extension, may also be empty\n+   (but not skipped)\"\n+   ``homepage`` | \"Must contain a valid URL. It is recommended to use the link\n+   to the contribution in the customisation database, or to the repository of\n+   your extension (if you are using a public one like GitHub).\"\n+   ``version`` | \"The version of your extension. You may also use ``-a1``\n+   (alpha), ``-b1`` (beta), ``-rc1`` (release candidate) and ``-dev`` suffixes\n+   (although you may not submit them to the customisation database.\"\n+   ``time`` | \"Must contain the release date of this version (date is required,\n+   time is optional)\"\n+   ``license`` | The license must be ``GPL-2.0`` for now\n+   ``authors`` | \"An array with the authors of the extension.\n+   See `authors`_ for more details.\"\n+   ``require`` | \"An array with requirements of the extension.\n+   See `require`_ for more details.\"\n+   ``require-dev`` | \"An array with development requirements of the extension.\n+   See `require-dev`_ for more details.\"\n+   ``extra`` | \"An array with additional values of the extension.\n+   See `extra`_ for more details.\"\n+\n+authors\n+-------\n+\n+You may have unlimited authors. But you should at least have one.\n+\n+.. csv-table::\n+   :header: \"Field\", \"Content\"\n+   :delim: |\n+\n+   ``name`` | Name of the author\n+   ``email`` | Email address of the author\n+   ``homepage`` | Must contain one valid URL or be empty\n+   ``role`` | \"Role can be used to specify what the authors did for the\n+   extension (e.g. Developer, Translator, Supporter, ...)\"\n+\n+require\n+-------\n+\n+In the ``require`` section you can specify technical requirements of your","path":"development/extensions/tutorial.rst","position":125,"original_position":125,"commit_id":"2fd41c8392d3a84d5794ae014449ff557133de59","original_commit_id":"2fd41c8392d3a84d5794ae014449ff557133de59","user":{"login":"VSEphpbb","id":303711,"avatar_url":"https://avatars.githubusercontent.com/u/303711?v=3","gravatar_id":"","url":"https://api.github.com/users/VSEphpbb","html_url":"https://github.com/VSEphpbb","followers_url":"https://api.github.com/users/VSEphpbb/followers","following_url":"https://api.github.com/users/VSEphpbb/following{/other_user}","gists_url":"https://api.github.com/users/VSEphpbb/gists{/gist_id}","starred_url":"https://api.github.com/users/VSEphpbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VSEphpbb/subscriptions","organizations_url":"https://api.github.com/users/VSEphpbb/orgs","repos_url":"https://api.github.com/users/VSEphpbb/repos","events_url":"https://api.github.com/users/VSEphpbb/events{/privacy}","received_events_url":"https://api.github.com/users/VSEphpbb/received_events","type":"User","site_admin":false},"body":"...specify *the* technical...","created_at":"2015-05-31T00:09:22Z","updated_at":"2015-05-31T00:09:22Z","html_url":"https://github.com/phpbb/documentation/pull/31#discussion_r31385651","pull_request_url":"https://api.github.com/repos/phpbb/documentation/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/phpbb/documentation/pulls/comments/31385651"},"html":{"href":"https://github.com/phpbb/documentation/pull/31#discussion_r31385651"},"pull_request":{"href":"https://api.github.com/repos/phpbb/documentation/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/phpbb/documentation/pulls/31","id":36565277,"html_url":"https://github.com/phpbb/documentation/pull/31","diff_url":"https://github.com/phpbb/documentation/pull/31.diff","patch_url":"https://github.com/phpbb/documentation/pull/31.patch","issue_url":"https://api.github.com/repos/phpbb/documentation/issues/31","number":31,"state":"open","locked":false,"title":"Extension tutorial","user":{"login":"nickvergessen","id":213943,"avatar_url":"https://avatars.githubusercontent.com/u/213943?v=3","gravatar_id":"","url":"https://api.github.com/users/nickvergessen","html_url":"https://github.com/nickvergessen","followers_url":"https://api.github.com/users/nickvergessen/followers","following_url":"https://api.github.com/users/nickvergessen/following{/other_user}","gists_url":"https://api.github.com/users/nickvergessen/gists{/gist_id}","starred_url":"https://api.github.com/users/nickvergessen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickvergessen/subscriptions","organizations_url":"https://api.github.com/users/nickvergessen/orgs","repos_url":"https://api.github.com/users/nickvergessen/repos","events_url":"https://api.github.com/users/nickvergessen/events{/privacy}","received_events_url":"https://api.github.com/users/nickvergessen/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-30T13:05:44Z","updated_at":"2015-05-31T00:09:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8d93a791c586f14b124bad2a207ca006afb7b0bc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/phpbb/documentation/pulls/31/commits","review_comments_url":"https://api.github.com/repos/phpbb/documentation/pulls/31/comments","review_comment_url":"https://api.github.com/repos/phpbb/documentation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phpbb/documentation/issues/31/comments","statuses_url":"https://api.github.com/repos/phpbb/documentation/statuses/2fd41c8392d3a84d5794ae014449ff557133de59","head":{"label":"nickv-phpbb:extension-basics","ref":"extension-basics","sha":"2fd41c8392d3a84d5794ae014449ff557133de59","user":{"login":"nickv-phpbb","id":10869423,"avatar_url":"https://avatars.githubusercontent.com/u/10869423?v=3","gravatar_id":"","url":"https://api.github.com/users/nickv-phpbb","html_url":"https://github.com/nickv-phpbb","followers_url":"https://api.github.com/users/nickv-phpbb/followers","following_url":"https://api.github.com/users/nickv-phpbb/following{/other_user}","gists_url":"https://api.github.com/users/nickv-phpbb/gists{/gist_id}","starred_url":"https://api.github.com/users/nickv-phpbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickv-phpbb/subscriptions","organizations_url":"https://api.github.com/users/nickv-phpbb/orgs","repos_url":"https://api.github.com/users/nickv-phpbb/repos","events_url":"https://api.github.com/users/nickv-phpbb/events{/privacy}","received_events_url":"https://api.github.com/users/nickv-phpbb/received_events","type":"Organization","site_admin":false},"repo":{"id":36438077,"name":"documentation","full_name":"nickv-phpbb/documentation","owner":{"login":"nickv-phpbb","id":10869423,"avatar_url":"https://avatars.githubusercontent.com/u/10869423?v=3","gravatar_id":"","url":"https://api.github.com/users/nickv-phpbb","html_url":"https://github.com/nickv-phpbb","followers_url":"https://api.github.com/users/nickv-phpbb/followers","following_url":"https://api.github.com/users/nickv-phpbb/following{/other_user}","gists_url":"https://api.github.com/users/nickv-phpbb/gists{/gist_id}","starred_url":"https://api.github.com/users/nickv-phpbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickv-phpbb/subscriptions","organizations_url":"https://api.github.com/users/nickv-phpbb/orgs","repos_url":"https://api.github.com/users/nickv-phpbb/repos","events_url":"https://api.github.com/users/nickv-phpbb/events{/privacy}","received_events_url":"https://api.github.com/users/nickv-phpbb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nickv-phpbb/documentation","description":"Documentation for end-users: board visitors, moderators and administrators","fork":true,"url":"https://api.github.com/repos/nickv-phpbb/documentation","forks_url":"https://api.github.com/repos/nickv-phpbb/documentation/forks","keys_url":"https://api.github.com/repos/nickv-phpbb/documentation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nickv-phpbb/documentation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nickv-phpbb/documentation/teams","hooks_url":"https://api.github.com/repos/nickv-phpbb/documentation/hooks","issue_events_url":"https://api.github.com/repos/nickv-phpbb/documentation/issues/events{/number}","events_url":"https://api.github.com/repos/nickv-phpbb/documentation/events","assignees_url":"https://api.github.com/repos/nickv-phpbb/documentation/assignees{/user}","branches_url":"https://api.github.com/repos/nickv-phpbb/documentation/branches{/branch}","tags_url":"https://api.github.com/repos/nickv-phpbb/documentation/tags","blobs_url":"https://api.github.com/repos/nickv-phpbb/documentation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nickv-phpbb/documentation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nickv-phpbb/documentation/git/refs{/sha}","trees_url":"https://api.github.com/repos/nickv-phpbb/documentation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nickv-phpbb/documentation/statuses/{sha}","languages_url":"https://api.github.com/repos/nickv-phpbb/documentation/languages","stargazers_url":"https://api.github.com/repos/nickv-phpbb/documentation/stargazers","contributors_url":"https://api.github.com/repos/nickv-phpbb/documentation/contributors","subscribers_url":"https://api.github.com/repos/nickv-phpbb/documentation/subscribers","subscription_url":"https://api.github.com/repos/nickv-phpbb/documentation/subscription","commits_url":"https://api.github.com/repos/nickv-phpbb/documentation/commits{/sha}","git_commits_url":"https://api.github.com/repos/nickv-phpbb/documentation/git/commits{/sha}","comments_url":"https://api.github.com/repos/nickv-phpbb/documentation/comments{/number}","issue_comment_url":"https://api.github.com/repos/nickv-phpbb/documentation/issues/comments{/number}","contents_url":"https://api.github.com/repos/nickv-phpbb/documentation/contents/{+path}","compare_url":"https://api.github.com/repos/nickv-phpbb/documentation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nickv-phpbb/documentation/merges","archive_url":"https://api.github.com/repos/nickv-phpbb/documentation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nickv-phpbb/documentation/downloads","issues_url":"https://api.github.com/repos/nickv-phpbb/documentation/issues{/number}","pulls_url":"https://api.github.com/repos/nickv-phpbb/documentation/pulls{/number}","milestones_url":"https://api.github.com/repos/nickv-phpbb/documentation/milestones{/number}","notifications_url":"https://api.github.com/repos/nickv-phpbb/documentation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nickv-phpbb/documentation/labels{/name}","releases_url":"https://api.github.com/repos/nickv-phpbb/documentation/releases{/id}","created_at":"2015-05-28T12:52:01Z","updated_at":"2015-05-29T08:55:51Z","pushed_at":"2015-05-30T13:05:09Z","git_url":"git://github.com/nickv-phpbb/documentation.git","ssh_url":"git@github.com:nickv-phpbb/documentation.git","clone_url":"https://github.com/nickv-phpbb/documentation.git","svn_url":"https://github.com/nickv-phpbb/documentation","homepage":"http://www.phpbb.com","size":7726,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"phpbb:3.1.x","ref":"3.1.x","sha":"3e5762c1c463de9e31f8f19da5a17f5050028be8","user":{"login":"phpbb","id":176697,"avatar_url":"https://avatars.githubusercontent.com/u/176697?v=3","gravatar_id":"","url":"https://api.github.com/users/phpbb","html_url":"https://github.com/phpbb","followers_url":"https://api.github.com/users/phpbb/followers","following_url":"https://api.github.com/users/phpbb/following{/other_user}","gists_url":"https://api.github.com/users/phpbb/gists{/gist_id}","starred_url":"https://api.github.com/users/phpbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpbb/subscriptions","organizations_url":"https://api.github.com/users/phpbb/orgs","repos_url":"https://api.github.com/users/phpbb/repos","events_url":"https://api.github.com/users/phpbb/events{/privacy}","received_events_url":"https://api.github.com/users/phpbb/received_events","type":"Organization","site_admin":false},"repo":{"id":2660622,"name":"documentation","full_name":"phpbb/documentation","owner":{"login":"phpbb","id":176697,"avatar_url":"https://avatars.githubusercontent.com/u/176697?v=3","gravatar_id":"","url":"https://api.github.com/users/phpbb","html_url":"https://github.com/phpbb","followers_url":"https://api.github.com/users/phpbb/followers","following_url":"https://api.github.com/users/phpbb/following{/other_user}","gists_url":"https://api.github.com/users/phpbb/gists{/gist_id}","starred_url":"https://api.github.com/users/phpbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpbb/subscriptions","organizations_url":"https://api.github.com/users/phpbb/orgs","repos_url":"https://api.github.com/users/phpbb/repos","events_url":"https://api.github.com/users/phpbb/events{/privacy}","received_events_url":"https://api.github.com/users/phpbb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/phpbb/documentation","description":"Documentation for end-users: board visitors, moderators and administrators","fork":false,"url":"https://api.github.com/repos/phpbb/documentation","forks_url":"https://api.github.com/repos/phpbb/documentation/forks","keys_url":"https://api.github.com/repos/phpbb/documentation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phpbb/documentation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phpbb/documentation/teams","hooks_url":"https://api.github.com/repos/phpbb/documentation/hooks","issue_events_url":"https://api.github.com/repos/phpbb/documentation/issues/events{/number}","events_url":"https://api.github.com/repos/phpbb/documentation/events","assignees_url":"https://api.github.com/repos/phpbb/documentation/assignees{/user}","branches_url":"https://api.github.com/repos/phpbb/documentation/branches{/branch}","tags_url":"https://api.github.com/repos/phpbb/documentation/tags","blobs_url":"https://api.github.com/repos/phpbb/documentation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phpbb/documentation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phpbb/documentation/git/refs{/sha}","trees_url":"https://api.github.com/repos/phpbb/documentation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phpbb/documentation/statuses/{sha}","languages_url":"https://api.github.com/repos/phpbb/documentation/languages","stargazers_url":"https://api.github.com/repos/phpbb/documentation/stargazers","contributors_url":"https://api.github.com/repos/phpbb/documentation/contributors","subscribers_url":"https://api.github.com/repos/phpbb/documentation/subscribers","subscription_url":"https://api.github.com/repos/phpbb/documentation/subscription","commits_url":"https://api.github.com/repos/phpbb/documentation/commits{/sha}","git_commits_url":"https://api.github.com/repos/phpbb/documentation/git/commits{/sha}","comments_url":"https://api.github.com/repos/phpbb/documentation/comments{/number}","issue_comment_url":"https://api.github.com/repos/phpbb/documentation/issues/comments{/number}","contents_url":"https://api.github.com/repos/phpbb/documentation/contents/{+path}","compare_url":"https://api.github.com/repos/phpbb/documentation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phpbb/documentation/merges","archive_url":"https://api.github.com/repos/phpbb/documentation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phpbb/documentation/downloads","issues_url":"https://api.github.com/repos/phpbb/documentation/issues{/number}","pulls_url":"https://api.github.com/repos/phpbb/documentation/pulls{/number}","milestones_url":"https://api.github.com/repos/phpbb/documentation/milestones{/number}","notifications_url":"https://api.github.com/repos/phpbb/documentation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phpbb/documentation/labels{/name}","releases_url":"https://api.github.com/repos/phpbb/documentation/releases{/id}","created_at":"2011-10-27T19:22:20Z","updated_at":"2015-05-28T10:33:20Z","pushed_at":"2015-05-30T13:05:44Z","git_url":"git://github.com/phpbb/documentation.git","ssh_url":"git@github.com:phpbb/documentation.git","clone_url":"https://github.com/phpbb/documentation.git","svn_url":"https://github.com/phpbb/documentation","homepage":"http://www.phpbb.com","size":7726,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":36,"mirror_url":null,"open_issues_count":5,"forks":36,"open_issues":5,"watchers":7,"default_branch":"3.1.x"}},"_links":{"self":{"href":"https://api.github.com/repos/phpbb/documentation/pulls/31"},"html":{"href":"https://github.com/phpbb/documentation/pull/31"},"issue":{"href":"https://api.github.com/repos/phpbb/documentation/issues/31"},"comments":{"href":"https://api.github.com/repos/phpbb/documentation/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/phpbb/documentation/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/phpbb/documentation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phpbb/documentation/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/phpbb/documentation/statuses/2fd41c8392d3a84d5794ae014449ff557133de59"}}}}