Fatal error when calling execute()
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.
It's a mistake. We'll fix this. Thanks for bringing this up.
Hi @kschroeder, let us know if the issue was fixed.
I'm looking over the m2 code on Github and I don't see the method execute() defined in the action interface, the abstract action class nor the action class. This would still seem to cause the behavior noted in the issue.
Internal ticket: MAGETWO-31249
This issue is fixed with pull request #1416