Skip to content

Extract the static methods of the Type class into a TypeRegistry service #2818

@GromNaN

Description

@GromNaN

Feature Request

Q A
New Feature yes
RFC yes
BC Break yes

Summary

In order to have distinct types per DocumentManager instance, the static methods of the Type class must move to a TypeRegistry service class. This design is inspired by the Doctrine\DBAL\Types\TypeRegistry class.

  • Introduce the TypeRegistry
  • Inject the TypeRegistry instance everywhere the static method of the Type class are used
  • Make the constructor of Type public and non-final to allow injecting dependencies or configuration into the type instances

A similar change has been discussed in doctrine/dbal#6705 (review)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions