Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert deprecation and removal of the Type::getName method #6076

Closed
Tofandel opened this issue Jun 28, 2023 · 2 comments
Closed

Revert deprecation and removal of the Type::getName method #6076

Tofandel opened this issue Jun 28, 2023 · 2 comments

Comments

@Tofandel
Copy link
Contributor

Tofandel commented Jun 28, 2023

Feature Request

Q A
RFC yes

Summary

The Type::getName method was deprecated and removed based on the argument that it serves no purpose
c826c18
8b7c622
8910d85

However I disagree, I'm building a Diff command very much like doctrine:migration:diff that will output a migration using the schema builder rather than direct SQL (That I'm hoping to get into the doctrine/migration package as well), and I need the ability to reverse the Type name from an instanciated class, without it the ability to reverse the Type to it's string counterpart which is required when doing ->addColumn('colname', 'type)` is lost

I'd be in favor of reverting the removal before the stable release of 4.x, or to add the possibility to pass a class name for a type to addColumn so that this feature is still possible

@Tofandel
Copy link
Contributor Author

After a bit of looking around everywhere it seems to still be possible using

\Doctrine\DBAL\Types\Type::getTypeRegistry()->lookupName($column->getType())

@greg0ire greg0ire closed this as not planned Won't fix, can't repro, duplicate, stale Jun 28, 2023
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants