Bug #7076

Missing class for a dataType should result in an error

Added by Felix Oertel about 3 years ago. Updated 5 months ago.

Status:Resolved Start date:2010-03-30
Priority:Should have Due date:
Assignee:- % Done:

0%

Category:Extbase: MVC
Target version:-
Has patch:No Tags:
Votes: 0

Description

If you decline a wrong DataType for your variable (let's say you decline it to be Tx_YourExt_Model_Domain_Foo instead of Tx_YourExt_Domain_Model_Foo), transformValue() (Classes/MVC/Controller/Argument.php : 345) will just return it's value instead of throwing an exception that the corresponding class is not found.

This makes it almost impossible to find a typo in your declaration.

I think we should catch the default types (like boolean, string, etc) and throw an exception, if we know that a class is meant by the declaration but it's not found.

bug_extbast_7076.diff (1.5 kB) Felix Oertel, 2010-04-07 01:03


Related issues

related to TYPO3.Flow - Bug #7182: Throw an exception if class for annotated dataType is mis... Resolved 2010-08-18

History

Updated by Felix Oertel about 3 years ago

  • Target version deleted (Extbase 1.1.0)

Did not watch out for the roadmap-dont-assign-version-thing ...

Updated by Jochen Rau about 3 years ago

No Problem. Thanks for reporting!

Jochen

Updated by Jochen Rau about 3 years ago

Hi Felix.

We are currently in sync with FLOW3 here. This behavior was introduced with r3174 and is related to #4631.

This doesn't mean that it is the correct behavior but we should discuss this with the FLOW3 team. Could you please open an issue there and link it to this one?

Jochen

BTW Thanks for adding a unit test!

Updated by Felix Oertel about 3 years ago

Hey,

I filed this under #7182 for FLOW3 and attached a better version of the patch there.

I would take care of porting this back - when it is in FLOW3 - for I have the extbase-version of the patch allready laying around ...

regards, foertel

Updated by Michael McManus over 1 year ago

  • Category set to Extbase: MVC
  • Has patch set to No

Updated by Ingo Pfennigstorf 8 months ago

  • Status changed from New to Needs Feedback

Hi Felix,

as the FLOW3 Issue is resolved, what is the current state in extbase?

Updated by Anja Leichsenring 5 months ago

  • Status changed from Needs Feedback to Resolved

This seems to be resolved, as in extbase/Classes/Mvc/Argument.php -> transformValue (line 488) the parameter type is checked and an reasonable exception is thrown.

Looked up in extbase v6.0

Also available in: Atom PDF