public function newInstanceWithoutConstructor()
    {
        $instance = parent::newInstanceWithoutConstructor();

        if (method_exists($instance, '__wakeup') && is_callable([$instance, '__wakeup'])) {
            $instance->__wakeup();
        }

        return $instance;
    }
public function newInstanceWithoutConstructor()
    {
        $instance = parent::newInstanceWithoutConstructor();

        if (method_exists($instance, '__wakeup') && is_callable([$instance, '__wakeup'])) {
            $instance->__wakeup();
        }

        return $instance;
    }
public function newInstanceWithoutConstructor ( ) { $ instance = parent :: newInstanceWithoutConstructor ( ) ; if ( method_exists ( $ instance , '__wakeup' ) && is_callable ( [ $ instance , '__wakeup' ] ) ) { $ instance -> __wakeup ( ) ; } return $ instance ; }
Creates a new class instance without invoking the constructor.

Overridden to make sure DI works even when instances are created using
newInstanceWithoutConstructor()

@see https://github.com/doctrine/doctrine2/commit/530c01b5e3ed7345cde564bd511794ac72f49b65
@return object
Creates a new class instance without invoking the constructor .