{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/15937","repository_url":"https://api.github.com/repos/yiisoft/yii2","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/15937/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/15937/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/15937/events","html_url":"https://github.com/yiisoft/yii2/issues/15937","id":307138124,"node_id":"MDU6SXNzdWUzMDcxMzgxMjQ=","number":15937,"title":"TryFind functions. Generate exception if elements not found.","user":{"login":"analitic1983","id":10831427,"node_id":"MDQ6VXNlcjEwODMxNDI3","avatar_url":"https://avatars0.githubusercontent.com/u/10831427?v=4","gravatar_id":"","url":"https://api.github.com/users/analitic1983","html_url":"https://github.com/analitic1983","followers_url":"https://api.github.com/users/analitic1983/followers","following_url":"https://api.github.com/users/analitic1983/following{/other_user}","gists_url":"https://api.github.com/users/analitic1983/gists{/gist_id}","starred_url":"https://api.github.com/users/analitic1983/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/analitic1983/subscriptions","organizations_url":"https://api.github.com/users/analitic1983/orgs","repos_url":"https://api.github.com/users/analitic1983/repos","events_url":"https://api.github.com/users/analitic1983/events{/privacy}","received_events_url":"https://api.github.com/users/analitic1983/received_events","type":"User","site_admin":false},"labels":[{"id":33330247,"node_id":"MDU6TGFiZWwzMzMzMDI0Nw==","url":"https://api.github.com/repos/yiisoft/yii2/labels/status:ready%20for%20adoption","name":"status:ready for adoption","color":"02e10c","default":false},{"id":33208865,"node_id":"MDU6TGFiZWwzMzIwODg2NQ==","url":"https://api.github.com/repos/yiisoft/yii2/labels/type:docs","name":"type:docs","color":"207de5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/yiisoft/yii2/milestones/29","html_url":"https://github.com/yiisoft/yii2/milestone/29","labels_url":"https://api.github.com/repos/yiisoft/yii2/milestones/29/labels","id":2999535,"node_id":"MDk6TWlsZXN0b25lMjk5OTUzNQ==","number":29,"title":"3.1.0","description":"","creator":{"login":"samdark","id":47294,"node_id":"MDQ6VXNlcjQ3Mjk0","avatar_url":"https://avatars2.githubusercontent.com/u/47294?v=4","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},"open_issues":129,"closed_issues":0,"state":"open","created_at":"2017-12-27T11:50:11Z","updated_at":"2018-07-04T23:11:51Z","due_on":null,"closed_at":null},"comments":41,"created_at":"2018-03-21T07:06:59Z","updated_at":"2018-07-05T19:52:04Z","closed_at":null,"author_association":"NONE","body":"Create tryFind(), tryFindOne(), tryFindByPk() wrappers. Wich will generate not found exception, if element not found.\r\nIt`s more simple to log errors.\r\nExample from documentation: http://www.yiiframework.com/doc-2.0/guide-db-active-record.html\r\n\r\n```\r\n// \"id\" and \"email\" are the names of columns in the \"customer\" table\r\n$customer = Customer::findOne(123);\r\n$id = $customer->id;\r\n$email = $customer->email;\r\n```\r\n\r\nin bad case will failed on line $customer->id; instead of correct error in logs."},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/402833994","html_url":"https://github.com/yiisoft/yii2/issues/15937#issuecomment-402833994","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/15937","id":402833994,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjgzMzk5NA==","user":{"login":"samdark","id":47294,"node_id":"MDQ6VXNlcjQ3Mjk0","avatar_url":"https://avatars2.githubusercontent.com/u/47294?v=4","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},"created_at":"2018-07-05T19:52:04Z","updated_at":"2018-07-05T19:52:04Z","author_association":"MEMBER","body":"So I think it's better to create a section in the guide or make a mini-book about architectural patterns with Yii and document it there."}}
{"actor":{"display_login":"samdark"}}