Modify

Ticket #10 (closed defect: invalid)

Opened 6 years ago

Last modified 6 years ago

Mappers broken: missing argument for constructor

Reported by: frank.kleine@… Owned by:
Priority: major Milestone: 2.2.0
Component: Version: 2.2.0RC1
Keywords: Cc:

Description

Using mappers is currently broken and gives an error message: Fatal error: Argument 1 must be an object of class Project in /path/to/phing/2.2.0RC1/classes/phing/types/Mapper.php on line 52

Mapper seems to be instantiated in Project::createDataType() with $type = new $cls(); on line 650. However Mapper::__construct() requires an argument of type Project which is missing here and leads to the error message named above.

Changing the instantiation to $type = new $cls($this); doesn't help as other classes inherited from DataType expect other arguments on their constructor method.

Attachments

Change History

comment:1 Changed 6 years ago by hans

I'm fairly certain that I am using Mapper classes in one or more buildfiles. Can you show a snippet of code where you are using the Mapper? Are you using a Mapper in a Task that supports Mappers?

comment:2 Changed 6 years ago by hans

Sorry, to be more clear, could you paste in the portion of your build.xml where you are referencing the <mapper>?

comment:3 Changed 6 years ago by frank.kleine@…

  • Status changed from new to closed
  • Resolution set to invalid

I have to be sorry I bothered you, sometimes one should take a break and watch again on the code later... it was outside of a task.

comment:4 Changed 6 years ago by hans

No prob -- thanks for followup.

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.