Ticket #122 (closed defect: fixed)

Opened 2 years ago

Last modified 1 year ago

PearPackage2Task Replacements don't seem to work

Reported by: Benjamin Johnson Assigned to: 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

phing-PearPackage2Task.patch (0.7 kB) - added by benpjohnson@gmail.com on 07/03/07 14:02:17.

Change History

07/03/07 14:02:17 changed by benpjohnson@gmail.com

  • attachment phing-PearPackage2Task.patch added.

08/01/07 22:48:49 changed 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


Add/Change #122 (PearPackage2Task Replacements don't seem to work)




Action