Modify

Ticket #122 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

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

phing-PearPackage2Task.patch Download (691 bytes) - added by benpjohnson@… 5 years ago.

Change History

Changed 5 years ago by benpjohnson@…

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

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.