Skip to content

Conversation

@hduerkop
Copy link

Q A
Type bug/feature/improvement
Fixed issues 1

Summary

Allow to skip setting a default if nothing of use was detected.
Solves

In AbstractMySQLPlatform.php line 850:

Doctrine\DBAL\Platforms\AbstractMySQLPlatform::quoteStringLiteral(): Argument #1 ($str) must be of type string, false given, called in C:\xhtml\mhh4-backend\api\vendor\doctrine\dbal\src\Platforms\AbstractPlatform.php on line 1563

with use of ApiPlatform latest

@derrabus
Copy link
Member

Your change is not covered by a test and even breaks existing ones.

@morozov
Copy link
Member

morozov commented Nov 1, 2025

Allow to skip setting a default if nothing of use was detected.

By default, the column default is null (which is a valid value), while in your case you're passing false (which is not). Why?

@hduerkop
Copy link
Author

hduerkop commented Nov 1, 2025

Allow to skip setting a default if nothing of use was detected.

By default, the column default is null (which is a valid value), while in your case you're passing false (which is not). Why?

When using API-Platform with MySQL, it's possible to have columns that are NOT NULL, so the null default won't work for them.

@morozov
Copy link
Member

morozov commented Nov 1, 2025

When using API-Platform with MySQL, it's possible to have columns that are NOT NULL, so the null default won't work for them.

What do you mean by "won't work" and what are you trying to achieve?

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.

3 participants