-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Deprecate AbstractPlatform::getName() #4755
Conversation
e9bd8b3
to
cd00ac3
Compare
$this->connection->getDatabasePlatform()->getName() !== 'mssql' | ||
! $platform->supportsInlineColumnComments() && | ||
! $platform->supportsCommentOnStatement() && | ||
! $platform instanceof SQLServer2012Platform |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we (re)-introduce SQLServerPlatform
, PostgreSQLPlatform
before advising people to write instanceof calls? It would be great to have names stable across major DBAL versions, otherwise this is going to be a pain point I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
I believe there's an issue with PostgreSQLPlatform
class here. In 2.13, the name of the class is lowercase, PostgreSqlPlatform
, so BC is not actually maintained between 2.13.x and 3.2.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Class names are case-insensitive in PHP. If this difference in casing creates an actual issue for you, please file a bug report.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to test a bit. PHP did complain about class not existing for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, if you maintain a codebase that should be compatible with DBAL 2 and 3 and you attempt to create instances of that class directly and you operate on a case-sensitive file system, you might need to trigger the autoloader on the old casing to make it work, e.g.:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, that helped, thanks!
a08eb66
to
fe88c7e
Compare
fe88c7e
to
4b174ad
Compare
Closes #4749.