-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return type error in Phalcon\Application\AbstractApplication #14293
Comments
Hi Can you show your code where it happens? |
@Jeckerson, of course
p.s. I experimented with these return types:
p.s.s. Also i tried:
|
Add use of For example:
|
@Jeckerson Uncaught TypeError: Return value of App\Library\Mvc\Application::registerModules() must be an instance of Phalcon\Application\Application, instance of App\Library\Mvc\Application returned |
Thanks @Laxilef We will sort this out. |
Fixed in the |
All methods of the class Phalcon\Application\AbstractApplication return the type Application instead of AbstractApplication / self / ApplicationInterface:
Example
Errors:
Fatal error: Declaration of App\Library\Mvc\Application::registerModules(array $modules, bool $merge = false): App\Library\Mvc\Application must be compatible with Phalcon\Application\AbstractApplication::registerModules(array $modules, bool $merge = NULL): Phalcon\Application\Application
Fatal error: Uncaught TypeError: Return value of App\Library\Mvc\Application::registerModules() must be an instance of Phalcon\Application\Application, instance of App\Library\Mvc\Application returned
Details
The text was updated successfully, but these errors were encountered: