-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[Maintenance] Allow doctrine/doctrine-bundle ^3.1 #18754
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
base: 2.3
Are you sure you want to change the base?
Conversation
Add support for doctrine/doctrine-bundle 3.x alongside 2.x. Added CI matrix entries to test both versions.
📝 WalkthroughWalkthroughAdds DoctrineBundle 3.1 compatibility by broadening composer constraints and extends CI matrix/workflows to optionally restrict and test against Changes
Sequence Diagram(s)(Skipped — changes are configuration and homogeneous dependency/matrix updates that do not introduce complex multi-component control flow requiring visualization.) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
❗ Preview Environment deployment failed on BunnyshellSee: Environment Details | Pipeline Logs Check https://github.com/Sylius/Sylius/actions/runs/21453129670 for details. Available commands:
|
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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/Sylius/Bundle/TaxationBundle/composer.json`:
- Around line 38-40: The require-dev entry for "doctrine/doctrine-bundle"
currently allows ^3.1 which is PHP ^8.4-only; update composer.json to prevent
installation on PHP 8.2/8.3 by either removing the "|| ^3.1" from the
"doctrine/doctrine-bundle" requirement (leave it as "^2.13") or keep the
requirement but add a "conflict" entry for "doctrine/doctrine-bundle": "^3.1"
when the package is used with PHP <8.4 — modify the "require-dev" and/or add a
top-level "conflict" key referencing "doctrine/doctrine-bundle" so
DoctrineBundle 3.1 cannot be installed on unsupported PHP versions.
| "require-dev": { | ||
| "doctrine/doctrine-bundle": "^2.13", | ||
| "doctrine/doctrine-bundle": "^2.13 || ^3.1", | ||
| "doctrine/orm": "^2.18 || ^3.5", |
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.
🧩 Analysis chain
🌐 Web query:
doctrine/doctrine-bundle 3.1 requirements PHP Symfony version compatibility
💡 Result:
I wasn’t able to retrieve the version-specific require constraints for DoctrineBundle 3.1.x (e.g., 3.1.0 / 3.1.1) from Packagist/GitHub in a way that exposes the composer.json contents reliably in this environment (Packagist only rendered the latest requirements; GitHub file views didn’t render the raw file content).
What I can confirm from authoritative sources is:
- DoctrineBundle 3.1.x exists and was released as:
3.1.0on 2025-11-293.1.1on 2025-12-21 (marked “unmaintained” in Doctrine’s docs site for that version line) [1]
- Latest available DoctrineBundle (currently
3.2.2) requires:- PHP
^8.4 - Symfony components
^6.4 || ^7.0 || ^8.0(incl.symfony/framework-bundle,symfony/cache, etc.) [2]
- PHP
If you tell me whether you mean 3.1.0 or 3.1.1, and what Symfony/PHP versions you’re targeting, I can help you pick a compatible DoctrineBundle line (e.g., 2.19.x vs 3.0.x vs 3.1.x vs 3.2.x) based on the constraints you have.
Sources: [1] [2]
🏁 Script executed:
# Check the composer.json file to understand the bundle's PHP and Symfony constraints
cat src/Sylius/Bundle/TaxationBundle/composer.json | head -50Repository: Sylius/Sylius
Length of output: 143
🏁 Script executed:
# Try a simpler read of the composer.json
head -50 src/Sylius/Bundle/TaxationBundle/composer.jsonRepository: Sylius/Sylius
Length of output: 1547
🌐 Web query:
DoctrineBundle 3.1.0 3.1.1 minimum PHP version requirement
💡 Result:
I couldn’t reliably extract the PHP requirement for doctrine/doctrine-bundle 3.1.0 / 3.1.1 from upstream metadata during this lookup because Packagist/GitHub wouldn’t serve the version-specific composer.json contents in a way that was accessible via the web fetches I can run right now (the pages loaded without the file body).
What I can confirm is that Doctrine lists these releases as: 3.1.0 (2025-11-29) and 3.1.1 (2025-12-21). [1]
To get the exact minimum PHP version locally (authoritative, straight from Composer metadata), run one of:
composer show doctrine/doctrine-bundle 3.1.0 --all
composer show doctrine/doctrine-bundle 3.1.1 --alland look under the requires section for php.
(For reference, the current Packagist page shows doctrine/doctrine-bundle 3.2.2 requires php: ^8.4, but that does not prove the requirement for 3.1.x.) [2]
Sources:
[1] Doctrine project release list for DoctrineBundle 3.1.x: https://www.doctrine-project.org/projects/doctrine-bundle/3.1.html
[2] Packagist package page (shows requirements for latest release shown on the page): https://packagist.org/packages/doctrine/doctrine-bundle
🏁 Script executed:
#!/bin/bash
# Query DoctrineBundle 3.1.0 and 3.1.1 for their PHP requirements
composer show doctrine/doctrine-bundle 3.1.0 --all 2>/dev/null | grep -A 10 "requires"
echo "---"
composer show doctrine/doctrine-bundle 3.1.1 --all 2>/dev/null | grep -A 10 "requires"Repository: Sylius/Sylius
Length of output: 1360
Remove ^3.1 or add a conflict constraint: DoctrineBundle 3.1.x requires PHP ^8.4, but this bundle supports PHP ^8.2. The constraint "doctrine/doctrine-bundle": "^2.13 || ^3.1" allows DoctrineBundle 3.1 to be installed with PHP 8.2 and 8.3, which is incompatible. Either narrow the constraint to "^2.13" only or add a conflict: "conflict": { "doctrine/doctrine-bundle": "^3.1" } when PHP <8.4.
🤖 Prompt for AI Agents
In `@src/Sylius/Bundle/TaxationBundle/composer.json` around lines 38 - 40, The
require-dev entry for "doctrine/doctrine-bundle" currently allows ^3.1 which is
PHP ^8.4-only; update composer.json to prevent installation on PHP 8.2/8.3 by
either removing the "|| ^3.1" from the "doctrine/doctrine-bundle" requirement
(leave it as "^2.13") or keep the requirement but add a "conflict" entry for
"doctrine/doctrine-bundle": "^3.1" when the package is used with PHP <8.4 —
modify the "require-dev" and/or add a top-level "conflict" key referencing
"doctrine/doctrine-bundle" so DoctrineBundle 3.1 cannot be installed on
unsupported PHP versions.
Required by doctrine/doctrine-bundle 3.x.
Summary
^2.13 || ^3.1)This is preparation work for future Symfony 8 support, as doctrine-bundle 3.x is required for Sf8.
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.