Ticket #122 (closed defect: fixed)
PearPackage2Task Replacements don't seem to work
| Reported by: | Benjamin Johnson | Owned by: | hans |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.3.0 |
| Component: | phing-tasks-ext | Version: | 2.2.0 |
| Keywords: | PearPackage2Task | Cc: |
Description
I tried producing a mapping of the following form to populate the options array with a replacement task for a string in a file:
<mapping name="replacements"> <element key="file path"> <element key="type" value="file type"/> <element key="from" value="to replace"/> <element key="to" value="with this"/> </element> </mapping>
This didn't seem to work for me so I knocked up a quick solution by adding another exception case for replacements in the task itself which simply calls the relevent PEAR method and adds the file path as another child element:
<mapping name="replacements"> <element> <element key="path" value="path"/> <element key="type" value="type"/> <element key="from" value="to replace"/> <element key="to" value="with this"/> </element> </mapping>
If I am being silly here please let me know. Otherwise I have attached a patch file that will add my modification to the PearPackage2Task.
Attachments
Change History
comment:1 Changed 5 years ago by hans
- Status changed from new to closed
- Resolution set to fixed
- Milestone changed from 2.2.1 to 2.3.0
Thank you. This patch has been applied in changeset:210
Please also see Travis' (probably better) PearPkg2 task: http://pear.domain51.com/index.php?package=Phing_d51PearPkg2Task

