Issue Bug Closed

#91677Exbase Domain Model __construct not called

This Mächler 06/18/20, 23:56 updated 10/04/22, 13:58

Description

In my domain model class, the constructor is never called. If I write something like this, nothing happens (no php error, $bla->blu() doesn’t exist:

public function __construct( ) {
  $bla->blu();
}

It seems that the domain objects are cloned:

public function __clone( ) {
  $bla->blu();
}

This leads to an error: “Call to a member function blu() on null“
In the documentation, the __constructor is falsely mentioned. Or I get something wrong:

https://docs.typo3.org/m/typo3/book-extbasefluid/master/en-us/5-Domain/2-implementing-the-domain-model.html

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.