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

[7.x] Allow overriding the MySQL server version for strict mode #32708

Merged
merged 2 commits into from
May 6, 2020
Merged

[7.x] Allow overriding the MySQL server version for strict mode #32708

merged 2 commits into from
May 6, 2020

Conversation

Propaganistas
Copy link
Contributor

A PR in response to #32681.

When working with managed MySQL servers from Azure there's quite a peculiar catch: the database servers are behind a proxy and these don't know in advance which version you're connecting to while handshaking.

As a consequence $connection->getAttribute(PDO::ATTR_SERVER_VERSION) will always yield 5.6.42.0 regardless of the actual MySQL version (like 8.0.x!), and Laravel is unable to set the correct modes.

Since there's no way to circumvent the spoofed server version, a simple version config -if present- seemed like the cleanest approach to me.

@taylorotwell taylorotwell merged commit 25730a8 into laravel:7.x May 6, 2020
@Propaganistas Propaganistas deleted the 7.x-mysql-version branch May 7, 2020 06:26
@GrahamCampbell GrahamCampbell changed the title Allow overriding the MySQL server version for strict mode [7.x] Allow overriding the MySQL server version for strict mode May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants