Does anyone know how to find and replace text inside a file with Phing?
You can replace text inside files using filters. Filters are used inside other file operation tasks such as copy.
I believe the main idea behind filters is that you can have template files with tokens instead of real values and you then substitute the tokens as a part of the copy process.
Quick example: have a database configuration template file stored in a template directory. Then you copy it to the target configuration file using:
There are plenty of other filters (e.g. regex search and replace) available. See more about filters in the documentation: http://phing.info/docs/guide/stable/chapters/appendixes/AppendixD2-CoreFilters.html