As described here it is possible to create custom Type
s.
I've done it, but now I'd like to test the class but unfortunately this is not possible.
Infact, a custom type extends the class Doctrine\DBAL\Types\Type
that seems that cannot be instantiated.
Infact, its constructor is built this way:
/**
* Prevents instantiation and forces use of the factory method.
*/
final private function __construct()
{
}
As told in the comment, it is required the use of the factory method to instantiate the class, but, what this factory method is? Where can I find it?