Feature #6868

Classes tagged as value object must have a constructor and no setters

Added by Robert Lemke over 5 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2010-03-16
Priority:Should have Due date:
Assigned To:Karsten Dambekalns % Done:

100%

Category:Reflection
Target version:TYPO3 Flow Base Distribution - 1.0 alpha 8 Estimated time:2.00 hours
PHP Version: Complexity:
Has patch:

Description

To enforce the concept of (immutable) value objects, the class scheme builder should assure that classes which are tagged as properties

  • have a constructor method which is used for setting the object's properties
  • don't have any setter methods

If these rules are neglected, the persistence framework will run in trouble because it assumes that all values are set after the constructor has been called.

Associated revisions

Revision d05f6a03
Added by Karsten Dambekalns over 5 years ago

[+FEATURE] FLOW3 (Reflection): When building class schemata the ReflectionService now checks value objects for a constructor and no setters, resolves #6868.
[~TASK] Party: PersonName now has a constructor and no longer any setters.

Revision 3840888d
Added by Karsten Dambekalns over 5 years ago

[+FEATURE] FLOW3 (Reflection): When building class schemata the ReflectionService now checks value objects for a constructor and no setters, resolves #6868.

History

#1 Updated by Karsten Dambekalns over 5 years ago

  • Target version set to 1.0 alpha 8
  • Start date set to 2010-03-16

#2 Updated by Karsten Dambekalns over 5 years ago

  • Category changed from Persistence to Reflection
  • Estimated time changed from 4.00 to 2.00

#3 Updated by Karsten Dambekalns over 5 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r3961.

Also available in: Atom PDF