| Q | A
|-----------------|-----
| Branch? | 2.3
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no<!-- don't forget to update the UPGRADE-*.md file
-->
| Related tickets | duplicates
https://github.com/Sylius/Sylius/pull/18754, partially
https://github.com/Sylius/Sylius/issues/18760
| License | MIT
This PR is a duplication of #18754 (which targets the `symfony-8`
branch). It reuses that PR's commits to bring the broadened Doctrine
support into `2.3`.
### What it does
Widens the supported Doctrine stack, **opt-in via `||`, no minimum is
bumped**:
- `doctrine/doctrine-bundle` `^2.13 || ^3.0`
- `doctrine/dbal` `^3.9 || ^4.0`
- `doctrine/persistence` `^3.3 || ^4.0`
- `doctrine/data-fixtures` `^1.7 || ^2.2` (dev)
Plus the compatibility work the newer stack requires:
- DBAL 3.x/4.x compatibility layers (platform detection,
`getSchemaManager()` → `createSchemaManager()`,
`SqlitePlatform`/`SQLitePlatform`, `QueryBuilder::select()`);
- a custom `ObjectType` registered as `object` (the built-in `object`
type was removed in DBAL 4),
covering the only two `type="object"` mappings:
`PaymentSecurityToken.details` and `PaymentRequest.payload`;
- config updates: removed `auto_generate_proxy_classes` (gone in
DoctrineBundle 3), PSR-6 cache pools,
and forced `SEQUENCE` identity generation on PostgreSQL to keep the
schema backward compatible;
- CI matrix entries to test both DoctrineBundle 2 and 3.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added support for DoctrineBundle 3 and DBAL 4.
* Added a custom DBAL “object” type to keep payment data compatible.
* **Documentation**
* Added Sylius 2.3 upgrade notes, including Doctrine cache pool
migration and PostgreSQL identity/sequence behavior.
* **Bug Fixes**
* Updated Doctrine ORM cache configuration to use Symfony cache pools
(production and test setups).
* Fixed timestamp handling to consistently store mutable `DateTime`
values where required.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Use ClockInterface in UserLastLoginSubscriber instead of new DateTime()
- Update all test fixtures to use DateTimeImmutable
- Fix test code using DateTime for entity properties
(cherry picked from commit a01e7ef1eb)
DBAL 4.x strictly requires DateTimeImmutable for datetime_immutable
columns. This fixes:
- Fixture factories to use DateTimeImmutable::createFromMutable() for Faker dates
- AddressLogEntry to override Gedmo's setLoggedAt() with DateTimeImmutable
(cherry picked from commit 5d8fd73280)
DBAL 4.x has stricter type checking that doesn't accept DateTimeImmutable
in datetime fields. Until the codebase is fully compatible with DBAL 4.x,
we need to use DBAL 3.x for DoctrineBundle 2.x tests.
(cherry picked from commit 4abdd1c2a0)
This option was removed in DoctrineBundle 3.0 as it became a no-op
when using native lazy objects (introduced in ORM 3.x/DBAL 4.x).
(cherry picked from commit 2c0b64e89c)
| Q | A
|-----------------|-----
| Branch? | 2.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no<!-- don't forget to update the UPGRADE-*.md file
-->
| Related tickets | extracted from
https://github.com/Sylius/Sylius/pull/18803, partially
https://github.com/Sylius/Sylius/issues/18490
| License | MIT
<!--
- Bug fixes must be submitted against the 2.2 branch
- Features and deprecations must be submitted against the 2.3 branch
- Make sure that the correct base branch is set
To be sure you are not breaking any Backward Compatibilities, check the
documentation:
https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html
-->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Release Notes
* **Refactor**
* Migrated state machine service configurations from XML format to
PHP-based configuration files for improved maintainability and
consistency.
* Updated the service loader to support PHP file-based configuration
instead of XML.
* **Tests**
* Streamlined test coverage to focus on YAML-based service configuration
validation paths.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
| Q | A
|-----------------|-----
| Branch? | 2.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Related tickets | https://github.com/Sylius/Sylius/pull/18971,
https://github.com/Sylius/Sylius/issues/18760
| License | MIT
This re-targets the already-open #18971 (originally against `symfony-8`)
onto `2.3`, since `2.3` is the development branch for the next release.
The original commit is cherry-picked as-is to preserve authorship.
`symfony/proxy-manager-bridge` and `friendsofphp/proxy-manager-lts` are
removed — they are no longer needed, as lazy services rely on PHP's
native lazy proxies from `symfony/var-exporter` (default since Symfony
6.4).
Adds an `UPGRADE-2.3.md` note under **Dependencies**.
<!--
- Bug fixes must be submitted against the 2.2 branch
- Features and deprecations must be submitted against the 2.3 branch
- Make sure that the correct base branch is set
To be sure you are not breaking any Backward Compatibilities, check the
documentation:
https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html
-->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Added upgrade guidance for dependency changes in version 2.3.
* **Chores**
* Removed proxy manager bridge dependencies; lazy services now use
native PHP lazy proxies for improved performance and reduced external
dependencies.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
| Q | A
|-----------------|-----
| Branch? | 2.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no<!-- don't forget to update the UPGRADE-*.md file
-->
| Related tickets | https://github.com/Sylius/Sylius/pull/18903,
https://github.com/Sylius/Sylius/issues/18760
| License | MIT
This PR backports the robo removal already done on the `symfony-8`
branch (#18903) to `2.3`, as it makes sense to have it on `2.3` already
<!--
- Bug fixes must be submitted against the 2.2 branch
- Features and deprecations must be submitted against the 2.3 branch
- Make sure that the correct base branch is set
To be sure you are not breaking any Backward Compatibilities, check the
documentation:
https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html
-->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Chores**
* Refactored CI/CD workflows to dynamically discover and test packages
instead of using a task runner approach.
* Simplified package test execution with per-package working directories
and conditional test execution.
* Removed external task runner dependency to streamline the build
pipeline.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->