{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/6663","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/6663/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/6663/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/6663/events","html_url":"https://github.com/yiisoft/yii2/pull/6663","id":52944831,"number":6663,"title":"add setParams to init","user":{"login":"zelenin","id":1427885,"avatar_url":"https://avatars.githubusercontent.com/u/1427885?v=3","gravatar_id":"","url":"https://api.github.com/users/zelenin","html_url":"https://github.com/zelenin","followers_url":"https://api.github.com/users/zelenin/followers","following_url":"https://api.github.com/users/zelenin/following{/other_user}","gists_url":"https://api.github.com/users/zelenin/gists{/gist_id}","starred_url":"https://api.github.com/users/zelenin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zelenin/subscriptions","organizations_url":"https://api.github.com/users/zelenin/orgs","repos_url":"https://api.github.com/users/zelenin/repos","events_url":"https://api.github.com/users/zelenin/events{/privacy}","received_events_url":"https://api.github.com/users/zelenin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/yiisoft/yii2/labels/type%3Aenhancement","name":"type:enhancement","color":"d7e102"}],"state":"open","locked":false,"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/9","labels_url":"https://api.github.com/repos/yiisoft/yii2/milestones/9/labels","id":831720,"number":9,"title":"2.0.x","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":244,"closed_issues":1,"state":"open","created_at":"2014-10-19T13:49:45Z","updated_at":"2015-01-20T18:06:52Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2014-12-27T01:11:01Z","updated_at":"2015-01-20T18:14:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/yiisoft/yii2/pulls/6663","html_url":"https://github.com/yiisoft/yii2/pull/6663","diff_url":"https://github.com/yiisoft/yii2/pull/6663.diff","patch_url":"https://github.com/yiisoft/yii2/pull/6663.patch"},"body":"Adds an interactive setting of params during init\r\nPlaceholder formats:\r\n```{{nameOfValue}}``` or ```{{nameOfValue|defaultValue}}```\r\n\r\n```php\r\n<?php\r\nreturn [\r\n    'components' => [\r\n        'db' => [\r\n            'class' => 'yii\\db\\Connection',\r\n            'dsn' => 'mysql:host={{db.host|127.0.0.1}};dbname={{db.name}}',\r\n            'username' => '{{db.username|root}}',\r\n            'password' => '{{db.password}}',\r\n            'charset' => 'utf8',\r\n        ]\r\n    ],\r\n];\r\n```\r\n\r\ninit output:\r\n\r\n```\r\n   set params in common/config/db-local.php\r\n      value of db.tablePrefix ():\r\n      value of db.host (127.0.0.1):\r\n      value of db.name: yii2-app\r\n      value of db.username: root\r\n      value of db.password:\r\n   set params in common/config/bootstrap-local.php\r\n      value of domain (dev.example.com):\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/70703161","html_url":"https://github.com/yiisoft/yii2/pull/6663#issuecomment-70703161","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/6663","id":70703161,"user":{"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},"created_at":"2015-01-20T18:14:25Z","updated_at":"2015-01-20T18:14:25Z","body":"I like the idea to make it a bit more interactive but don't really like templating approach. I think it could be done w/o template either via var_export or by finding-replacing default connection string."}}