Skip to content

Replace static Type::* calls with instance-based TypeRegistry lookups#12421

Draft
GromNaN wants to merge 1 commit intodoctrine:3.7.xfrom
GromNaN:type-registry-instance
Draft

Replace static Type::* calls with instance-based TypeRegistry lookups#12421
GromNaN wants to merge 1 commit intodoctrine:3.7.xfrom
GromNaN:type-registry-instance

Conversation

@GromNaN
Copy link
Copy Markdown
Member

@GromNaN GromNaN commented Mar 31, 2026

Related to doctrine/dbal#7342

All internal callers now resolve types through
Configuration::getTypeRegistry() rather than the global static Type::getType() / Type::hasType() / Type::getTypeRegistry() methods.

Remaining static calls are justified fallbacks:

  • Configuration::getTypeRegistry() falls back to Type::getTypeRegistry() for DBAL v3 and 4.0 compatibility (no Configuration::getTypeRegistry() there)
  • LengthFunction and CountFunction: getReturnType() has no EM access, accessing built-in INTEGER type only
  • DatabaseDriver: deprecated class, no EM access available

All internal callers now resolve types through
Configuration::getTypeRegistry() rather than the global static
Type::getType() / Type::hasType() / Type::getTypeRegistry() methods.

Remaining static calls are justified fallbacks:
- Configuration::getTypeRegistry() falls back to Type::getTypeRegistry()
  for DBAL v3 compatibility (no Configuration::getTypeRegistry() there)
- LengthFunction and CountFunction: getReturnType() has no EM access,
  accessing built-in INTEGER type only
- DatabaseDriver: deprecated class, no EM access available
@GromNaN GromNaN changed the title Replace static Type::* calls with instance-based TypeRegistry lookups Replace static Type::* calls with instance-based TypeRegistry lookups Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant