Why Does Beforeaction() In Actionfilter Runs Without Events() Defined?

In yii2\base\ActionFilter.php events() is inherited from Behavior, and is empty.

In the documentation it is said that we need to define events() method in the behavior to specify, which methods should correspond to which events that the owner component triggers.

Does this mean that behavior methods, which names are identical to event handlers in owner methods, are being run as it was in yii1?

If so, this means that documentation needs clarification.

You have to explicitly specify event handlers in events().

> [color=#1C2837][size=2]Does this mean that behavior methods, which names are identical to event handlers in owner methods, are being run as it was in yii1?[/size][/color]

[color=#1C2837][size=2]

[/size][/color]

[size="2"][color="#1c2837"]This is not true. Where did you get this understanding from?[/color][/size]

I was wrong. I answered the question in the corresponding issue.

The documentation on migrating from v1 to v2 was extended by @quang to address the issue