Skip to content

Conversation

Matt-PMCT
Copy link
Contributor

@Matt-PMCT Matt-PMCT commented Sep 1, 2025

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues None
License MIT

Using TEXT for the id column results in Doctrine setting the SQL column to VARCHAR(MAX) for SQL Server, which results in an SQL error since the primary key cannot be VARCHAR(MAX). This change enables Doctrine to recognize the length setting, which would otherwise be ignored for TEXT objects. This was described by the Doctrine Team here (doctrine/dbal#7126)

@carsonbot
Copy link

Hey!

Thanks for your PR. You are targeting branch "7.4" but it seems your PR description refers to branch "7.3".
Could you update the PR description or change target branch? This helps core maintainers a lot.

Cheers!

Carsonbot

@carsonbot carsonbot changed the title SQLSRV: Change column type from TEXT to STRING SQLSRV: Change column type from TEXT to STRING Sep 1, 2025
@xabbuh xabbuh modified the milestones: 7.4, 6.4 Sep 2, 2025
@carsonbot carsonbot changed the title SQLSRV: Change column type from TEXT to STRING [HttpFoundation] SQLSRV: Change column type from TEXT to STRING Sep 2, 2025
@OskarStark OskarStark changed the title [HttpFoundation] SQLSRV: Change column type from TEXT to STRING [HttpFoundation][SQLSRV] Change column type from TEXT to STRING Sep 2, 2025
Using TEXT for the id column results in doctrine setting SQL column to VARCHAR(MAX) which results in an SQL error since the primary key cannot be VARCHAR(MAX). This change allows Doctrine to see the length setting, which is ignored for TEXT objects.
@fabpot fabpot changed the base branch from 7.4 to 6.4 September 2, 2025 08:23
@fabpot fabpot force-pushed the Matt-PMCT-sqlsrv-session-fix branch from c4b0bc1 to 8dcddb0 Compare September 2, 2025 08:23
@fabpot
Copy link
Member

fabpot commented Sep 2, 2025

Thank you @Matt-PMCT.

@fabpot fabpot merged commit e6dfb3d into symfony:6.4 Sep 2, 2025
7 of 11 checks passed
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.

5 participants