Commit graph

40874 commits

Author SHA1 Message Date
Grzegorz Sadowski
7a837f07ec
feat(php-grids): Remove abstract grid usage (#19070)
| Q               | A
|-----------------|-----
| Branch?         | php-grid-configuration
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations? | no <!-- don't forget to update the UPGRADE-*.md file
-->
| Related tickets | 
| 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-23 14:23:54 +02:00
Loïc Frémont
c40a6ff968 feat(php-grids): Remove abstract grid usage 2026-06-19 17:43:05 +02:00
mamazu
d2adc9e156 Reworking the upgrade guide
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
2026-06-16 10:35:42 +02:00
mamazu
4f0c12a7dc Replacing getName with attributes 2026-06-16 10:16:07 +02:00
mamazu
b82b6a07f0 Finishing the PR with all grids
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
2026-06-14 21:13:19 +02:00
mamazu
0f72863478 Merge remote-tracking branch 'upstream/2.3' into php-grid-configuration
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
2026-06-14 19:29:31 +02:00
Kamil Grygierzec
340fce0744
[DX] Catalog price display (#19032)
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?    | yes
| BC breaks?      | no
| Deprecations?   | yes
| Related tickets | mentioned in #18142
| License         | MIT

## Summary

This PR implements **Alternative A** proposed in #18142 — a dedicated
`CatalogPricesCalculatorInterface` to semantically separate catalog
display pricing from cart/order pricing.

The original PR introduced a plain service alias without any PHP-level
distinction. After review feedback from @diimpp, the approach was
refined: instead of an invisible alias, we introduce a **real PHP
contract** that communicates intent and enables clean decoration via
Symfony's DI.

## Problem

Sylius currently uses a single `sylius.calculator.product_variant_price`
for both catalog display and cart/order processing. Decorating it to
customize catalog display (e.g. B2B list prices, EU OSS VAT, Omnibus
compliance) inevitably affects cart totals, order recalculation, and the
promotion engine — a tight coupling that every other major PHP
e-commerce framework (Magento, Shopware, PrestaShop, WooCommerce) has
already solved.

## Solution

### New interface

```php
namespace Sylius\Component\Core\Calculator;

/**
 * Calculates prices for catalog display purposes (product listings, detail pages, API responses).
 *
 * This is intentionally distinct from ProductVariantPricesCalculatorInterface used in cart/order
 * processing, allowing independent customization of display pricing (e.g., B2B list prices,
 * EU Omnibus Directive compliance, geo-pricing, OSS VAT destination-based rules).
 *
 * Decorate this interface to customize catalog display pricing without any risk of side effects
 * on cart totals, order processing, or promotion engines.
 */
interface CatalogPricesCalculatorInterface extends ProductVariantPricesCalculatorInterface
{
}
```

`ProductVariantPriceCalculator` implements both interfaces — **zero
functional change** for existing installations.

### Catalog-facing consumers updated

| Service / Class | Context |
|---|---|
| `sylius.twig.extension.price` / `PriceExtension` | Twig price filters
|
| `sylius_api.normalizer.product_variant` / `ProductVariantNormalizer` |
API serialization |
| `sylius_shop.twig.component.product.price` / `PriceComponent` | Shop
price component |
| `sylius_shop.twig.component.product.card` / `CardComponent` | Shop
product card |
| `sylius.provider.product_variant_map.price` /
`ProductVariantPriceMapProvider` | JS variant switching |
| `sylius.provider.product_variant_map.original_price` /
`ProductVariantOriginalPriceMapProvider` | JS variant switching |
| `sylius.provider.product_variant_map.lowest_price` /
`ProductVariantLowestPriceMapProvider` | JS variant switching |

### Cart/order consumers intentionally unchanged

| Service | Context |
|---|---|
| `sylius.order_processing.order_prices_recalculator` | Cart/order
processing |
| `sylius.filter.promotion.price_range` | Promotion engine |

## Result

Developers can now decorate **only catalog display pricing** without
touching cart totals:

```php
$services
    ->decorator(CatalogPricesCalculatorInterface::class)
    ->class(MyB2BCatalogPriceCalculator::class)
;
```



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

* **Deprecations**
* Passing the legacy product-variant pricing calculator into
catalog-facing classes now emits deprecation warnings; implementors
should migrate to the new catalog-focused calculator interface (required
in Sylius 3.0).

* **Refactor**
* Introduced a catalog-focused price calculator interface and adapted
core components to accept it.

* **Chores**
* Core service wiring updated to use the new catalog calculator for
catalog/listing/price components.

* **Documentation**
  * Added upgrade guide section with migration instructions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-09 11:42:21 +02:00
Francis Hilaire
85a9294c3f
fix: wrong position of the deprecations 2026-06-09 11:23:55 +02:00
Francis Hilaire
41c5b4f3bc
[DX] Wire CatalogPricesCalculatorInterface to all catalog-facing services
Register sylius.calculator.product_variant_catalog_price (same implementation as
sylius.calculator.product_variant_price, independently decoratable) and wire it
to all catalog display consumers:

- sylius.twig.extension.price (Twig price filters)
- sylius_api.normalizer.product_variant (API serialization)
- sylius_shop.twig.component.product.price (shop price component)
- sylius_shop.twig.component.product.card (shop product card)
- sylius.provider.product_variant_map.price (JS variant switching)
- sylius.provider.product_variant_map.original_price
- sylius.provider.product_variant_map.lowest_price

Cart/order consumers (OrderPricesRecalculator, PriceRangeFilter) intentionally
remain on sylius.calculator.product_variant_price.

# Conflicts:
#	src/Sylius/Bundle/ApiBundle/Resources/config/services/serializers.xml
#	src/Sylius/Bundle/CoreBundle/Resources/config/services.xml
#	src/Sylius/Bundle/CoreBundle/Resources/config/services/product_variant_map.xml
#	src/Sylius/Bundle/CoreBundle/Resources/config/services/templating.xml
#	src/Sylius/Bundle/ShopBundle/Resources/config/services/twig/component/product.xml
2026-06-03 18:37:04 +02:00
Francis Hilaire
5379ccd3ae
[Core] Introduce CatalogPricesCalculatorInterface for catalog display pricing
Add a dedicated interface for catalog-facing price calculations, distinct from
ProductVariantPricesCalculatorInterface which is used in cart/order processing.

This semantic contract allows developers to decorate catalog display pricing
independently (e.g. EU OSS VAT, B2B list prices, Omnibus Directive compliance)
without risk of side effects on cart totals or order processing.

ProductVariantPriceCalculator now implements both interfaces, preserving full
backward compatibility while satisfying both injection points.
2026-06-03 18:26:14 +02:00
Kamil Grygierzec
bc95be8333
feat(fixtures): Allow translations on product attributes & values (#19004)
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?    | yes
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | 
| License         | MIT

<!--
 - Bug fixes must be submitted against the 1.14 or 2.1 branch
 - Features and deprecations must be submitted against the 2.2 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
-->

Currently, we are not able to define product attributes and product
options in several locales.
This PR allows us to use the same system we already defined in Taxon
fixtures.

Example:
```yaml
dress_option:
    name: product_option
    options:
        custom:
            -   name: 'Dress height'
                code: 'dress_height'
                values:
                    dress_height_petite: 'Petite'
                    dress_height_regular: 'Regular'
                    dress_height_tall: 'Tall'
                translations:
                    fr_FR:
                        values:
                            dress_height_petite: 'Petite'
                            dress_height_regular: 'Moyenne'
                            dress_height_tall: 'Grande'
```

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

* **New Features**
* Product attributes and options now support per-locale display names
and per-locale option value labels via a translations configuration.

* **Fixtures**
* Fixture schemas accept a translations section for attributes and
options.
* Sample fixtures updated with en_US/fr_FR translations for attributes
and option values.

* **Tests**
* Added/updated tests verifying locale-dependent names and
locale-specific option value labels.

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Sylius/Sylius/pull/19004)
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-03 13:03:35 +02:00
Loïc Frémont
922ed066c1 Apply suggestions from code review 2026-06-02 16:01:19 +02:00
Kamil Grygierzec
297e5a06ba
ECS fixes (#19043)
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
| License         | MIT
2026-06-02 15:48:04 +02:00
Tomasz Kaliński
0e881718f6 ECS fixes 2026-06-02 15:20:07 +02:00
Kamil Grygierzec
8069a6c36d
[UPMERGE] 2.2 -> 2.3 (#18955)
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
This PR has been generated automatically.
For more details see
[upmerge_pr.yaml](/Sylius/Sylius/blob/2.3/.github/workflows/upmerge_pr.yaml).

**Remember!** The upmerge should always be merged with using `Merge pull
request` button.

In case of conflicts, please resolve them manually with usign the
following commands:
```
git fetch upstream
gh pr checkout <this-pr-number>
git merge upstream/2.3 -m "Resolve conflicts between 2.2 and 2.3"
```

If you use other name for the upstream remote, please replace `upstream`
with the name of your remote pointing to the `Sylius/Sylius` repository.

Once the conflicts are resolved, please run `git merge --continue` and
push the changes to this PR.

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

* **New Features**
* Added admin "show" pages for products, customers, orders, shipments
and catalog promotions.
* Checkout blocks placing orders when selected payment method is
unavailable for the active channel.

* **Bug Fixes**
  * Address updates accept province-name-only inputs.
  * Flash alert class mapping corrected.
* Restored missing admin show titles and missing-translation UI
indicators.

* **Tests**
* Added UI/API and unit tests plus fixtures for channel-based payment
eligibility and province/address behaviors.

* **Documentation**
* Updated upgrade notes covering locale resolution and payment-method
eligibility.

* **Chores**
  * Mailer manager services made public.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-02 14:15:27 +02:00
TheMilek
280b4e5524
Resolve conflicts between 2.2 and 2.3 2026-06-02 13:52:15 +02:00
Grzegorz Sadowski
80cfea8f52
Fix application's version
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
2026-06-02 12:50:57 +02:00
Grzegorz Sadowski
a90d41c9bf
Change application's version to v2.2.7-dev 2026-06-02 12:48:34 +02:00
Grzegorz Sadowski
a1a074a079
Generate changelog for v2.2.6 2026-06-02 12:48:14 +02:00
Grzegorz Sadowski
1da96abc9c
Change application's version to v2.2.6 2026-06-02 12:47:08 +02:00
Grzegorz Sadowski
45c6c33184
[UPMERGE] 2.1 -> 2.2 (#19042)
This PR has been generated automatically.
For more details see
[upmerge_pr.yaml](/Sylius/Sylius/blob/2.3/.github/workflows/upmerge_pr.yaml).

**Remember!** The upmerge should always be merged with using `Merge pull
request` button.

In case of conflicts, please resolve them manually with usign the
following commands:
```
git fetch upstream
gh pr checkout <this-pr-number>
git merge upstream/2.2 -m "Resolve conflicts between 2.1 and 2.2"
```

If you use other name for the upstream remote, please replace `upstream`
with the name of your remote pointing to the `Sylius/Sylius` repository.

Once the conflicts are resolved, please run `git merge --continue` and
push the changes to this PR.
2026-06-02 12:43:40 +02:00
TheMilek
197648f0ed
Resolve conflicts between 2.1 and 2.2 2026-06-02 12:43:00 +02:00
Grzegorz Sadowski
9315d9e1f4
[UPMERGE] 2.1 -> 2.2 (#19041)
This PR has been generated automatically.
For more details see
[upmerge_pr.yaml](/Sylius/Sylius/blob/2.3/.github/workflows/upmerge_pr.yaml).

**Remember!** The upmerge should always be merged with using `Merge pull
request` button.

In case of conflicts, please resolve them manually with usign the
following commands:
```
git fetch upstream
gh pr checkout <this-pr-number>
git merge upstream/2.2 -m "Resolve conflicts between 2.1 and 2.2"
```

If you use other name for the upstream remote, please replace `upstream`
with the name of your remote pointing to the `Sylius/Sylius` repository.

Once the conflicts are resolved, please run `git merge --continue` and
push the changes to this PR.
2026-06-02 12:37:42 +02:00
TheMilek
903f5f5d1e
Resolve conflicts between 2.1 and 2.2 2026-06-02 12:21:47 +02:00
Grzegorz Sadowski
f2914c3200
Change application's version to v2.1.16-dev
Some checks failed
Continuous Integration (Minimal) / Static checks (push) Has been cancelled
Continuous Integration (Minimal) / Tests (MySQL) (push) Has been cancelled
Continuous Integration (Minimal) / Tests (MariaDB) (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
2026-06-02 12:19:24 +02:00
Grzegorz Sadowski
894f297317
Generate changelog for v2.1.15 2026-06-02 12:18:44 +02:00
Grzegorz Sadowski
673da7c3a7
Change application's version to v2.1.15 2026-06-02 12:17:23 +02:00
Grzegorz Sadowski
e837ef08a7
[2.1] Check payment request ownership (#19040)
| Q               | A
|-----------------|-----
| Branch?         | 2.1 <!-- see the comment below -->
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| 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-02 12:07:05 +02:00
Grzegorz Sadowski
eed16c4c7c
[2.1][API] Enforce channel eligibility check when changing payment method via account endpoint (#19039)
| Q               | A
|-----------------|-----
| Branch?         | 2.1 <!-- see the comment below -->
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| 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-02 12:06:22 +02:00
Grzegorz Sadowski
e8764931d7
[2.1] Prevent stale cart LiveComponents from mutating completed orders (#19038)
| Q               | A
|-----------------|-----
| Branch?         | 2.1 <!-- see the comment below -->
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| 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-02 12:05:30 +02:00
TheMilek
0af90b6e96
Check payment request ownership on POST 2026-06-02 08:50:05 +02:00
Wojdylak
19dbca7440
Cover createdByGuest case in payment request ownership 2026-06-02 08:50:05 +02:00
TheMilek
77f3d23992
Check payment request ownership 2026-06-02 08:50:04 +02:00
Tomasz Kaliński
4c120f3f05 Prevent stale cart LiveComponents from mutating completed orders 2026-05-27 12:45:01 +02:00
Grzegorz Sadowski
177b60dbeb
[API] Make PaymentMethodChanger resolver argument nullable 2026-05-26 12:23:22 +02:00
Grzegorz Sadowski
1178ecb72b
[API] Enforce channel eligibility check when changing payment method via account endpoint 2026-05-26 12:23:15 +02:00
Grzegorz Sadowski
6f5464b6a9
[API] Add regression tests for payment method channel eligibility 2026-05-26 12:23:08 +02:00
Grzegorz Sadowski
5aa6e48fa3
[API] Slim down Swagger UI override and drop broken auto-auth JS (#19026)
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.2
| Bug fix?        | yes?
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | 
| 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-05-25 11:27:45 +02:00
Grzegorz Sadowski
3f1297c409
[API] Slim down Swagger UI override and drop broken auto-auth JS 2026-05-25 10:44:45 +02:00
Michał Pysiak
805b660545
[API] Add regression tests for cross-customer cart item access (#19025)
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
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | 
| 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-05-25 10:17:08 +02:00
Grzegorz Sadowski
048b69ad44
[API] Add regression tests for cross-customer cart item access 2026-05-25 09:36:39 +02:00
Grzegorz Sadowski
45e654e831
[2.2] [AttributeBundle] make Add and Delete button translatable in product attribute select type (#19024)
| Q               | A
|-----------------|-----
| Branch?         | 2.2
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | fixes #X
| License         | MIT

**Description**

So far it wasnt possible to translate the "Add" and "Delete" button when
creating Product Attributes with the "Select" type.

<img width="1289" height="884" alt="image"
src="https://github.com/user-attachments/assets/1e06ff47-4b88-4663-a7c1-61cca8c67464"
/>
2026-05-25 06:36:21 +02:00
Simon Krull
8346daac29 [2.2] [AttributeBundle] make add and delete button translatable in product attribute select 2026-05-24 11:33:54 +02:00
Karol Wojdyła
5bac4c62cb
[Admin] Support clickable navbar notifications with translation parameters (#19015)
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
| Q               | A
|-----------------|-----
| Branch?         | 2.3
| Bug fix?        | no
| New feature?    | yes
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | 
| License         | MIT

Extends the admin navbar notifications contract so plugins can surface
clickable, parameterized notifications without overriding the navbar
template.

Each notification returned by a `NotificationProviderInterface` may now
carry five optional keys honored by the default template:

  - `message_parameters` — passed to `|trans`
- `uri` (string, optional) — plain URI used as the notification link,
takes precedence over `route` when both are present
- `route` + `route_parameters` — when present, the item renders as `<a
href="{{ path(...) }}">`
  - `translation_domain` — passed to `|trans`
- `type` (`info` | `warning` | `danger`, default `danger`) — drives
status-dot color

The loop body in `notifications.html.twig` is now emitted through a twig
hook (`sylius_admin.common.component.navbar.items.notifications.item`,
default node), so plugins can also fully replace the item rendering by
registering their own node with higher priority.

Fully backward compatible: existing providers returning only `message`
render identically.


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

* **New Features**
* Navbar notifications are now rendered via pluggable items, supporting
clickable links (URI or route), translated messages with parameters, and
configurable status types (info, warning, danger; default danger).

* **Tests**
* Added tests to ensure notification payloads—including optional fields
and routing—are preserved end-to-end.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Sylius/Sylius/pull/19015?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-21 15:00:30 +02:00
Karol Wojdyła
d57823973a
[ApiBundle] Fix 404 on GET /shop/products/{code} when all associated products are disabled (#19018)
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
| Q               | A
|-----------------|-----
| Branch?         | 2.2
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | https://github.com/Sylius/Sylius/issues/19013
| License         | MIT

  ### Summary

`GET /api/v2/shop/products/{code}` returned **404** for an `enabled`
product whenever
*all* of its associated products (across all its associations) were
disabled.

  Root cause: `EnabledWithinProductAssociationExtension` applied
`andWhere('product.associations IS EMPTY OR associatedProduct.id IS NOT
NULL')`
both in `applyToCollection` and `applyToItem`. For an item query, the OR
collapsed
to `false` whenever the product had associations but none of their
associated
  products were enabled — excluding the product itself from the result.

  ### Fix

Removed the `andWhere` from the extension. Eager-loading of enabled
associated
products (`LEFT JOIN ... WITH associatedProduct.enabled = true`) stays
in place
and mirrors the convention used by the neighbouring
`EnabledVariantsExtension`.
2026-05-21 14:14:32 +02:00
Grzegorz Sadowski
249fedec2b
Add appendError method to ResponseCheckerInterface (#19017)
| Q               | A
|-----------------|-----
| Branch?         | 2.2
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | 
| License         | MIT

A missing interface method signature `appendError` is missing in the
`ResponseCheckerInterface`, I don't know why PHPStan did not spot this
but this method is used here :
https://github.com/Sylius/Sylius/blob/2.2/src/Sylius/Behat/Client/ApiPlatformClient.php#L357
therefore the interface method must exists.
2026-05-21 13:40:11 +02:00
Michał Kaczmarek
cb751d0bb7 Fix 404 bug for endpoint api 2026-05-21 12:57:10 +02:00
Grzegorz Sadowski
d42ea9117e
[Admin] Support plain URIs in navbar notifications and refine item template 2026-05-21 12:50:16 +02:00
Francis Hilaire
b07a3db6d2
Add appendError method to ResponseCheckerInterface 2026-05-21 12:39:04 +02:00
Grzegorz Sadowski
405f0346b3
[Admin] Support clickable navbar notifications with translation parameters 2026-05-21 06:28:52 +02:00