Update how to add custom Type

Since 2.3, we can't use anymore $this->factory->addType() t add custom Type to factory. We have to use PreloadedExtension class.