-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
This is more of a question than a bug, but when creating controllers without an execute() method defined for Magento\Framework\App\Action\Action there is a fatal error if that method is not defined. The dispatch() method calls the execute() method on itself. That's not really all that surprising. But I was wondering what the use case is that we don't define the method execute() as abstract, since it's technically a requirement if the dispatch() method is called. It may be a minor thing but I would rather get a compiler or IDE error instead of a runtime error, especially when the dependency on that method is known. Perhaps it relates to mocking action classes, I don't know, but I was wondering why that method is called without being declared as abstract.