Describe the bug
In the latest version 3.0.0-RC5, replacing tokens with the value 1, results in them being replaced with true instead.
Steps To Reproduce
build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="Test" default="test">
<target name="test">
<copy file="test.reference.json" tofile="test.json" overwrite="true">
<filterchain>
<replacetokens begintoken="%" endtoken="%">
<token key="TEST_TOKEN" value="1"/>
</replacetokens>
</filterchain>
</copy>
</target>
</project>
test.reference.json
{
"test": "%TEST_TOKEN%"
}
Command executed:
/usr/bin/php7.4 ./phing-3.0.0-RC5.phar -f build.xml
Result:
cat test.json
{
"test": "true"
}
Expected behavior
Using a <token> with value="1" should be treated verbatim.
Additional context
This is working fine with Phing 2 or when the value is greater than 1.
Describe the bug
In the latest version 3.0.0-RC5, replacing tokens with the value
1, results in them being replaced withtrueinstead.Steps To Reproduce
build.xmltest.reference.json{ "test": "%TEST_TOKEN%" }Command executed:
Result:
Expected behavior
Using a
<token>withvalue="1"should be treated verbatim.Additional context
This is working fine with Phing 2 or when the value is greater than
1.