Commit graph

41012 commits

Author SHA1 Message Date
Tomasz Kaliński
f7c9c8d705 Enhance authorized payment transitions and update feature scenario for order recovery 2026-06-22 08:11:36 +02:00
Tomasz Kaliński
b5b7bfd364 Add scenario for recovering order payment state after authorized payment cancellation 2026-06-22 08:11:36 +02:00
Tomasz Kaliński
5a5ae1c5c0 Add tests for order payment state resolution on cancel and fail events 2026-06-22 08:11:36 +02:00
Tomasz Kaliński
b7aa5f8387 Add support for canceling authorized payments and adjust payment transition states 2026-06-22 08:11:36 +02:00
mamazu
ba889c63a1 Making grid assertions explicit 2026-06-20 01:12:08 +02:00
Loïc Frémont
c40a6ff968 feat(php-grids): Remove abstract grid usage 2026-06-19 17:43:05 +02:00
Marek Rzytki
9c909b5f24 Fix docs description 2026-06-19 15:54:58 +02:00
Kamil Grygierzec
0a6bb24f47
Replace deprecated Request::get() with explicit request bags (#19074)
Some checks failed
Continuous Integration (Minimal) / Static checks (push) Has been cancelled
Continuous Integration (Minimal) / Tests (MariaDB) (push) Has been cancelled
Continuous Integration (Minimal) / Tests (MySQL) (push) Has been cancelled
Continuous Integration (Minimal) / Javascript Tests (MySQL) (push) Has been cancelled
Continuous Integration (Minimal) / Tests (PostgreSQL) (push) Has been cancelled
Continuous Integration (Minimal) / Frontend (push) Has been cancelled
Continuous Integration (Minimal) / Packages (push) Has been cancelled
| Q               | A
|-----------------|-----
| Branch?         | 2.3
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | extracted from
https://github.com/Sylius/Sylius/pull/18803
| License         | MIT

Replaces deprecated `Request::get()` calls with explicit request bags
across templates, the shop product grid and the Payum AfterPay provider.

<!--
 - 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

* **Bug Fixes**
  * Fixed payment request breadcrumb navigation
  * Fixed product taxon position update functionality
  * Fixed payment response handling
  * Fixed product grid sorting behavior
  * Fixed product review creation links
  * Fixed route identification in page layouts

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-19 13:03:26 +02:00
TheMilek
6af1ad28dd
Replace undefined request->get with existing request->query->get 2026-06-19 12:45:59 +02:00
TheMilek
f447232bd2
Fix app.request in grid and breadcrumbs 2026-06-19 12:43:49 +02:00
TheMilek
999f15aedc
Fix app.request in templates 2026-06-19 12:43:49 +02:00
Kamil Grygierzec
92ef8a2200
Use ResourceClassResolver in IriConverter to fix discriminator subcla… (#19046)
Some checks failed
Continuous Integration (Minimal) / Static checks (push) Has been cancelled
Continuous Integration (Minimal) / Javascript Tests (MySQL) (push) Has been cancelled
Continuous Integration (Minimal) / Tests (PostgreSQL) (push) Has been cancelled
Continuous Integration (Minimal) / Frontend (push) Has been cancelled
Continuous Integration (Minimal) / Packages (push) Has been cancelled
Continuous Integration (Minimal) / Tests (MariaDB) (push) Has been cancelled
Continuous Integration (Minimal) / Tests (MySQL) (push) Has been cancelled
…ss IRI generation

| Q               | A
|-----------------|-----
| Branch?         | 2.2
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | fixes https://github.com/Sylius/Sylius/issues/18781
| 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
-->
2026-06-19 09:17:01 +02:00
Jan Góralski
8b81264118
[Validator] Use named arguments in constraint constructors (#19066)
Some checks are pending
Continuous Integration (Minimal) / Static checks (push) Waiting to run
Continuous Integration (Minimal) / Tests (MariaDB) (push) Blocked by required conditions
Continuous Integration (Minimal) / Tests (MySQL) (push) Blocked by required conditions
Continuous Integration (Minimal) / Javascript Tests (MySQL) (push) Blocked by required conditions
Continuous Integration (Minimal) / Tests (PostgreSQL) (push) Blocked by required conditions
Continuous Integration (Minimal) / Frontend (push) Blocked by required conditions
Continuous Integration (Minimal) / Packages (push) Blocked by required conditions
| Q               | A
|-----------------|-----
| Branch?         | 2.3
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | yes
| Related tickets | partially #9693, extracted from
https://github.com/Sylius/Sylius/pull/18803
| License         | MIT

Gives all Sylius validation constraints explicit constructors with named
arguments (marked with `#[HasNamedArguments]`) that initialize their
properties themselves, instead of relying on the base `Constraint` class
to evaluate an array of options (evaluating options in
`Constraint::__construct()` is deprecated since Symfony 7.4 and removed
in Symfony 8).

To avoid a BC break, the legacy array-options syntax is **kept working**
as a backward-compatibility layer (a leading `?array $options` argument)
and now triggers a **deprecation** instead of failing. It will be
removed in Sylius 3.0.

As a result:
  - It works on all supported Symfony versions (6.4, 7.4 and 8.0).
- Configuring constraints via XML / YAML / PHP attributes is **not
affected** - the validator loaders pass options as named arguments
automatically (no deprecation).
- Only **direct PHP instantiation** using the array syntax (`new
SomeConstraint(['message' => '...'])`) emits a deprecation; switch to
named arguments (`new SomeConstraint(message: '...')`).

Most of the constructor changes are cherry-picked from the `symfony-8`
branch (PR #18803) and adapted to preserve backward compatibility with
the deprecation layer. On top of that, this PR also covers several
remaining constraints with configurable options that were missed there.

Documented in `UPGRADE-2.3.md`.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

# Release Notes

* **New Features**
* Added Symfony validator named-arguments support across many constraint
classes for clearer configuration.

* **Deprecated**
* Array-based constraint configuration is deprecated (removal planned
for Sylius 3.0); use named arguments instead.
* Constraint message option/property names have been normalized to
`*Message` variants; legacy names remain temporarily but are deprecated.

* **Bug Fixes**
* Validator violation messages now consistently use the new `*Message`
properties.

* **Documentation**
* Updated upgrade guide with migration examples and the message option
rename mapping.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-18 15:49:21 +02:00
Grzegorz Sadowski
8b4f03687e
[Validator] Move constraint properties above the constructor 2026-06-18 15:20:13 +02:00
Grzegorz Sadowski
e0ad785f8b
[Validator] Order constraint constructor arguments consistently 2026-06-18 15:16:41 +02:00
Grzegorz Sadowski
180de9d403
[Validator] Use constructor property promotion for constraint messages 2026-06-18 15:09:40 +02:00
Mateusz
cafc7ff9e9
Merge branch '2.2' into fix/discriminator-subclass-iri-generation 2026-06-18 15:03:54 +02:00
Mateusz
5d781137d4 Move IriConverter constructor change out of Deprecation section in UPGRADE-2.2.md 2026-06-18 14:53:36 +02:00
Kamil Grygierzec
e98c819ea4
Update UPGRADE-2.2.md (#19068)
Some checks are pending
Continuous Integration (Minimal) / Static checks (push) Waiting to run
Continuous Integration (Minimal) / Tests (MariaDB) (push) Blocked by required conditions
Continuous Integration (Minimal) / Tests (MySQL) (push) Blocked by required conditions
Continuous Integration (Minimal) / Javascript Tests (MySQL) (push) Blocked by required conditions
Continuous Integration (Minimal) / Tests (PostgreSQL) (push) Blocked by required conditions
Continuous Integration (Minimal) / Frontend (push) Blocked by required conditions
Continuous Integration (Minimal) / Packages (push) Blocked by required conditions
| Q               | A
|-----------------|-----
| Branch?         | 2.2
| Bug fix?        | no
| New feature?    | no
| Backward compatibility breaks?      | no
| License         | MIT

Fixes a description error in the UPGRADE-2.2.md file.
2026-06-18 14:36:52 +02:00
Tomasz Kaliński
536acb44a9 Update UPGRADE-2.2.md 2026-06-18 14:12:21 +02:00
Grzegorz Sadowski
1dcd199c39
[Validator] Rename constraint message options to consistent *Message convention 2026-06-18 14:05:37 +02:00
Grzegorz Sadowski
6a7a20f3e5
[ApiBundle] Restore configurable shippingAddressNotFoundMessage in ChosenShippingMethodEligibility 2026-06-18 14:05:28 +02:00
Grzegorz Sadowski
3e3409d423
[Maintenance] Add UPGRADE-2.3 notes for doctrine-bundle 3 and DBAL 4 2026-06-18 14:05:26 +02:00
Grzegorz Sadowski
5897846cbd
[Maintenance] Add UPGRADE-2.3 note about named arguments in validation constraints 2026-06-18 14:04:56 +02:00
Grzegorz Sadowski
a167cac1db
[Validator] Keep backward-compatible array options with a deprecation 2026-06-18 14:04:30 +02:00
Grzegorz Sadowski
e603a8c63e
[Attribute] Cast min/max to int in Text and Select attribute validation 2026-06-18 14:04:29 +02:00
Grzegorz Sadowski
da25e534a8
[Validator] Cover remaining constraints with named arguments 2026-06-18 14:04:29 +02:00
TheMilek
1c4f891a8c
Fix validation constraints
(cherry picked from commit 4c92845830e3679930f6ab99e73d99090435834a)
2026-06-18 14:04:29 +02:00
TheMilek
d8b1554952
[SF8] Use named arguments for Validator constraint constructor
(cherry picked from commit 2dbad7b21ec17ff5bedd2dcb984f992a23df9d9e)
2026-06-18 14:04:29 +02:00
Kamil Grygierzec
c070c1a1ae
[2.2] Fix SyliusUiBundle compiler passes priority (#19057)
Some checks are pending
Continuous Integration (Minimal) / Static checks (push) Waiting to run
Continuous Integration (Minimal) / Tests (MariaDB) (push) Blocked by required conditions
Continuous Integration (Minimal) / Tests (MySQL) (push) Blocked by required conditions
Continuous Integration (Minimal) / Javascript Tests (MySQL) (push) Blocked by required conditions
Continuous Integration (Minimal) / Tests (PostgreSQL) (push) Blocked by required conditions
Continuous Integration (Minimal) / Frontend (push) Blocked by required conditions
Continuous Integration (Minimal) / Packages (push) Blocked by required conditions
| Q               | A
|-----------------|-----
| Branch?         |2.2
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | fixes #18978
| License         | MIT

https://github.com/Sylius/Sylius/pull/18979
2026-06-18 13:52:19 +02:00
Kamil Grygierzec
9be988f3f1
Filter out disabled products from get by code item endpoint (#19033)
| Q               | A
|-----------------|-----
| Branch?         | 2.2
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Related tickets | fixes #18718
| License         | MIT

## Core feature

`ChannelAndLocaleBasedExtension` now implements
`QueryItemExtensionInterface` in addition to
`QueryCollectionExtensionInterface`. `GET /shop/products/{code}` now
returns 404 when the product is disabled or
not available in the current channel/locale. Both collection and item
queries share a private apply() method. Assert on context keys replaced
with graceful early returns.
2026-06-18 13:51:04 +02:00
Jan Góralski
f745ee5aa0
Allow doctrine/doctrine-bundle ^3.0 and doctrine/dbal ^4.0 (#19064)
Some checks are pending
Continuous Integration (Minimal) / Static checks (push) Waiting to run
Continuous Integration (Minimal) / Tests (MariaDB) (push) Blocked by required conditions
Continuous Integration (Minimal) / Tests (MySQL) (push) Blocked by required conditions
Continuous Integration (Minimal) / Javascript Tests (MySQL) (push) Blocked by required conditions
Continuous Integration (Minimal) / Tests (PostgreSQL) (push) Blocked by required conditions
Continuous Integration (Minimal) / Frontend (push) Blocked by required conditions
Continuous Integration (Minimal) / Packages (push) Blocked by required conditions
| 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 -->
2026-06-18 10:56:49 +02:00
Grzegorz Sadowski
8432f8edb4
[CoreBundle] Centralize all DQL platform checks in PlatformHelper 2026-06-18 10:09:06 +02:00
Grzegorz Sadowski
694c40d7ed
Document removed Doctrine cache provider services in UPGRADE-2.3 2026-06-18 06:51:30 +02:00
Grzegorz Sadowski
acc20b277a
Centralize SQLite platform detection, simplify platform name match, use LogicException 2026-06-18 06:26:24 +02:00
Grzegorz Sadowski
1ab6228718
[CoreBundle] Fix AtomicOrderPromotionsUsageModifier test for DBAL 4 LockMode enum 2026-06-18 06:16:31 +02:00
Grzegorz Sadowski
6dc94c9485
Update symfony.lock 2026-06-18 06:16:30 +02:00
Grzegorz Sadowski
8ff49b1faf
[Maintenance] Add UPGRADE-2.3 notes for doctrine-bundle 3 and DBAL 4 2026-06-18 06:16:28 +02:00
Tomasz Kaliński
271a3bbc38 Update UPGRADE-2.2.md 2026-06-17 16:12:16 +02:00
Tomasz Kaliński
6df4eb7b33 Update CHANGELOG and UPGRADE-API for 2.2.7 release adjustments 2026-06-17 16:03:29 +02:00
Grzegorz Sadowski
209016df32
[Payum] Preserve PaymentSecurityToken BC (revert details to untyped, use custom ObjectType) 2026-06-17 14:33:45 +02:00
TheMilek
3aad5d6fd7
Test doctrinebundle combinations
(cherry picked from commit 408a6bde4d)
2026-06-17 14:33:45 +02:00
TheMilek
5ded5aaff3
Make clock datetimeimmutable compatible with datetime type in mapping
(cherry picked from commit c1f02dd633)
2026-06-17 14:33:45 +02:00
TheMilek
03bd383c9f
Add custom ObjectType for DBAL 4.x compatibility
(cherry picked from commit 2e7d903606)
2026-06-17 14:33:45 +02:00
TheMilek
c976028ee7
Make test mocks compatible with DBAL 3 and 4
(cherry picked from commit e264fac021)
2026-06-17 14:33:44 +02:00
Rafikooo
bd364048bb
Fix DBAL 4.x mock compatibility in tests
- Update DriverMock::connect() signature for DBAL 4.x
- Add return types to DriverConnectionMock methods
- Add return types to StatementMock methods
- Add return types to DatabasePlatformMock methods

(cherry picked from commit 1c9cd7c243)
2026-06-17 14:33:44 +02:00
Rafikooo
c9c81f4b60
Fix DateTime to DateTimeImmutable for DBAL 4.x compatibility
- 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)
2026-06-17 14:33:44 +02:00
Rafikooo
b8a6b7442b
Fix fixture factories for datetime_immutable DBAL type
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)
2026-06-17 14:33:44 +02:00
Rafikooo
97c4a2ebb1
Fix DateTimeImmutable::sub() - assign return value
(cherry picked from commit 39c687ed0e)
2026-06-17 14:33:44 +02:00
Rafikooo
f92ec2b52b
Use DateTimeImmutable in model constructors for DBAL 4.x compatibility
(cherry picked from commit bbb6d00e2f)
2026-06-17 14:33:44 +02:00