{"action":"created","issue":{"url":"https://api.github.com/repos/phingofficial/phing-issues-test/issues/9","repository_url":"https://api.github.com/repos/phingofficial/phing-issues-test","labels_url":"https://api.github.com/repos/phingofficial/phing-issues-test/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/phingofficial/phing-issues-test/issues/9/comments","events_url":"https://api.github.com/repos/phingofficial/phing-issues-test/issues/9/events","html_url":"https://github.com/phingofficial/phing-issues-test/issues/9","id":181876836,"number":9,"title":"Using booleans as string values leads to strange results (Trac #633)","user":{"login":"mrook","id":477719,"avatar_url":"https://avatars.githubusercontent.com/u/477719?v=3","gravatar_id":"","url":"https://api.github.com/users/mrook","html_url":"https://github.com/mrook","followers_url":"https://api.github.com/users/mrook/followers","following_url":"https://api.github.com/users/mrook/following{/other_user}","gists_url":"https://api.github.com/users/mrook/gists{/gist_id}","starred_url":"https://api.github.com/users/mrook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrook/subscriptions","organizations_url":"https://api.github.com/users/mrook/orgs","repos_url":"https://api.github.com/users/mrook/repos","events_url":"https://api.github.com/users/mrook/events{/privacy}","received_events_url":"https://api.github.com/users/mrook/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phingofficial/phing-issues-test/labels/defect","name":"defect","color":"FFFFFF"},{"url":"https://api.github.com/repos/phingofficial/phing-issues-test/labels/Migrated%20from%20Trac","name":"Migrated from Trac","color":"FFFFFF"},{"url":"https://api.github.com/repos/phingofficial/phing-issues-test/labels/phing-core","name":"phing-core","color":"FFFFFF"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/phingofficial/phing-issues-test/milestones/1","html_url":"https://github.com/phingofficial/phing-issues-test/milestones/4.0","labels_url":"https://api.github.com/repos/phingofficial/phing-issues-test/milestones/1/labels","id":2057130,"number":1,"title":"4.0","description":null,"creator":{"login":"mrook","id":477719,"avatar_url":"https://avatars.githubusercontent.com/u/477719?v=3","gravatar_id":"","url":"https://api.github.com/users/mrook","html_url":"https://github.com/mrook","followers_url":"https://api.github.com/users/mrook/followers","following_url":"https://api.github.com/users/mrook/following{/other_user}","gists_url":"https://api.github.com/users/mrook/gists{/gist_id}","starred_url":"https://api.github.com/users/mrook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrook/subscriptions","organizations_url":"https://api.github.com/users/mrook/orgs","repos_url":"https://api.github.com/users/mrook/repos","events_url":"https://api.github.com/users/mrook/events{/privacy}","received_events_url":"https://api.github.com/users/mrook/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":0,"state":"open","created_at":"2016-10-09T09:25:15Z","updated_at":"2016-10-09T09:28:47Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2016-10-09T09:25:51Z","updated_at":"2016-10-09T09:31:56Z","closed_at":null,"body":"I'm using a ReplaceRegexp filter to change WordPress' wp-config.php file. In this file a constant WP_DEBUG is defined false and I would to change it to true. I have defined the regex and provided a property with a string \"true\". However this string will be casted to a bool and causes strange sideeffects.  \n\nConsider this build.xml example: \n\n<property name=\"wp_config.wp_debug\" value=\"true\" />\n\n<target name=\"setup-wp-config\" description=\"Copies the wp-config-sample.php to wp-config.php and sets up the parameters for the audition test site\">\n    <copy file=\"./wp-config-sample.php\" tofile=\"./wp-config.php\">\n      <filterchain>\n        <replaceregexp>\n          <regexp pattern=\"(define\\('WP_DEBUG', )\\w+(\\);)\" replace=\"\\1${wp_config.wp_debug}\\2\"/>\n        </replaceregexp>\n      </filterchain>\n    </copy>\n  </target>\n\nIf you would run this it would not work as expected. Changing the property to \"foo\" it does work as expected. This is probably related to this thread: \n\nhttp://phing.tigris.org/ds/viewMessage.do?dsForumId=1083&dsMessageId=958537\n\nUsing the workaround in the thread the example becomes: \n\n<property name=\"wp_config.wp_debug\" value=\"(bool)true\" />\n\n<target name=\"setup-wp-config\" description=\"Copies the wp-config-sample.php to wp-config.php and sets up the parameters for the audition test site\">\n    <copy file=\"./wp-config-sample.php\" tofile=\"./wp-config.php\">\n      <filterchain>\n        <replaceregexp>\n          <regexp pattern=\"(define\\('WP_DEBUG', )\\w+(\\);)\" replace=\"\\1${wp_config.wp_debug}\\2\"/>\n        </replaceregexp>\n      </filterchain>\n    </copy>\n  </target>\n\nThus by adding the type (bool) forces Phing to work correctly with boolean values as strings. Thanks Hans Lellelid for this workaround!\n\n\n\nMigrated from http://localhost:3530/trac/ticket/633\n```json\n{\n    \"status\": \"reopened\", \n    \"changetime\": \"2016-10-07T08:28:55\", \n    \"description\": \"I'm using a ReplaceRegexp filter to change WordPress' wp-config.php file. In this file a constant WP_DEBUG is defined false and I would to change it to true. I have defined the regex and provided a property with a string \\\"true\\\". However this string will be casted to a bool and causes strange sideeffects.  \\n\\nConsider this build.xml example: \\n\\n<property name=\\\"wp_config.wp_debug\\\" value=\\\"true\\\" />\\n\\n<target name=\\\"setup-wp-config\\\" description=\\\"Copies the wp-config-sample.php to wp-config.php and sets up the parameters for the audition test site\\\">\\n    <copy file=\\\"./wp-config-sample.php\\\" tofile=\\\"./wp-config.php\\\">\\n      <filterchain>\\n        <replaceregexp>\\n          <regexp pattern=\\\"(define\\\\('WP_DEBUG', )\\\\w+(\\\\);)\\\" replace=\\\"\\\\1${wp_config.wp_debug}\\\\2\\\"/>\\n        </replaceregexp>\\n      </filterchain>\\n    </copy>\\n  </target>\\n\\nIf you would run this it would not work as expected. Changing the property to \\\"foo\\\" it does work as expected. This is probably related to this thread: \\n\\nhttp://phing.tigris.org/ds/viewMessage.do?dsForumId=1083&dsMessageId=958537\\n\\nUsing the workaround in the thread the example becomes: \\n\\n<property name=\\\"wp_config.wp_debug\\\" value=\\\"(bool)true\\\" />\\n\\n<target name=\\\"setup-wp-config\\\" description=\\\"Copies the wp-config-sample.php to wp-config.php and sets up the parameters for the audition test site\\\">\\n    <copy file=\\\"./wp-config-sample.php\\\" tofile=\\\"./wp-config.php\\\">\\n      <filterchain>\\n        <replaceregexp>\\n          <regexp pattern=\\\"(define\\\\('WP_DEBUG', )\\\\w+(\\\\);)\\\" replace=\\\"\\\\1${wp_config.wp_debug}\\\\2\\\"/>\\n        </replaceregexp>\\n      </filterchain>\\n    </copy>\\n  </target>\\n\\nThus by adding the type (bool) forces Phing to work correctly with boolean values as strings. Thanks Hans Lellelid for this workaround!\\n\\n\", \n    \"reporter\": \"burobjorn@gmail.com\", \n    \"cc\": \"\", \n    \"resolution\": \"\", \n    \"_ts\": \"1475828935569836\", \n    \"component\": \"phing-core\", \n    \"summary\": \"Using booleans as string values leads to strange results\", \n    \"priority\": \"critical\", \n    \"keywords\": \"regex, boolean\", \n    \"version\": \"2.4.4\", \n    \"time\": \"2011-01-20T09:13:15\", \n    \"milestone\": \"4.0\", \n    \"owner\": \"mp\", \n    \"type\": \"defect\"\n}\n```\n"},"comment":{"url":"https://api.github.com/repos/phingofficial/phing-issues-test/issues/comments/252475603","html_url":"https://github.com/phingofficial/phing-issues-test/issues/9#issuecomment-252475603","issue_url":"https://api.github.com/repos/phingofficial/phing-issues-test/issues/9","id":252475603,"user":{"login":"mrook","id":477719,"avatar_url":"https://avatars.githubusercontent.com/u/477719?v=3","gravatar_id":"","url":"https://api.github.com/users/mrook","html_url":"https://github.com/mrook","followers_url":"https://api.github.com/users/mrook/followers","following_url":"https://api.github.com/users/mrook/following{/other_user}","gists_url":"https://api.github.com/users/mrook/gists{/gist_id}","starred_url":"https://api.github.com/users/mrook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrook/subscriptions","organizations_url":"https://api.github.com/users/mrook/orgs","repos_url":"https://api.github.com/users/mrook/repos","events_url":"https://api.github.com/users/mrook/events{/privacy}","received_events_url":"https://api.github.com/users/mrook/received_events","type":"User","site_admin":false},"created_at":"2016-10-09T09:31:56Z","updated_at":"2016-10-09T09:31:56Z","body":"Trac update at 20150104T20:27:47: \n* mrook commented:\n\n> Re-opening to track rebuilding of the 3.0 branch.\n\n\n* mrook changed resolution from \"fixed\" to \"\"\n* mrook changed status from \"closed\" to \"reopened\""}}
{"actor":{"display_login":"mrook"}}