Skip to content

drush generate content-entity uses removed function link() #4595

@kmajzlik

Description

@kmajzlik

Describe the bug
drush generate module-content-entity is putting $entity->link() into listBuilder class - public function buildRow(EntityInterface $entity) {}

To Reproduce
Generated custom entity.

Expected behavior
Not to use method which has been removed in Drupal 9.

Actual behavior
It used removed method, list of entities is having error for undefined method.

Workaround
Replace it as suggested in documentation: https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!Entity.php/function/Entity%3A%3Alink/8.6.x

System Configuration

Q A
Drush version? 10.3.6
Drupal version? 9.0
PHP version 7.4
OS? Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions