{"action":"created","comment":{"url":"https://api.github.com/repos/yiisoft/yii2/pulls/comments/64022488","id":64022488,"diff_hunk":"@@ -527,7 +531,17 @@ public function resolveCallableDependencies(callable $callback, $params = [])\n                 } elseif (isset(Yii::$app) && Yii::$app->has($name) && ($obj = Yii::$app->get($name)) instanceof $className) {\n                     $args[] = $obj;\n                 } else {\n-                    $args[] = $this->get($className);\n+                    // If the argument is optional we catch not instantiable exceptions.\n+                    try {\n+                        $args[] = $this->get($className);\n+                    } catch (NotInstantiableException $e) {","path":"framework/di/Container.php","position":26,"original_position":26,"commit_id":"4e0d8168b8ee7759276b4e872202f42025baaaf0","original_commit_id":"b7ff327b8ee0db61552e6c87971f1c696c337406","user":{"login":"cebe","id":189796,"avatar_url":"https://avatars.githubusercontent.com/u/189796?v=3","gravatar_id":"","url":"https://api.github.com/users/cebe","html_url":"https://github.com/cebe","followers_url":"https://api.github.com/users/cebe/followers","following_url":"https://api.github.com/users/cebe/following{/other_user}","gists_url":"https://api.github.com/users/cebe/gists{/gist_id}","starred_url":"https://api.github.com/users/cebe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cebe/subscriptions","organizations_url":"https://api.github.com/users/cebe/orgs","repos_url":"https://api.github.com/users/cebe/repos","events_url":"https://api.github.com/users/cebe/events{/privacy}","received_events_url":"https://api.github.com/users/cebe/received_events","type":"User","site_admin":false},"body":"> 1. Required dependency. --> Exception on misconfiguration.\r\n> 2. Optional dependency. --> Silently pass default value (which is always NULL when we talk about classes / interfaces).\r\n\r\nthis behavior makes sense to me.","created_at":"2016-05-20T10:47:38Z","updated_at":"2016-05-20T10:47:38Z","html_url":"https://github.com/yiisoft/yii2/pull/11562#discussion_r64022488","pull_request_url":"https://api.github.com/repos/yiisoft/yii2/pulls/11562","_links":{"self":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/comments/64022488"},"html":{"href":"https://github.com/yiisoft/yii2/pull/11562#discussion_r64022488"},"pull_request":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/11562"}}},"pull_request":{"url":"https://api.github.com/repos/yiisoft/yii2/pulls/11562","id":69958459,"html_url":"https://github.com/yiisoft/yii2/pull/11562","diff_url":"https://github.com/yiisoft/yii2/pull/11562.diff","patch_url":"https://github.com/yiisoft/yii2/pull/11562.patch","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/11562","number":11562,"state":"open","locked":false,"title":"Fixed issue #11561","user":{"login":"SamMousa","id":547021,"avatar_url":"https://avatars.githubusercontent.com/u/547021?v=3","gravatar_id":"","url":"https://api.github.com/users/SamMousa","html_url":"https://github.com/SamMousa","followers_url":"https://api.github.com/users/SamMousa/followers","following_url":"https://api.github.com/users/SamMousa/following{/other_user}","gists_url":"https://api.github.com/users/SamMousa/gists{/gist_id}","starred_url":"https://api.github.com/users/SamMousa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamMousa/subscriptions","organizations_url":"https://api.github.com/users/SamMousa/orgs","repos_url":"https://api.github.com/users/SamMousa/repos","events_url":"https://api.github.com/users/SamMousa/events{/privacy}","received_events_url":"https://api.github.com/users/SamMousa/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Is bugfix?    | yes\r\n| New feature?  | no\r\n| Breaks BC?    | no\r\n| Tests pass?   | yes\r\n| Fixed issues  | #11561 \r\n\r\n","created_at":"2016-05-13T08:16:23Z","updated_at":"2016-05-20T10:47:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ff0509e3063e215cb2e19b48c732447092aa5202","assignee":{"login":"samdark","id":47294,"avatar_url":"https://avatars.githubusercontent.com/u/47294?v=3","gravatar_id":"","url":"https://api.github.com/users/samdark","html_url":"https://github.com/samdark","followers_url":"https://api.github.com/users/samdark/followers","following_url":"https://api.github.com/users/samdark/following{/other_user}","gists_url":"https://api.github.com/users/samdark/gists{/gist_id}","starred_url":"https://api.github.com/users/samdark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samdark/subscriptions","organizations_url":"https://api.github.com/users/samdark/orgs","repos_url":"https://api.github.com/users/samdark/repos","events_url":"https://api.github.com/users/samdark/events{/privacy}","received_events_url":"https://api.github.com/users/samdark/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/yiisoft/yii2/milestones/17","html_url":"https://github.com/yiisoft/yii2/milestones/2.0.9","labels_url":"https://api.github.com/repos/yiisoft/yii2/milestones/17/labels","id":1580065,"number":17,"title":"2.0.9","description":"","creator":{"login":"cebe","id":189796,"avatar_url":"https://avatars.githubusercontent.com/u/189796?v=3","gravatar_id":"","url":"https://api.github.com/users/cebe","html_url":"https://github.com/cebe","followers_url":"https://api.github.com/users/cebe/followers","following_url":"https://api.github.com/users/cebe/following{/other_user}","gists_url":"https://api.github.com/users/cebe/gists{/gist_id}","starred_url":"https://api.github.com/users/cebe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cebe/subscriptions","organizations_url":"https://api.github.com/users/cebe/orgs","repos_url":"https://api.github.com/users/cebe/repos","events_url":"https://api.github.com/users/cebe/events{/privacy}","received_events_url":"https://api.github.com/users/cebe/received_events","type":"User","site_admin":false},"open_issues":113,"closed_issues":46,"state":"open","created_at":"2016-02-12T16:35:34Z","updated_at":"2016-05-20T10:40:19Z","due_on":"2016-06-25T21:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/yiisoft/yii2/pulls/11562/commits","review_comments_url":"https://api.github.com/repos/yiisoft/yii2/pulls/11562/comments","review_comment_url":"https://api.github.com/repos/yiisoft/yii2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/11562/comments","statuses_url":"https://api.github.com/repos/yiisoft/yii2/statuses/4e0d8168b8ee7759276b4e872202f42025baaaf0","head":{"label":"SamMousa:fix-issue-11561","ref":"fix-issue-11561","sha":"4e0d8168b8ee7759276b4e872202f42025baaaf0","user":{"login":"SamMousa","id":547021,"avatar_url":"https://avatars.githubusercontent.com/u/547021?v=3","gravatar_id":"","url":"https://api.github.com/users/SamMousa","html_url":"https://github.com/SamMousa","followers_url":"https://api.github.com/users/SamMousa/followers","following_url":"https://api.github.com/users/SamMousa/following{/other_user}","gists_url":"https://api.github.com/users/SamMousa/gists{/gist_id}","starred_url":"https://api.github.com/users/SamMousa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamMousa/subscriptions","organizations_url":"https://api.github.com/users/SamMousa/orgs","repos_url":"https://api.github.com/users/SamMousa/repos","events_url":"https://api.github.com/users/SamMousa/events{/privacy}","received_events_url":"https://api.github.com/users/SamMousa/received_events","type":"User","site_admin":false},"repo":{"id":31261382,"name":"yii2","full_name":"SamMousa/yii2","owner":{"login":"SamMousa","id":547021,"avatar_url":"https://avatars.githubusercontent.com/u/547021?v=3","gravatar_id":"","url":"https://api.github.com/users/SamMousa","html_url":"https://github.com/SamMousa","followers_url":"https://api.github.com/users/SamMousa/followers","following_url":"https://api.github.com/users/SamMousa/following{/other_user}","gists_url":"https://api.github.com/users/SamMousa/gists{/gist_id}","starred_url":"https://api.github.com/users/SamMousa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamMousa/subscriptions","organizations_url":"https://api.github.com/users/SamMousa/orgs","repos_url":"https://api.github.com/users/SamMousa/repos","events_url":"https://api.github.com/users/SamMousa/events{/privacy}","received_events_url":"https://api.github.com/users/SamMousa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SamMousa/yii2","description":"Yii 2 framework main development repo","fork":true,"url":"https://api.github.com/repos/SamMousa/yii2","forks_url":"https://api.github.com/repos/SamMousa/yii2/forks","keys_url":"https://api.github.com/repos/SamMousa/yii2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SamMousa/yii2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SamMousa/yii2/teams","hooks_url":"https://api.github.com/repos/SamMousa/yii2/hooks","issue_events_url":"https://api.github.com/repos/SamMousa/yii2/issues/events{/number}","events_url":"https://api.github.com/repos/SamMousa/yii2/events","assignees_url":"https://api.github.com/repos/SamMousa/yii2/assignees{/user}","branches_url":"https://api.github.com/repos/SamMousa/yii2/branches{/branch}","tags_url":"https://api.github.com/repos/SamMousa/yii2/tags","blobs_url":"https://api.github.com/repos/SamMousa/yii2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SamMousa/yii2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SamMousa/yii2/git/refs{/sha}","trees_url":"https://api.github.com/repos/SamMousa/yii2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SamMousa/yii2/statuses/{sha}","languages_url":"https://api.github.com/repos/SamMousa/yii2/languages","stargazers_url":"https://api.github.com/repos/SamMousa/yii2/stargazers","contributors_url":"https://api.github.com/repos/SamMousa/yii2/contributors","subscribers_url":"https://api.github.com/repos/SamMousa/yii2/subscribers","subscription_url":"https://api.github.com/repos/SamMousa/yii2/subscription","commits_url":"https://api.github.com/repos/SamMousa/yii2/commits{/sha}","git_commits_url":"https://api.github.com/repos/SamMousa/yii2/git/commits{/sha}","comments_url":"https://api.github.com/repos/SamMousa/yii2/comments{/number}","issue_comment_url":"https://api.github.com/repos/SamMousa/yii2/issues/comments{/number}","contents_url":"https://api.github.com/repos/SamMousa/yii2/contents/{+path}","compare_url":"https://api.github.com/repos/SamMousa/yii2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SamMousa/yii2/merges","archive_url":"https://api.github.com/repos/SamMousa/yii2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SamMousa/yii2/downloads","issues_url":"https://api.github.com/repos/SamMousa/yii2/issues{/number}","pulls_url":"https://api.github.com/repos/SamMousa/yii2/pulls{/number}","milestones_url":"https://api.github.com/repos/SamMousa/yii2/milestones{/number}","notifications_url":"https://api.github.com/repos/SamMousa/yii2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SamMousa/yii2/labels{/name}","releases_url":"https://api.github.com/repos/SamMousa/yii2/releases{/id}","deployments_url":"https://api.github.com/repos/SamMousa/yii2/deployments","created_at":"2015-02-24T13:32:17Z","updated_at":"2016-02-03T12:45:17Z","pushed_at":"2016-05-18T12:45:58Z","git_url":"git://github.com/SamMousa/yii2.git","ssh_url":"git@github.com:SamMousa/yii2.git","clone_url":"https://github.com/SamMousa/yii2.git","svn_url":"https://github.com/SamMousa/yii2","homepage":"http://www.yiiframework.com","size":35857,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"yiisoft:master","ref":"master","sha":"bc63b7607fce5d1282067d0d722c726280acb57a","user":{"login":"yiisoft","id":993323,"avatar_url":"https://avatars.githubusercontent.com/u/993323?v=3","gravatar_id":"","url":"https://api.github.com/users/yiisoft","html_url":"https://github.com/yiisoft","followers_url":"https://api.github.com/users/yiisoft/followers","following_url":"https://api.github.com/users/yiisoft/following{/other_user}","gists_url":"https://api.github.com/users/yiisoft/gists{/gist_id}","starred_url":"https://api.github.com/users/yiisoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yiisoft/subscriptions","organizations_url":"https://api.github.com/users/yiisoft/orgs","repos_url":"https://api.github.com/users/yiisoft/repos","events_url":"https://api.github.com/users/yiisoft/events{/privacy}","received_events_url":"https://api.github.com/users/yiisoft/received_events","type":"Organization","site_admin":false},"repo":{"id":3431193,"name":"yii2","full_name":"yiisoft/yii2","owner":{"login":"yiisoft","id":993323,"avatar_url":"https://avatars.githubusercontent.com/u/993323?v=3","gravatar_id":"","url":"https://api.github.com/users/yiisoft","html_url":"https://github.com/yiisoft","followers_url":"https://api.github.com/users/yiisoft/followers","following_url":"https://api.github.com/users/yiisoft/following{/other_user}","gists_url":"https://api.github.com/users/yiisoft/gists{/gist_id}","starred_url":"https://api.github.com/users/yiisoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yiisoft/subscriptions","organizations_url":"https://api.github.com/users/yiisoft/orgs","repos_url":"https://api.github.com/users/yiisoft/repos","events_url":"https://api.github.com/users/yiisoft/events{/privacy}","received_events_url":"https://api.github.com/users/yiisoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yiisoft/yii2","description":"Yii 2 framework main development repo","fork":false,"url":"https://api.github.com/repos/yiisoft/yii2","forks_url":"https://api.github.com/repos/yiisoft/yii2/forks","keys_url":"https://api.github.com/repos/yiisoft/yii2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yiisoft/yii2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yiisoft/yii2/teams","hooks_url":"https://api.github.com/repos/yiisoft/yii2/hooks","issue_events_url":"https://api.github.com/repos/yiisoft/yii2/issues/events{/number}","events_url":"https://api.github.com/repos/yiisoft/yii2/events","assignees_url":"https://api.github.com/repos/yiisoft/yii2/assignees{/user}","branches_url":"https://api.github.com/repos/yiisoft/yii2/branches{/branch}","tags_url":"https://api.github.com/repos/yiisoft/yii2/tags","blobs_url":"https://api.github.com/repos/yiisoft/yii2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yiisoft/yii2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yiisoft/yii2/git/refs{/sha}","trees_url":"https://api.github.com/repos/yiisoft/yii2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yiisoft/yii2/statuses/{sha}","languages_url":"https://api.github.com/repos/yiisoft/yii2/languages","stargazers_url":"https://api.github.com/repos/yiisoft/yii2/stargazers","contributors_url":"https://api.github.com/repos/yiisoft/yii2/contributors","subscribers_url":"https://api.github.com/repos/yiisoft/yii2/subscribers","subscription_url":"https://api.github.com/repos/yiisoft/yii2/subscription","commits_url":"https://api.github.com/repos/yiisoft/yii2/commits{/sha}","git_commits_url":"https://api.github.com/repos/yiisoft/yii2/git/commits{/sha}","comments_url":"https://api.github.com/repos/yiisoft/yii2/comments{/number}","issue_comment_url":"https://api.github.com/repos/yiisoft/yii2/issues/comments{/number}","contents_url":"https://api.github.com/repos/yiisoft/yii2/contents/{+path}","compare_url":"https://api.github.com/repos/yiisoft/yii2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yiisoft/yii2/merges","archive_url":"https://api.github.com/repos/yiisoft/yii2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yiisoft/yii2/downloads","issues_url":"https://api.github.com/repos/yiisoft/yii2/issues{/number}","pulls_url":"https://api.github.com/repos/yiisoft/yii2/pulls{/number}","milestones_url":"https://api.github.com/repos/yiisoft/yii2/milestones{/number}","notifications_url":"https://api.github.com/repos/yiisoft/yii2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yiisoft/yii2/labels{/name}","releases_url":"https://api.github.com/repos/yiisoft/yii2/releases{/id}","deployments_url":"https://api.github.com/repos/yiisoft/yii2/deployments","created_at":"2012-02-13T15:32:36Z","updated_at":"2016-05-20T09:43:35Z","pushed_at":"2016-05-20T10:40:19Z","git_url":"git://github.com/yiisoft/yii2.git","ssh_url":"git@github.com:yiisoft/yii2.git","clone_url":"https://github.com/yiisoft/yii2.git","svn_url":"https://github.com/yiisoft/yii2","homepage":"http://www.yiiframework.com","size":55741,"stargazers_count":8099,"watchers_count":8099,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4730,"mirror_url":null,"open_issues_count":1009,"forks":4730,"open_issues":1009,"watchers":8099,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/11562"},"html":{"href":"https://github.com/yiisoft/yii2/pull/11562"},"issue":{"href":"https://api.github.com/repos/yiisoft/yii2/issues/11562"},"comments":{"href":"https://api.github.com/repos/yiisoft/yii2/issues/11562/comments"},"review_comments":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/11562/comments"},"review_comment":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/11562/commits"},"statuses":{"href":"https://api.github.com/repos/yiisoft/yii2/statuses/4e0d8168b8ee7759276b4e872202f42025baaaf0"}}}}
{"actor":{"display_login":"cebe"}}