Skip to content

[Bug] Methods without ActivityMethod attribute are registered as Activities (even magic) #382

@roxblnfk

Description

@roxblnfk

Describe the bug

We have an incorrect behavior regarding Activity: all methods of ActivityInterface classes are scanned and added as activity methods, instead of only registering methods with the ActivityMethod attribute only. This leads to even class constructors being included in the activity list.

Additional context

Despite the fact that the documentation everywhere instructs the user to use attributes to mark activity methods, there is a chance that not everyone followed this.
I propose to solve the problem in 2 stages:

  • We will immediately remove constructors and other magic methods from scanning.
  • Add a FeatureFlag to disable the registration of activity methods without attributes.
  • We can trigger a DeprecationError to inform the user that they are calling an activity method that is not marked with an attribute.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions