doctrine / dbal

Doctrine Database Abstraction Layer
https://www.doctrine-project.org/projects/dbal.html
MIT License
9.4k stars 1.33k forks source link

Fix: Skip type comparison if disableTypeComments is true #6423

Closed berkut1 closed 4 weeks ago

berkut1 commented 4 weeks ago
Q A
Type bug
Fixed issues #6422

Summary

In the https://github.com/doctrine/dbal/pull/6150, a check was missed when we were validating the database schema.

greg0ire commented 4 weeks ago

Can you please add a unit test?

berkut1 commented 4 weeks ago

How do I test this? I tried to understand it by looking at the previous pull request https://github.com/doctrine/dbal/pull/6150, but I didn't find any tests there. I guess I need to create a Comparator object with a Platform, but in AbstractComparatorTestCase Class, no object is created in any test except setUp(). Do I really need to create it in my test function and pass disableTypeComments? It seems strange to me considering all the other tests.

Or should I write a test in AbstractPlatformTestCase?

berkut1 commented 4 weeks ago

Do you think such a test would be suitable? After reviewing AbstractPlatformTestCase, it seems like the most appropriate place for it.

berkut1 commented 4 weeks ago

Thanks, I'm fine with those changes.

greg0ire commented 4 weeks ago

Thanks @berkut1 !