Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The responsive_image module uses test class members with underscored names. Some examples are big_user, web_user and admin_user, but there could be others. According to our coding conventions, these should be renamed to bigUser, webUser and adminUser. In addition, some properties are undefined but should be.
See the parent issue #1811638: [meta] Clean-up Test members - ensure property definition and use of camelCase naming convention.
Beta phase evaluation
Issue category | Task, because this is a coding standards change. |
---|---|
Issue priority | Not critical because coding standard changes are not critical. |
Unfrozen changes | Unfrozen because it only changes automated tests. |
Disruption | There is no disruption expected from this sort of change. |
Comment | File | Size | Author |
---|---|---|---|
#7 | clean_up_responsive_image-2396715-7.patch | 716 bytes | hussainweb |
#7 | interdiff-2-7.txt | 667 bytes | hussainweb |
#2 | clean_up_responsive_image-2396715-2.patch | 1.02 KB | hussainweb |
#2 | interdiff-1-2.txt | 1.39 KB | hussainweb |
#1 | clean_up_responsive_image-2396715-1.patch | 2.41 KB | hussainweb |
Comments
Comment #1
hussainwebResponsiveImageFieldDisplayTest::admin_user
actually inherits fromImageFieldTestBase::admin_user
and hence I'm just renaming it. The change for the base class is in #2396687: Clean-up image module test members - ensure property definition and use of camelCase naming convention.Comment #2
hussainwebI modified the patch in #2396687-2: Clean-up image module test members - ensure property definition and use of camelCase naming convention to rename
ResponsiveImageFieldDisplayTest::admin_user
property and hence removed the change here.Comment #3
Mile23Yes, we want the changes to be in the same patch as the changed property declarations.
Patch #2 gets RTBC.
Comment #4
alexpottThis is out-of-scope
Comment #5
hussainwebI am happy to revert that line, but I just want to know if this line causes any problem. I know this is out of scope but the change does not affect any functionality at all. It just makes things slightly easier to read.
I know there are concerns for changes during beta stages, but again, since this is not functional and it slowly moves all the code towards the new array syntax, it might be acceptable. Thoughts, please?
Comment #6
alexpott@hussainweb that line obviously does not cause problems but it is out of scope so why change it? Every additional line of out-of-scope change someone has to review takes time away from reviewing other patches.
Comment #7
hussainwebReverting that line.
@alexpott: The reason I changed it is that it is slightly more readable and looks better (especially among nested parenthesis). I was not sure to create another issue for this change and thought it would be better to make this change in a small way through existing patches. Do you think this should be a subject of another issue?
Comment #8
Mile23Thanks, @hussainweb.
This patch removes an extraneous undefined class member, and also doesn't have out of scope array definitions.
Comment #9
alexpottCommitted cd880e6 and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation to the issue summary.