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
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