Problem/Motivation

The codebase contains roughly 350 type hints against MyentityNodeInterface, MyentityTermInterface, MyentityParagraphInterface and related wrappers. This hard-couples myrest to the myentity module and prevents the module from being installed on a standard Drupal site.

Proposed resolution

  • Replace wrapper type hints with core equivalents: ContentEntityInterface, NodeInterface, TermInterface, ParagraphInterface, FileInterface, MediaInterface, UserInterface.
  • Move any helper behaviour that only exists on the myentity wrappers into myrest itself or into an optional adapter.
  • Downgrade myentity:myentity from a hard dependency to an optional integration once the type hints are gone.

Remaining tasks

Audit each wrapper method used, provide replacements, and update myrest.info.yml.

User interface changes

None.

API changes

Method signatures accept core entity interfaces. Existing myentity objects still satisfy them.

Issue fork myrest-3615156

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sergeydruua created an issue. See original summary.

  • sergeydruua committed 1a97e6a0 on 1.0.x
    Issue #3615156: Replace Myentity type hints with Drupal core interfaces
    
sergeydruua’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

sergeydruua’s picture

Status: Fixed » Closed (fixed)