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

[Cache] Remove database server version detection #52720

Merged
merged 1 commit into from Nov 25, 2023

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Nov 24, 2023

Q A
Branch? 7.0
Bug fix? no
New feature? no
Deprecations? no
Issues N/A
License MIT

Our DoctrineDbalAdapter is currently sniffing for the database server version to implement workarounds for very old database servers:

  • SQL Server before 2008: DBAL 3 does not support older SQL server releases than this one.
  • Postgres before 9.5: Postgres 9.5 has been released in Jan 2016, it predecessor 9.4 is EOL since Feb 2020.

I think it's fair to not support those old releases anymore at this point.

@carsonbot

This comment was marked as resolved.

@derrabus derrabus changed the base branch from 7.1 to 7.0 November 24, 2023 14:57
@derrabus derrabus modified the milestones: 7.1, 7.0 Nov 24, 2023
@derrabus derrabus force-pushed the remove/server-version-detection branch from bc3a79f to 5410fd8 Compare November 24, 2023 14:59
@OskarStark OskarStark changed the title [Cache] Remove database sever version detection [Cache] Remove database server version detection Nov 24, 2023
@GromNaN
Copy link
Member

GromNaN commented Nov 24, 2023

What will be the behavior if someone uses an old version of Postgres?

This should be mentioned in the changelog and the minimum database server versions needs to be documented.

@derrabus
Copy link
Member Author

What will be the behavior if someone uses an old version of Postgres?

The adapter will use an SQL syntax the server won't understand. That's a hard exception.

This should be mentioned in the changelog and the minimum database server versions needs to be documented.

I'll update the change log and open a PR for the docs.

@derrabus derrabus force-pushed the remove/server-version-detection branch from 5410fd8 to c5f7cd5 Compare November 25, 2023 15:37
@derrabus derrabus force-pushed the remove/server-version-detection branch from c5f7cd5 to 842c3c2 Compare November 25, 2023 15:40
@derrabus
Copy link
Member Author

I've opened symfony/symfony-docs#19187 for the docs.

@derrabus derrabus merged commit 37926c8 into symfony:7.0 Nov 25, 2023
7 of 9 checks passed
@derrabus derrabus deleted the remove/server-version-detection branch November 25, 2023 20:22
@fabpot fabpot mentioned this pull request Nov 26, 2023
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull request Dec 1, 2023
This PR was merged into the 7.0 branch.

Discussion
----------

Document requirements for DoctrineDbalAdapter

Follows symfony/symfony#52720. I've added a block that documents the compatibility with various database engines.

* MySQL 5.7 is the oldest release supported by DBAL 3.
* MariaDB 10.2 is the oldest release supported by DBAL 3.
* The `MERGE` statement that the adapter uses requires Oracle 10g or newer.
* SQL Server 2012 is the oldest release supported by DBAL 3.
* The `INSERT OR REPLACE` statement that we use on SQLite requires PHP to be linked against libsqlite 3.24 or newer.
* The `ON CONFLICT` clause that we use on Postgres was introduced with version 9.5.

Commits
-------

4127633 Document requirements for DoctrineDbalAdapter
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.

None yet

5 participants