Commit ca96627
committed
[AI Bundle] Fix unresolved Distance enum dependencies in configuration
The options.php file was importing Distance enums from optional store bridge
packages (postgres-store and redis-store) unconditionally. This caused errors
when these packages weren't installed since PHP tries to resolve imports at
parse time.
The fix uses string values for the distance configuration instead of enum
references, and converts them to enums in AiBundle.php only after verifying
the package is installed via willBeAvailable().1 parent d8a3938 commit ca96627
File tree
3 files changed
+16
-18
lines changed- src/ai-bundle
- config
- src
- tests/DependencyInjection
3 files changed
+16
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | 21 | | |
24 | 22 | | |
25 | 23 | | |
| |||
794 | 792 | | |
795 | 793 | | |
796 | 794 | | |
797 | | - | |
798 | | - | |
| 795 | + | |
| 796 | + | |
799 | 797 | | |
800 | 798 | | |
801 | 799 | | |
| |||
844 | 842 | | |
845 | 843 | | |
846 | 844 | | |
847 | | - | |
848 | | - | |
| 845 | + | |
| 846 | + | |
849 | 847 | | |
850 | 848 | | |
851 | 849 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
| |||
1437 | 1439 | | |
1438 | 1440 | | |
1439 | 1441 | | |
1440 | | - | |
1441 | | - | |
1442 | | - | |
| 1442 | + | |
1443 | 1443 | | |
1444 | 1444 | | |
1445 | 1445 | | |
| |||
1507 | 1507 | | |
1508 | 1508 | | |
1509 | 1509 | | |
1510 | | - | |
| 1510 | + | |
1511 | 1511 | | |
1512 | 1512 | | |
1513 | 1513 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
2588 | 2588 | | |
2589 | 2589 | | |
2590 | 2590 | | |
2591 | | - | |
| 2591 | + | |
2592 | 2592 | | |
2593 | 2593 | | |
2594 | 2594 | | |
| |||
2609 | 2609 | | |
2610 | 2610 | | |
2611 | 2611 | | |
2612 | | - | |
| 2612 | + | |
2613 | 2613 | | |
2614 | 2614 | | |
2615 | 2615 | | |
| |||
2625 | 2625 | | |
2626 | 2626 | | |
2627 | 2627 | | |
2628 | | - | |
| 2628 | + | |
2629 | 2629 | | |
2630 | 2630 | | |
2631 | 2631 | | |
| |||
2647 | 2647 | | |
2648 | 2648 | | |
2649 | 2649 | | |
2650 | | - | |
| 2650 | + | |
2651 | 2651 | | |
2652 | 2652 | | |
2653 | 2653 | | |
| |||
2663 | 2663 | | |
2664 | 2664 | | |
2665 | 2665 | | |
2666 | | - | |
| 2666 | + | |
2667 | 2667 | | |
2668 | 2668 | | |
2669 | 2669 | | |
| |||
2997 | 2997 | | |
2998 | 2998 | | |
2999 | 2999 | | |
3000 | | - | |
| 3000 | + | |
3001 | 3001 | | |
3002 | 3002 | | |
3003 | 3003 | | |
| |||
7217 | 7217 | | |
7218 | 7218 | | |
7219 | 7219 | | |
7220 | | - | |
| 7220 | + | |
7221 | 7221 | | |
7222 | 7222 | | |
7223 | 7223 | | |
| |||
0 commit comments