-
-
Notifications
You must be signed in to change notification settings - Fork 136
Use Symfony 7.4 for demo, examples and ai.symfony.com #1013
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
Open
OskarStark
wants to merge
2
commits into
symfony:main
Choose a base branch
from
OskarStark:symfony-7.4-requirement
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update all Symfony component requirements from 7.3 to 7.4 across demo, examples, ai.symfony.com, root composer.json, and GitHub workflow files. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
javiereguiluz
approved these changes
Nov 28, 2025
Member
javiereguiluz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Oskar!
Member
Member
|
The recommendation is to commit those |
nicolas-grekas
added a commit
to symfony/symfony
that referenced
this pull request
Dec 5, 2025
…rStark) This PR was squashed before being merged into the 7.4 branch. Discussion ---------- [Config] Fix array shape generation for backed enums | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | -- | License | MIT Spotted in symfony/ai#1013 ➡️ https://github.com/symfony/ai/actions/runs/19780810683/job/56680686767?pr=1013 It works for `redis`, but not for `postgres`, because `redis` is using `->values(Distance::cases())` and `postgres` is using `->enumFqcn(PostgresDistance::class)`: ### Redis #### Enum ```php enum Distance: string { use Comparable; case Cosine = 'COSINE'; case L2 = 'L2'; case Ip = 'IP'; } ``` #### Config ```php ->enumNode('distance') ->info('Distance metric to use for vector similarity search') ->values(Distance::cases()) ->defaultValue(Distance::Cosine) ->end() ``` #### RESULT ```php * redis?: array<string, array{ // Default: [] * connection_parameters?: mixed, // see https://github.com/phpredis/phpredis?tab=readme-ov-file#example-1 * client?: string, // a service id of a Redis client * index_name: string, * key_prefix?: string, // Default: "vector:" * distance?: \Symfony\AI\Store\Bridge\Redis\Distance::Cosine|\Symfony\AI\Store\Bridge\Redis\Distance::L2|\Symfony\AI\Store\Bridge\Redis\Distance::Ip, // Distance metric to use for vector similarity search // Default: "COSINE" * }>, ``` ### Postgres #### Enum ```php enum Distance: string { use Comparable; case Cosine = 'cosine'; case InnerProduct = 'inner_product'; case L1 = 'l1'; case L2 = 'l2'; public function getComparisonSign(): string { return match ($this) { self::Cosine => '<=>', self::InnerProduct => '<#>', self::L1 => '<+>', self::L2 => '<->', }; } } ``` #### Config ```php ->enumNode('distance') ->info('Distance metric to use for vector similarity search') ->enumFqcn(PostgresDistance::class) ->defaultValue(PostgresDistance::L2) ->end() ``` #### RESULT ```php * postgres?: array<string, array{ // Default: [] * dsn?: string, * username?: string, * password?: string, * table_name: string, * vector_field?: string, * distance?: cosine|inner_product|l1|l2, // Distance metric to use for vector similarity search // Default: "l2" * dbal_connection?: string, * }>, ``` you can see, that the result is different: FQCN: `distance?: \Symfony\AI\Store\Bridge\Redis\Distance::Cosine|\Symfony\AI\Store\Bridge\Redis\Distance::L2|\Symfony\AI\Store\Bridge\Redis\Distance::Ip,` vs. strings: `distance?: cosine|inner_product|l1|l2,` Why? Commits ------- 62422c4 [Config] Fix array shape generation for backed enums
symfony-splitter
pushed a commit
to symfony/config
that referenced
this pull request
Dec 5, 2025
…rStark) This PR was squashed before being merged into the 7.4 branch. Discussion ---------- [Config] Fix array shape generation for backed enums | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | -- | License | MIT Spotted in symfony/ai#1013 ➡️ https://github.com/symfony/ai/actions/runs/19780810683/job/56680686767?pr=1013 It works for `redis`, but not for `postgres`, because `redis` is using `->values(Distance::cases())` and `postgres` is using `->enumFqcn(PostgresDistance::class)`: ### Redis #### Enum ```php enum Distance: string { use Comparable; case Cosine = 'COSINE'; case L2 = 'L2'; case Ip = 'IP'; } ``` #### Config ```php ->enumNode('distance') ->info('Distance metric to use for vector similarity search') ->values(Distance::cases()) ->defaultValue(Distance::Cosine) ->end() ``` #### RESULT ```php * redis?: array<string, array{ // Default: [] * connection_parameters?: mixed, // see https://github.com/phpredis/phpredis?tab=readme-ov-file#example-1 * client?: string, // a service id of a Redis client * index_name: string, * key_prefix?: string, // Default: "vector:" * distance?: \Symfony\AI\Store\Bridge\Redis\Distance::Cosine|\Symfony\AI\Store\Bridge\Redis\Distance::L2|\Symfony\AI\Store\Bridge\Redis\Distance::Ip, // Distance metric to use for vector similarity search // Default: "COSINE" * }>, ``` ### Postgres #### Enum ```php enum Distance: string { use Comparable; case Cosine = 'cosine'; case InnerProduct = 'inner_product'; case L1 = 'l1'; case L2 = 'l2'; public function getComparisonSign(): string { return match ($this) { self::Cosine => '<=>', self::InnerProduct => '<#>', self::L1 => '<+>', self::L2 => '<->', }; } } ``` #### Config ```php ->enumNode('distance') ->info('Distance metric to use for vector similarity search') ->enumFqcn(PostgresDistance::class) ->defaultValue(PostgresDistance::L2) ->end() ``` #### RESULT ```php * postgres?: array<string, array{ // Default: [] * dsn?: string, * username?: string, * password?: string, * table_name: string, * vector_field?: string, * distance?: cosine|inner_product|l1|l2, // Distance metric to use for vector similarity search // Default: "l2" * dbal_connection?: string, * }>, ``` you can see, that the result is different: FQCN: `distance?: \Symfony\AI\Store\Bridge\Redis\Distance::Cosine|\Symfony\AI\Store\Bridge\Redis\Distance::L2|\Symfony\AI\Store\Bridge\Redis\Distance::Ip,` vs. strings: `distance?: cosine|inner_product|l1|l2,` Why? Commits ------- 62422c43483 [Config] Fix array shape generation for backed enums
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Needs