phalcon / phalcon-devtools

Phalcon Developer Tools
https://docs.phalcon.io/latest/en/devtools
Other
1.33k stars 630 forks source link

Scaffold Generate #1478

Closed ankushkatiyar closed 3 years ago

ankushkatiyar commented 3 years ago

I got an error when create scaffold using cli, i have users table and i'm using phalcon scaffold users with cli

Fatal error: Declaration of Users::findFirst($parameters = NULL) must be compatible with Phalcon\Mvc\Model::findFirst($parameters = NULL): ?Phalcon\Mvc\ModelInterface

I also tried to create scaffold from webtools after enable in application

ankushkatiyar commented 3 years ago

via cli function generated like that public static function findFirst($parameters = null) Need to change to public static function findFirst($parameters = null): \Phalcon\Mvc\ModelInterface It will work fine

flyingangel commented 3 years ago

With question mark as it can return null ?\Phalcon\Mvc\ModelInterface. Please fix

Jeckerson commented 3 years ago

Fixed in #1492 Will be released in next patch version.