Entity handler annotations should consistently use a leading slash, or not

Created on 11 July 2016, almost 9 years ago
Updated 30 January 2023, over 2 years ago

Problem/Motivation

In the annotation for the EntityTestWithBundle content entity in the entity_test module (which is a submodule of system), the class declarations for forms include a leading backslash in the class names. However, when form objects are loaded and their classes are checked with get_class(), the leading backslash is not part of the class name. Any automated tests that rely on a comparison of the class name from the annotation with the class name of the object will fail as a result.

Proposed resolution

Attaching a patch that includes a test only (to demonstrate the failing condition) and a patch with both the test and the code correction.

Remaining tasks

Needs community review.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ“Œ Task
Status

Needs work

Version

10.1 ✨

Component
SystemΒ  β†’

Last updated about 8 hours ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States danmuzyka

Live updates comments and jobs are added and updated live.
  • Needs subsystem maintainer review

    It is used to alert the maintainer(s) of a particular core subsystem that an issue significantly impacts their subsystem, and their signoff is needed (see the governance policy draft for more information). Also, if you use this tag, make sure the issue component is set to the correct subsystem. If an issue significantly impacts more than one subsystem, use needs framework manager review instead.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024