-
Notifications
You must be signed in to change notification settings - Fork 144
Rename Comment.comment
#450
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
Comments
|
I'd like to get rid of the Hungarian notation sooner or later (now that we can use native type declarations and PHPDoc annotations). However, how we name the property isn't that important as long as we encapsulate it. So should we name the getter/setter |
|
My concern with renaming properties and methods, particularly if they are PHPUnit renamed some of the assertion methods around version 8 or 9. (IIRC the old names were deprecated in version 8, and removed in version 10.) This prevented us using the latest version when testing with the latest PHP, while we still needed older versions compatible with older PHP versions we still supported (without special-casing the version of PHPUnit and calling the appropriate method for the version, which we did not do). WordPress has occasionally done similar renames, though does generate PHP warnings when deprecated functions and methods are called. In short: such renames generate extra work for users wishing to upgrade, and can also result in dependency and version-compatibility problems that are difficult to resolve. We'd first have to mark the old method/property as deprecated, with its implementation chaining on to the newly named equivalent (for properties, the magic The question I'd ask: Does the overall cost (including that to users) perhaps outweigh the benefit? |
I have moved this to a discussion thread. |
Maybe
Comment.contents
orComment.text
?The text was updated successfully, but these errors were encountered: