Skip to content
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

Scaffold Generate #1478

Closed
ankushkatiyar opened this issue Jan 6, 2021 · 3 comments · Fixed by #1492
Closed

Scaffold Generate #1478

ankushkatiyar opened this issue Jan 6, 2021 · 3 comments · Fixed by #1492
Assignees
Milestone

Comments

@ankushkatiyar
Copy link

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
Copy link
Author

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
Copy link

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

@Jeckerson
Copy link
Member

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

@Jeckerson Jeckerson mentioned this issue Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants