{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/22151","repository_url":"https://api.github.com/repos/symfony/symfony","labels_url":"https://api.github.com/repos/symfony/symfony/issues/22151/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/22151/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/22151/events","html_url":"https://github.com/symfony/symfony/issues/22151","id":216884914,"number":22151,"title":"Environment Variables lack type - break built-in Symfony configuration","user":{"login":"smcjones","id":6015579,"avatar_url":"https://avatars1.githubusercontent.com/u/6015579?v=4","gravatar_id":"","url":"https://api.github.com/users/smcjones","html_url":"https://github.com/smcjones","followers_url":"https://api.github.com/users/smcjones/followers","following_url":"https://api.github.com/users/smcjones/following{/other_user}","gists_url":"https://api.github.com/users/smcjones/gists{/gist_id}","starred_url":"https://api.github.com/users/smcjones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smcjones/subscriptions","organizations_url":"https://api.github.com/users/smcjones/orgs","repos_url":"https://api.github.com/users/smcjones/repos","events_url":"https://api.github.com/users/smcjones/events{/privacy}","received_events_url":"https://api.github.com/users/smcjones/received_events","type":"User","site_admin":false},"labels":[{"id":99863,"url":"https://api.github.com/repos/symfony/symfony/labels/DependencyInjection","name":"DependencyInjection","color":"DDDDDD","default":false},{"id":100378,"url":"https://api.github.com/repos/symfony/symfony/labels/Feature","name":"Feature","color":"02e10c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2017-03-24T19:34:25Z","updated_at":"2017-08-24T08:37:01Z","closed_at":null,"body":"| Q                | A\r\n| ---------------- | -----\r\n| Bug report?      | no\r\n| Feature request? | yes\r\n| BC Break report? | no\r\n| RFC?             | no\r\n| Symfony version  | 3.2\r\n\r\nRelated to #20434, if you try to pull data such as CACHE from an environment variable and pass it to Twig, Twig's Bundle reads the type literally, as \"false\" or \"true\" - as it is passed from `getenv`.\r\n\r\n## How to Replicate\r\nAdd this environment variable:\r\n\r\n    CACHE false\r\n\r\nIn config.yml:\r\n\r\n    twig:\r\n        cache: %env(CACHE)%\r\n\r\nThis results in a cache being created under `web/false/`, which is certainly not the intended result.\r\n\r\nNote that this has other unintended consequences throughout Symfony, where a boolean is expected but not validated.\r\n\r\n## Solutions?\r\nA simple solution could be to use the `env()` library created by Laravel as it provides for type coercion out of the box.\r\n"},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/324571366","html_url":"https://github.com/symfony/symfony/issues/22151#issuecomment-324571366","issue_url":"https://api.github.com/repos/symfony/symfony/issues/22151","id":324571366,"user":{"login":"tunh","id":7379667,"avatar_url":"https://avatars2.githubusercontent.com/u/7379667?v=4","gravatar_id":"","url":"https://api.github.com/users/tunh","html_url":"https://github.com/tunh","followers_url":"https://api.github.com/users/tunh/followers","following_url":"https://api.github.com/users/tunh/following{/other_user}","gists_url":"https://api.github.com/users/tunh/gists{/gist_id}","starred_url":"https://api.github.com/users/tunh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tunh/subscriptions","organizations_url":"https://api.github.com/users/tunh/orgs","repos_url":"https://api.github.com/users/tunh/repos","events_url":"https://api.github.com/users/tunh/events{/privacy}","received_events_url":"https://api.github.com/users/tunh/received_events","type":"User","site_admin":false},"created_at":"2017-08-24T08:37:01Z","updated_at":"2017-08-24T08:37:01Z","body":"Is there anyway to work around environment data type? I want to pass some boolean value."}}
{"actor":{"display_login":"tunh"}}