{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/2484","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/2484/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/2484/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/2484/events","html_url":"https://github.com/yiisoft/yii2/issues/2484","id":27847652,"number":2484,"title":"Common AR behaviors idea (just for reference)","user":{"login":"lucianobaraglia","id":374554,"avatar_url":"https://avatars.githubusercontent.com/u/374554?v=3","gravatar_id":"","url":"https://api.github.com/users/lucianobaraglia","html_url":"https://github.com/lucianobaraglia","followers_url":"https://api.github.com/users/lucianobaraglia/followers","following_url":"https://api.github.com/users/lucianobaraglia/following{/other_user}","gists_url":"https://api.github.com/users/lucianobaraglia/gists{/gist_id}","starred_url":"https://api.github.com/users/lucianobaraglia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucianobaraglia/subscriptions","organizations_url":"https://api.github.com/users/lucianobaraglia/orgs","repos_url":"https://api.github.com/users/lucianobaraglia/repos","events_url":"https://api.github.com/users/lucianobaraglia/events{/privacy}","received_events_url":"https://api.github.com/users/lucianobaraglia/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/yiisoft/yii2/labels/type:feature","name":"type:feature","color":"02d7e1"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/yiisoft/yii2/milestones/6","html_url":"https://github.com/yiisoft/yii2/milestones/2.1.x","labels_url":"https://api.github.com/repos/yiisoft/yii2/milestones/6/labels","id":458001,"number":6,"title":"2.1.x","description":"","creator":{"login":"qiangxue","id":993322,"avatar_url":"https://avatars.githubusercontent.com/u/993322?v=3","gravatar_id":"","url":"https://api.github.com/users/qiangxue","html_url":"https://github.com/qiangxue","followers_url":"https://api.github.com/users/qiangxue/followers","following_url":"https://api.github.com/users/qiangxue/following{/other_user}","gists_url":"https://api.github.com/users/qiangxue/gists{/gist_id}","starred_url":"https://api.github.com/users/qiangxue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qiangxue/subscriptions","organizations_url":"https://api.github.com/users/qiangxue/orgs","repos_url":"https://api.github.com/users/qiangxue/repos","events_url":"https://api.github.com/users/qiangxue/events{/privacy}","received_events_url":"https://api.github.com/users/qiangxue/received_events","type":"User","site_admin":false},"open_issues":88,"closed_issues":0,"state":"open","created_at":"2013-10-17T21:06:09Z","updated_at":"2015-02-16T08:24:30Z","due_on":null,"closed_at":null},"comments":66,"created_at":"2014-02-19T03:01:09Z","updated_at":"2015-02-24T23:11:13Z","closed_at":null,"body":"Based on discussion in https://github.com/yiisoft/yii2/pull/2360, some ideas to behaviors to implement.\r\n\r\n- [x] `AttributeStampBehavior`\r\n- [x] `TimestampBehavior`\r\n- [x] `BlameableBehavior`\r\n- [ ] `VersionableBehaior`\r\n- [ ] `SoftDeleteBehavior`\r\n- [ ] `TranslatableBehavior`\r\n- [x] `SluggableBehavior`\r\n"},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/75869070","html_url":"https://github.com/yiisoft/yii2/issues/2484#issuecomment-75869070","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/2484","id":75869070,"user":{"login":"sensa-ua","id":7613603,"avatar_url":"https://avatars.githubusercontent.com/u/7613603?v=3","gravatar_id":"","url":"https://api.github.com/users/sensa-ua","html_url":"https://github.com/sensa-ua","followers_url":"https://api.github.com/users/sensa-ua/followers","following_url":"https://api.github.com/users/sensa-ua/following{/other_user}","gists_url":"https://api.github.com/users/sensa-ua/gists{/gist_id}","starred_url":"https://api.github.com/users/sensa-ua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sensa-ua/subscriptions","organizations_url":"https://api.github.com/users/sensa-ua/orgs","repos_url":"https://api.github.com/users/sensa-ua/repos","events_url":"https://api.github.com/users/sensa-ua/events{/privacy}","received_events_url":"https://api.github.com/users/sensa-ua/received_events","type":"User","site_admin":false},"created_at":"2015-02-24T23:11:13Z","updated_at":"2015-02-24T23:11:13Z","body":"@fernandezekiel There are couple points against this behavior in the current shape:\r\n1) Deletion isn't recoverable process, but soft-deletion does - part of functionality related to restoration is remains out of scope with this solution.\r\n2) It makes such mess in the normal event flow, I believe It can lead to many complicated side effects\r\n\r\nInstead, I propose to wrap full-functional implementation into behavior, this easy to use and it's transparrent for existing functionality.\r\n\r\nAnd yes, it's easy to broadcat events.\r\n\r\nI've put some draft version here:\r\nhttps://github.com/sensa-ua/yii2-softdelete"}}