Commit graph

1587 commits

Author SHA1 Message Date
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
TheMilek
903f5f5d1e
Resolve conflicts between 2.1 and 2.2 2026-06-02 12:21:47 +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
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
TheMilek
538c6b422e Filter out properly the disabled products from item get by code 2026-06-01 16:13:33 +02:00
Grzegorz Sadowski
6f5464b6a9
[API] Add regression tests for payment method channel eligibility 2026-05-26 12:23:08 +02:00
Grzegorz Sadowski
048b69ad44
[API] Add regression tests for cross-customer cart item access 2026-05-25 09:36:39 +02:00
Michał Kaczmarek
cb751d0bb7 Fix 404 bug for endpoint api 2026-05-21 12:57:10 +02:00
Wojdylak
bdf55e7f43
[ApiBundle][Tests] Add regression test for anonymous cart pickup with registered email 2026-05-18 09:34:54 +02:00
Daniel Lienert
c30e4a4f35
TASK: Add separate tests for setting / updating delivery times 2026-05-10 22:13:50 +02:00
Daniel Lienert
23da96ac0e
BUGFIX: Expose ShippingMethod minDeliveryTimeDays / maxDeliveryTimeDays in admin API
| Q               | A
|-----------------|-----
| Branch?         | 2.2
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | fixes #18986
| License         | MIT
2026-05-10 22:03:52 +02:00
Kamil Grygierzec
29f497a0c7
[UPMERGE] 2.1 -> 2.2 (#18973)
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-04-10 08:12:01 +02:00
Loïc Frémont
98ebb3fa8e Fix admin templates 2026-04-09 16:04:45 +02:00
Marek Rzytki
8a3ab3c62e Add tests for email validation on cart update 2026-04-09 12:35:33 +02:00
Kamil Grygierzec
fcbde944a0
[UPMERGE] 2.1 -> 2.2 (#18949)
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-04-02 09:38:16 +02:00
Kamil Grygierzec
c7abbeefda
[BUGFIX] Allow updating provinceName when provinceCode is null in API (#18926)
| Q               | A
|-----------------|-----
| Branch?         | 2.1
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | fixes https://github.com/Sylius/Sylius/issues/17751
| 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
-->
2026-03-30 15:19:14 +02:00
TheMilek
f07b8c32d5
Resolve conflicts between 2.1 and 2.2 2026-03-27 14:01:30 +01:00
Marek Rzytki
2a960a0093
Update response json to fix tests 2026-03-27 13:35:26 +01:00
Mateusz
71cb8d9b9f Add API test for updating cart address with provinceName only 2026-03-19 09:20:39 +01:00
Jan Goralski
1e226ce8cc
Resolve conflicts between 2.1 and 2.2 2026-03-17 13:54:08 +01:00
Mateusz
0bb7199014 Fix TranslatableDenormalizer for IRI strings and shop customer 404 for guests 2026-03-17 11:25:20 +01:00
Jan Goralski
03a5ba111f
Resolve conflicts between 2.1 and 2.2 2026-03-09 13:52:45 +01:00
TheMilek
4e12579d40
Stan and overall build fixes 2026-03-09 13:25:10 +01:00
TheMilek
5235f8dad6
Resolve conflicts between 2.1 and 2.2 2026-03-06 08:22:28 +01:00
Mateusz
d54e6394bb Fixed build errors 2026-03-05 15:17:05 +01:00
Rafał Jaskulski
a34f0b149f
[UPMERGE] 2.1 -> 2.2 (#18615)
This PR has been generated automatically.
For more details see
[upmerge_pr.yaml](/Sylius/Sylius/blob/2.1/.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.
2025-12-02 22:32:35 +01:00
Rafikooo
c4e372c49f
[Unit] Adjust shop tests 2025-11-29 03:59:14 +01:00
Rafikooo
627ca8d361
[Unit] Adjust admin tests 2025-11-29 03:59:14 +01:00
Rafikooo
404796b102
[Unit] Add PHPUnit-like array difference visualization 2025-11-29 03:59:14 +01:00
Rafikooo
ebda67c620
Resolve conflicts between 2.1 and 2.2 2025-11-28 18:09:31 +01:00
Rafikooo
bbfaa1282e
Move ShippingMethod test to the main tests directory 2025-11-28 15:22:54 +01:00
Rafikooo
26898e6537
[API] Return 422 instead of 400 for missing required fields 2025-11-17 18:34:57 +01:00
Rafał Jaskulski
02ef1456f0
[UPMERGE] 2.1 -> 2.2 (#18511)
This PR has been generated automatically.
For more details see
[upmerge_pr.yaml](/Sylius/Sylius/blob/2.1/.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.
2025-11-04 12:59:57 +01:00
Rafikooo
7fe202341f
[API] Return proper HTTP 422 codes instead of 500 for cart operations 2025-11-03 11:31:32 +01:00
Tomasz Kaliński
fa683584db Add Behat tests for sorting zones by priority 2025-10-30 10:19:46 +01:00
Rafał Jaskulski
bcb251df06
[UPMERGE] 2.1 -> 2.2 (#18462)
This PR has been generated automatically.
For more details see
[upmerge_pr.yaml](/Sylius/Sylius/blob/2.1/.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.
2025-10-21 09:18:19 +02:00
Rafikooo
c5f0f18b8c
Apply ecs fixes 2025-10-17 16:10:30 +02:00
Rafikooo
1dee12721d
Resolve conflicts between 1.14 and 2.1 2025-10-16 12:39:33 +02:00
Rafał Jaskulski
dbbe353756
[SHOP][FEATURE] Introduce address form modifiers in checkout component (#18410)
| Q               | A
|-----------------|-----
| Branch?         | 2.2
| Bug fix?        | no
| New feature?    | yes
| BC breaks?      | no
| Deprecations?   | yes
| Related tickets | https://github.com/Sylius/Sylius/issues/17906
| License         | MIT

This PR introduces a new mechanism for extending the checkout address
`FormComponent` via tagged services implementing
`AddressFormValuesModifierInterface`.

This approach uses dependency injection and a tagged_iterator with the
tag `sylius_shop.modifier.address_form_values`. These modifiers allow
plugins and applications to dynamically transform or enrich the address
data.
2025-10-09 03:38:58 +02:00
Michal Kaczmarek
266ba905f0 Fix assertion wrong eligible checker 2025-10-08 12:26:33 +02:00
Tomasz Kaliński
5e78b96f08 Add PHPUnit test for DefaultAddressFormValuesModifier 2025-10-07 10:56:57 +02:00
Tomasz Kaliński
178e09ae8b Remove optional title and description fields from error response tests, update API Platform dependencies to 4.2.1. 2025-10-03 14:41:34 +02:00
Rafał Jaskulski
d1c9fde8aa
[CI] Test both API Platform ~4.1.0 and ~4.2.0 (#18375)
| Q               | A
|-----------------|-----
| Branch?         | 2.1
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| License         | MIT

Fundamental change in responses:

In 4.2 the proper response is:
\"invalid\" is not configured.",
  "hydra:description": "Filter \"invalid\" is not configured.",
  "hydra:title": "An error occurred"

In comparison to 4.1:
  "hydra:description": "Filter \"invalid\" is not configured.",
  "hydra:title": "An error occurred",
  "title": "An error occurred",
  "description": "Filter

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

- Bug Fixes
- Standardized API error responses: removed duplicated root
title/description/type entries and introduced optional title/description
matchers; hydra fields and error details preserved.

- Documentation
- Added upgrade notes for 2.1.5 → 2.1.6 describing API Platform 4.x
error-field behavior and updated test expectations.

- Chores
- CI: added PHP 8.4 / Symfony 7.3 MariaDB matrix entry and conditional
Api Platform runs with segregated cache keys.

- Tests
- Updated many API response fixtures; tightened mock expectations and
exposed some test data providers.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-09-24 13:16:40 +02:00
Tomasz Kaliński
318a387daa Enhance error response tests by filtering actual content and asserting optional title and description fields. 2025-09-24 12:23:57 +02:00
Tomasz Kaliński
0ed7a42f74 Add optional title and description fields to error responses for improved test compatibility with API Platform 4.2. 2025-09-24 08:52:16 +02:00
Rafał Jaskulski
6e24c4c089
[Composer] Bump PHPUnit to ^11.5 + run Rector rule (#18111)
| Q               | A
|-----------------|-----
| Branch?         | 2.1
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations? | no<!-- don't forget to update the UPGRADE-*.md file
-->
| Related tickets | bases on #18110 
| License         | MIT

<!--
 - Bug fixes must be submitted against the 1.14 or 2.0 branch
 - Features and deprecations must be submitted against the 2.1 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
- Upgraded testing tooling across the project (PHPUnit 11.5 and Symfony
testing libraries 6.0). Updated static analysis configuration.
- Refactor
- Modernized test and bootstrap code (arrow functions, readonly
properties/classes, cleaner imports).
- Improved initialization and request handling robustness in test
applications.
- Tests
- Updated data providers (visibility/static), streamlined callbacks and
expectations, and minor naming cleanups.
- Documentation
  - None.
- Style
  - None.
- New Features
  - None.
- Bug Fixes
  - None.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-09-12 16:33:53 +02:00
Grzegorz Sadowski
d8e9743844
[API] Add variantName serialization groups to OrderItem configuration (#18352)
| Q               | A
|-----------------|-----
| Branch?         | 2.0 or 2.1
| Bug fix?        | no
| New feature?    | yes
| BC breaks?      | no
| Related tickets | fixes https://github.com/Sylius/Sylius/issues/18306
| License         | MIT

Adds variantName to OrderItem in the API .

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

* **New Features**
* Order items now include a human-readable variantName across admin and
shopper surfaces — order lists and details, order item views, cart and
checkout flows (including shipping/payment selection), order completion,
and account order pages — improving clarity when products have multiple
variants.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-09-09 12:21:47 +02:00
Tomasz Kaliński
4c43b96052 Add variantName serialization groups to OrderItem configuration 2025-09-09 10:16:45 +02:00