8000 Fix type error in ClassSourceManipulator::addSetter() by mklewitz · Pull Request #1167 · symfony/maker-bundle · GitHub
[go: up one dir, main page]

Skip to content

Fix type error in ClassSourceManipulator::addSetter() #1167

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

Closed
wants to merge 1 commit into from

Conversation

mklewitz
Copy link
@mklewitz mklewitz commented Aug 5, 2022

Fixes #1166

symfony@ffc80c4 added 'string' as type hint for Symfony\Bundle\MakerBundle\Util\ClassSourceManipulator::addSetter()'s $type.

However, ClassSourceManipulator::addEntityField() will call addSetter() with $type == null for all custom defined fields and even for builtin type 'blob'.

That results in a type error when (re)generating entities: TypeError: Symfony\Bundle\MakerBundle\Util\ClassSourceManipulator::addSetter(): Argument symfony#2 ($type) must be of type string, null given
@jrushlow
Copy link
Collaborator

Thanks for the fix @mklewitz - we actually just merged #1204 which addresses this.

@jrushlow jrushlow closed this Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ClassSourceManipulator::addSetter(): Argument #2 ($type) must be of type string, null given
2 participants
0