Bug #1257

The dirty monitoring aspect works only for classes actually having a constructor.

Added by Karsten Dambekalns almost 7 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2008-08-11
Priority:Must have Due date:
Assigned To:Karsten Dambekalns % Done:

100%

Category:Persistence
Target version:-
PHP Version: Complexity:
Has patch: Affected Flow version:

Description

When cerating an entity class, the registerNewObject() advice only works if the target class actually has a constructor. This is caused by the use of @afterreturning in conjunction with __construct.

Two possible ways out of this:
  • use introduction if no constructor is present
  • instead of using an advice hook into the component factory - if one uses new to create an object it won't be an AOP proxy anyway and persistence fails in any case

Associated revisions

Revision 0f5c55ab
Added by Karsten Dambekalns almost 7 years ago

FLOW3:
  • Advice on non-existing constructors is now taken into account, fixes #1257
  • AOP only now recognizes __construct() as constructor, no more PHP4-style classname constructors
  • some cleanup to comments and whitespace
TestPackage:
  • "fixed" some pointcut expressions in GetSomeChinesePropertyAspect
  • added AfterNonExistingConstructorAspect for new afterReturningAdviceOnConstructorWorksEvenIfTargetClassHasNoConstructor() test in FLOW3

History

#1 Updated by Karsten Dambekalns almost 7 years ago

  • Status changed from New to Accepted
  • Assigned To set to Karsten Dambekalns
  • Start date set to 2008-08-11

#2 Updated by Karsten Dambekalns almost 7 years ago

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

Applied in changeset r1139.

Also available in: Atom PDF