Skip to content

Don't deprecate calling behavior methods as mixins #19326

@kuebel

Description

@kuebel

Description

Hi!

We are using behaviors depending on the setting.

Constructed example:
We have a PersonsTable and a PersonsBaseBehavior (with the function createLabel). In a teacher setting we use PersonsTable and TeacherBehavior (extended from PersonsBaseBehavior), in a student setting we add StudentBehavior to the table.

The rest of the code does not care if the person is teacher or student, we call $this->Persons->createLabel($person)

With the new restriction, we would have to know the behavior name to call $this->Persons->getBehavior('StudentBehavior')->createLabel($person).

This makes using behaviors cumbersome, please reconsider.

CakePHP Version

5.3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions