{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/9889","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/9889/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/9889/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/9889/events","html_url":"https://github.com/yiisoft/yii2/issues/9889","id":110942334,"number":9889,"title":"Passing models from Url Rule to Controller fails","user":{"login":"stefandoorn","id":4903082,"avatar_url":"https://avatars.githubusercontent.com/u/4903082?v=3","gravatar_id":"","url":"https://api.github.com/users/stefandoorn","html_url":"https://github.com/stefandoorn","followers_url":"https://api.github.com/users/stefandoorn/followers","following_url":"https://api.github.com/users/stefandoorn/following{/other_user}","gists_url":"https://api.github.com/users/stefandoorn/gists{/gist_id}","starred_url":"https://api.github.com/users/stefandoorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefandoorn/subscriptions","organizations_url":"https://api.github.com/users/stefandoorn/orgs","repos_url":"https://api.github.com/users/stefandoorn/repos","events_url":"https://api.github.com/users/stefandoorn/events{/privacy}","received_events_url":"https://api.github.com/users/stefandoorn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/yiisoft/yii2/labels/severity:BC%20breaking","name":"severity:BC breaking","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/yiisoft/yii2/milestones/14","html_url":"https://github.com/yiisoft/yii2/milestones/2.0.7","labels_url":"https://api.github.com/repos/yiisoft/yii2/milestones/14/labels","id":1107394,"number":14,"title":"2.0.7","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":98,"closed_issues":79,"state":"open","created_at":"2015-05-12T19:21:21Z","updated_at":"2015-10-12T09:48:52Z","due_on":null,"closed_at":null},"comments":13,"created_at":"2015-10-12T09:44:22Z","updated_at":"2015-10-12T13:14:21Z","closed_at":null,"body":"In one of our projects we are just using dev-master to load Yii2 (I know, that shouldn't be the case). Anyway, today we experienced the next problem, after running a composer update.\r\n\r\nWe are using URL Rules, while in the URL Rule finding a model and passing it to a frontend controller.\r\n\r\nSo, in the URL rule, within the `parseRequest` function:\r\n\r\n````\r\n$product = Product::findOne(2105816);\r\nreturn array('product/index', ['product' => $product]);\r\n````\r\n\r\nOutputting $product gives ($product->getAttributes()):\r\n\r\n````\r\nArray\r\n(\r\n    [id] => 2105816\r\n    [brand_id] => 1\r\n    [type] => 'Test'\r\n)\r\n````\r\n\r\nIn the ProductController in frontend:\r\n\r\n````\r\npublic function actionIndex(Product $product) {\r\n````\r\n\r\nOutputting $product gives ($product->getAttributes()):\r\n\r\n````\r\nArray\r\n(\r\n    [id] => \r\n    [brand_id] => \r\n    [type] => \r\n)\r\n````\r\n\r\nIt might never have been the proper method of doing this (passing objects), but it clearly introduces a breaking change somewhere. Unfortunately I can't find which change introduced our problem, so I can't pinpoint it :("},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/147395334","html_url":"https://github.com/yiisoft/yii2/issues/9889#issuecomment-147395334","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/9889","id":147395334,"user":{"login":"kidol","id":440902,"avatar_url":"https://avatars.githubusercontent.com/u/440902?v=3","gravatar_id":"","url":"https://api.github.com/users/kidol","html_url":"https://github.com/kidol","followers_url":"https://api.github.com/users/kidol/followers","following_url":"https://api.github.com/users/kidol/following{/other_user}","gists_url":"https://api.github.com/users/kidol/gists{/gist_id}","starred_url":"https://api.github.com/users/kidol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kidol/subscriptions","organizations_url":"https://api.github.com/users/kidol/orgs","repos_url":"https://api.github.com/users/kidol/repos","events_url":"https://api.github.com/users/kidol/events{/privacy}","received_events_url":"https://api.github.com/users/kidol/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T13:14:21Z","updated_at":"2015-10-12T13:14:21Z","body":"OK will make PR."}}