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
myentitywrappers intomyrestitself or into an optional adapter. - Downgrade
myentity:myentityfrom 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
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
Comment #4
sergeydruua commentedComment #6
sergeydruua commented