{"action":"created","comment":{"url":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments/45580141","id":45580141,"diff_hunk":"@@ -0,0 +1,155 @@\n+.. index::\n+    single: Upgrading; Bundle; Major Version\n+\n+Upgrading a Third-Party Bundle for a Major Symfony Version\n+==========================================================\n+\n+Symfony 3 was released on November 2015. Although this version doesn't contain\n+any new feature, it removes all the backwards compatibility layers included in\n+the previous 2.8 version. If your bundle uses any deprecated feature and it's\n+published as a third-party bundle, applications upgrading to Symfony 3 will no\n+longer be able to use it.\n+\n+Allow to Install Symfony 3 Components\n+-------------------------------------\n+\n+Most third-party bundles define their Symfony dependencies using the ``~2.N`` or\n+``^2.N`` constraints in the ``composer.json`` file. For example:\n+\n+.. code-block:: json\n+\n+    {\n+        \"require\": {\n+            \"symfony/framework-bundle\": \"~2.3\",\n+            \"symfony/finder\": \"~2.3\",\n+            \"symfony/validator\": \"~2.3\"\n+        }\n+    }\n+\n+These constraints prevent the bundle from using Symfony 3 components, so it makes\n+it impossible to install it in a Symfony 3 based application. This issue is very\n+easy to solve thanks to the flexibility of Composer dependencies constraints.\n+Just replace ``~2.N`` by ``~2.N|~3.0`` (or ``^2.N`` by ``^2.N|~3.0``).\n+\n+The above example can be updated to work with Symfony 3 as follows:\n+\n+.. code-block:: json\n+\n+    {\n+        \"require\": {\n+            \"symfony/framework-bundle\": \"~2.3|~3.0\",\n+            \"symfony/finder\": \"~2.3|~3.0\",\n+            \"symfony/validator\": \"~2.3|~3.0\"\n+        }\n+    }\n+\n+Look for Deprecations and Fix Them\n+----------------------------------\n+\n+Besides allowing to install Symfony 3 component, your bundle must stop using\n+any feature deprecated in 2.8 version, because they'll throw exceptions in 3.0\n+version. The easiest way to detect deprecations is to install the `PHPUnit Bridge`_\n+component and then run the test suite.\n+\n+First, install the component as a ``dev`` dependency of your bundle:\n+\n+.. code-block:: bash\n+\n+    $ composer require --dev \"symfony/phpunit-bridge\"\n+\n+Then, run your test suite and look for the deprecation list displayed after the\n+PHPUnit test report:\n+\n+.. code-block:: bash\n+\n+    $ phpunit\n+\n+    // ... PHPUnit output ...\n+\n+    Remaining deprecation notices (3)\n+\n+    The \"pattern\" option in file ... is deprecated since version 2.2 and will be\n+    removed in 3.0. Use the \"path\" option in the route definition instead ...\n+\n+    Twig Function \"form_enctype\" is deprecated. Use \"form_start\" instead in ...\n+\n+    The Symfony\\Component\\Security\\Core\\SecurityContext class is deprecated since\n+    version 2.6 and will be removed in 3.0. Use ...\n+\n+Fix the reported deprecations, run the test suite again and repeat the process\n+until no deprecation usage is reported.\n+\n+Useful Resources\n+~~~~~~~~~~~~~~~~\n+\n+There are several resources that can help you detect, understand and fix the use\n+of deprecated features:\n+\n+* `Official Symfony Guide to Upgrade from 2.x to 3.0`_, the full list of changes\n+  required to upgrade to Symfony 3.0 and grouped by component.\n+* `SensioLabs DeprecationDetector`_, it runs a static code analysis against your\n+  project's source code to find usages of deprecated methods, classes and\n+  interfaces. It works for any PHP application, but it includes special detectors\n+  for Symfony application, where it can also detect usages of deprecated services.\n+* `Symfony Upgrade Fixer`_, it analyzes Symfony projects to find deprecations. In\n+  addition it solves automatically some of them thanks to the growing list of\n+  supported \"fixers\".\n+\n+Test your Bundle in Symfony 3\n+-----------------------------\n+\n+Now that your bundle has removed all deprecations, it's time to test it for real\n+in a Symfony 3 application. Assuming that you already have a Symfony 3 application,\n+you can test the updated bundle locally without having to install it through\n+Composer.\n+\n+If your operating system supports symbolic lings, just point the appropriate\n+vendor directory to your local bundle root directory:\n+\n+.. code-block:: bash\n+\n+    $ ln -s /path/to/your/local/bundle/ vendor/you-vendor-name/your-buncle-name\n+\n+If your operating system doesn't support symbolic links, you'll need to copy\n+your local bundle directory into the appropriate directory inside ``vendor/``.","path":"cookbook/upgrade/bundles.rst","position":114,"original_position":114,"commit_id":"1e2ccd118e94bf50536934b208f33c6084364d72","original_commit_id":"1e2ccd118e94bf50536934b208f33c6084364d72","user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"body":"OK. Please tell me the full Composer configuration needed to get this and the commands to execute. Thanks!","created_at":"2015-11-23T08:35:33Z","updated_at":"2015-11-23T08:35:33Z","html_url":"https://github.com/symfony/symfony-docs/pull/5894#discussion_r45580141","pull_request_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/5894","_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments/45580141"},"html":{"href":"https://github.com/symfony/symfony-docs/pull/5894#discussion_r45580141"},"pull_request":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/5894"}}},"pull_request":{"url":"https://api.github.com/repos/symfony/symfony-docs/pulls/5894","id":50941632,"html_url":"https://github.com/symfony/symfony-docs/pull/5894","diff_url":"https://github.com/symfony/symfony-docs/pull/5894.diff","patch_url":"https://github.com/symfony/symfony-docs/pull/5894.patch","issue_url":"https://api.github.com/repos/symfony/symfony-docs/issues/5894","number":5894,"state":"open","locked":false,"title":"[WIP] Added an article to explain how to upgrade third-party bundles to Symfony 3","user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Doc fix?      | no\r\n| New docs?     | yes\r\n| Applies to    | all\r\n| Fixed tickets | #5879\r\n\r\nI've just drafted the skeleton of the article to have something to discuss about the contents.","created_at":"2015-11-17T12:40:16Z","updated_at":"2015-11-23T08:35:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"51511c8fca3e5dfd4f6901f0748e747078c49777","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/5894/commits","review_comments_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/5894/comments","review_comment_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony/symfony-docs/issues/5894/comments","statuses_url":"https://api.github.com/repos/symfony/symfony-docs/statuses/1e2ccd118e94bf50536934b208f33c6084364d72","head":{"label":"javiereguiluz:fix_5879","ref":"fix_5879","sha":"1e2ccd118e94bf50536934b208f33c6084364d72","user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"repo":{"id":26866700,"name":"symfony-docs","full_name":"javiereguiluz/symfony-docs","owner":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/javiereguiluz/symfony-docs","description":"The Symfony2 documentation","fork":true,"url":"https://api.github.com/repos/javiereguiluz/symfony-docs","forks_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/forks","keys_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/teams","hooks_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/hooks","issue_events_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/issues/events{/number}","events_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/events","assignees_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/assignees{/user}","branches_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/branches{/branch}","tags_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/tags","blobs_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/languages","stargazers_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/stargazers","contributors_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/contributors","subscribers_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/subscribers","subscription_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/subscription","commits_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/contents/{+path}","compare_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/merges","archive_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/downloads","issues_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/issues{/number}","pulls_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/labels{/name}","releases_url":"https://api.github.com/repos/javiereguiluz/symfony-docs/releases{/id}","created_at":"2014-11-19T15:08:31Z","updated_at":"2015-11-02T09:36:52Z","pushed_at":"2015-11-17T16:31:04Z","git_url":"git://github.com/javiereguiluz/symfony-docs.git","ssh_url":"git@github.com:javiereguiluz/symfony-docs.git","clone_url":"https://github.com/javiereguiluz/symfony-docs.git","svn_url":"https://github.com/javiereguiluz/symfony-docs","homepage":"http://symfony.com/doc/current/","size":32128,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":false,"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":"symfony:2.3","ref":"2.3","sha":"ea2503cb627e6573eeab6c879c9cee10f4744eef","user":{"login":"symfony","id":143937,"avatar_url":"https://avatars.githubusercontent.com/u/143937?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"repo":{"id":521583,"name":"symfony-docs","full_name":"symfony/symfony-docs","owner":{"login":"symfony","id":143937,"avatar_url":"https://avatars.githubusercontent.com/u/143937?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/symfony/symfony-docs","description":"The Symfony documentation","fork":false,"url":"https://api.github.com/repos/symfony/symfony-docs","forks_url":"https://api.github.com/repos/symfony/symfony-docs/forks","keys_url":"https://api.github.com/repos/symfony/symfony-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symfony/symfony-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symfony/symfony-docs/teams","hooks_url":"https://api.github.com/repos/symfony/symfony-docs/hooks","issue_events_url":"https://api.github.com/repos/symfony/symfony-docs/issues/events{/number}","events_url":"https://api.github.com/repos/symfony/symfony-docs/events","assignees_url":"https://api.github.com/repos/symfony/symfony-docs/assignees{/user}","branches_url":"https://api.github.com/repos/symfony/symfony-docs/branches{/branch}","tags_url":"https://api.github.com/repos/symfony/symfony-docs/tags","blobs_url":"https://api.github.com/repos/symfony/symfony-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symfony/symfony-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symfony/symfony-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/symfony/symfony-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symfony/symfony-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/symfony/symfony-docs/languages","stargazers_url":"https://api.github.com/repos/symfony/symfony-docs/stargazers","contributors_url":"https://api.github.com/repos/symfony/symfony-docs/contributors","subscribers_url":"https://api.github.com/repos/symfony/symfony-docs/subscribers","subscription_url":"https://api.github.com/repos/symfony/symfony-docs/subscription","commits_url":"https://api.github.com/repos/symfony/symfony-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/symfony/symfony-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/symfony/symfony-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/symfony/symfony-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/symfony/symfony-docs/contents/{+path}","compare_url":"https://api.github.com/repos/symfony/symfony-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symfony/symfony-docs/merges","archive_url":"https://api.github.com/repos/symfony/symfony-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symfony/symfony-docs/downloads","issues_url":"https://api.github.com/repos/symfony/symfony-docs/issues{/number}","pulls_url":"https://api.github.com/repos/symfony/symfony-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/symfony/symfony-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/symfony/symfony-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symfony/symfony-docs/labels{/name}","releases_url":"https://api.github.com/repos/symfony/symfony-docs/releases{/id}","created_at":"2010-02-17T08:43:51Z","updated_at":"2015-11-22T22:01:00Z","pushed_at":"2015-11-23T01:06:18Z","git_url":"git://github.com/symfony/symfony-docs.git","ssh_url":"git@github.com:symfony/symfony-docs.git","clone_url":"https://github.com/symfony/symfony-docs.git","svn_url":"https://github.com/symfony/symfony-docs","homepage":"http://symfony.com/doc","size":41280,"stargazers_count":1044,"watchers_count":1044,"language":"C++","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":2094,"mirror_url":null,"open_issues_count":303,"forks":2094,"open_issues":303,"watchers":1044,"default_branch":"2.8"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/5894"},"html":{"href":"https://github.com/symfony/symfony-docs/pull/5894"},"issue":{"href":"https://api.github.com/repos/symfony/symfony-docs/issues/5894"},"comments":{"href":"https://api.github.com/repos/symfony/symfony-docs/issues/5894/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/5894/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/5894/commits"},"statuses":{"href":"https://api.github.com/repos/symfony/symfony-docs/statuses/1e2ccd118e94bf50536934b208f33c6084364d72"}}}}