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

Fix max string length resolution in AbstractPlatform::getEnumDeclaration() #6579

Merged

Conversation

davidxkurka
Copy link
Contributor

Q A
Type bug
Fixed issues N/A

Summary

Fixes a situation where an enum type only contains 1 case. This results in passing only a single integer argument to the max() method, which is not valid and returns the error "max(): Argument 1 ($value) must be of type array, int given".

@derrabus
Copy link
Member

derrabus commented Nov 1, 2024

Thank you. Please add a test.

@davidxkurka davidxkurka force-pushed the fix/get-enum-declaration-sql-method branch 2 times, most recently from 128fdeb to 96c75db Compare November 1, 2024 16:31
@davidxkurka davidxkurka force-pushed the fix/get-enum-declaration-sql-method branch from 96c75db to 6bdd70a Compare November 1, 2024 16:32
@davidxkurka
Copy link
Contributor Author

@derrabus Hi, tests done.

@derrabus derrabus added this to the 4.2.2 milestone Nov 24, 2024
@derrabus derrabus merged commit 437cb2f into doctrine:4.2.x Nov 24, 2024
91 checks passed
@derrabus
Copy link
Member

Thank you!

@derrabus derrabus changed the title fix: max string length resolution in AbstractPlatform::getEnumDeclara… Fix max string length resolution in AbstractPlatform::getEnumDeclaration() Nov 24, 2024
@davidxkurka davidxkurka deleted the fix/get-enum-declaration-sql-method branch November 24, 2024 21:09
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.

2 participants