Bug #40283
New constructor in grandparent class not called
Status: | New | Start date: | 2012-08-27 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | Object | |||
Target version: | - | |||
PHP Version: | Complexity: | |||
Has patch: | No | Affected Flow version: | Git master |
Description
I have a class hierarchy like this:
SomeClass +-- SubclassA \-+ SubclassB \ SubclassBA
I inserted a new __construct()
method in SomeClass
. It was called without any problem from SubclassA
, but not from SubclassBA
, because the Proxies in Cache/Code/FLOW3_Object_Classes
were not regenerated for SubclassB
.
The call chain for SubclassBA::__construct()
thus ended in SubclassB
, because when the SubclassB
proxy was generated, there was no constructor in SomeClass
, hence no call to parent::__construct()
was inserted into the SubclassB
proxy (because it would have ended in a fatal error).
History
#1 Updated by Karsten Dambekalns almost 3 years ago
- Category set to Object
#2 Updated by Karsten Dambekalns over 2 years ago
- Affected Flow version changed from Git 1.2 (master) to Git master