Problem/Motivation

By convention, forms defined by a module should live in the Drupal\[modulename]\Form namespace. CacheExampleForm currently lives in the Drupal\[modulename]\Forms-namespace.

Proposed resolution

Move CacheExampleForm to the correct namespace.

Remaining tasks

Provide patch
Review patch

User interface changes

None.

API changes

Namespace-change.

Data model changes

None

Comments

mr.baileys created an issue. See original summary.

chalk’s picture

Assigned: Unassigned » chalk

I will try to fix it.

chalk’s picture

The patch is here. I tested manually and launched a CacheExampleTestCase - seems, it works.
Please, review and let me know if something should be changed.

chalk’s picture

Status: Active » Needs review
joshi.rohit100’s picture

Status: Needs review » Needs work

It looks like you are just moving forms to different directory. So give a '-M' try in git diff. It will make the patch smaller and readable.

chalk’s picture

Status: Needs work » Needs review
StatusFileSize
new1022 bytes

@joshi.rohit100 thanks for a great advice! I haven't hear about it before :) Now the patch is pretty easier for reading.

joshi.rohit100’s picture

Now it looks good.

webankit’s picture

Status: Needs review » Reviewed & tested by the community

Tested the patch locally. This apply cleanly and functionality remains intact.

  • Mile23 committed f831744 on 8.x-1.x authored by Chalk
    Issue #2803247 by Chalk, mr.baileys, joshi.rohit100, webankit: Incorrect...
mile23’s picture

Status: Reviewed & tested by the community » Fixed

I noticed that the cache example's test class name ends with TestCase, which is wrong, and it subclasses WebTestBase, which is deprecated. So here's the follow-up: #2821387: Convert all tests to BrowserTestBase

Using the convention is right and proper, so we move from Forms to Form.

Thanks everyone!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.