Commit graph

31178 commits

Author SHA1 Message Date
Jan Góralski
7ef109ad9d
minor #15636 [ECS] Ordered Types Fixer (Rafikooo)
This PR was merged into the 1.13 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.13 <!-- see the comment below -->                  |
| Bug fix?        | no                                                      |
| New feature?    |yes                                                       |
| BC breaks?      | no                                                      |
| Deprecations?   | no<!-- don't forget to update the UPGRADE-*.md file --> |
| License         | MIT                                                          |

Let's eliminate another ambiguous convention 🕺 

Reference: https://github.com/Sylius/Sylius/pull/15598#discussion_r1419413777

Proposal:
- null at the end
- the remaining types in alphabetical order

Commits
-------
  [ECS] Apply ecs fixes
  [ECS] Add union types ordering rule
  [ECS] Apply types order changes
2023-12-14 09:25:55 +01:00
Wojdylak
eb4a50c92b
Update upgrade file 2023-12-14 08:49:47 +01:00
Wojdylak
de77a13d2d
[PromotionBundle] Split PromotionRuleValidator to PromotionRuleGroupValidator and PromotionRuleTypeValidator 2023-12-14 08:49:46 +01:00
Wojdylak
99a94b92a3
[PromotionBundle] Split PromotionActionValidator to PromotionActionGroupValidator and PromotionActionTypeValidator 2023-12-14 08:49:46 +01:00
Wojdylak
c021e3e3a1
Add prefix sylius_ to validation groups 2023-12-14 08:49:46 +01:00
Wojdylak
d56ce734c6
Update upgrade file 2023-12-14 08:49:46 +01:00
Wojdylak
36d2a5ac08
[PromotionBundle] Remove constraints from FormType to avoid double constraints 2023-12-14 08:49:45 +01:00
Wojdylak
53c31aa420
[PromotionBundle] Move logic from PromotionRuleGroupValidator to PromotionRuleValidator 2023-12-14 08:49:45 +01:00
Wojdylak
235c7e0dd5
[PromotionBundle] Move logic from PromotionActionGroupValidator to PromotionActionValidator 2023-12-14 08:49:45 +01:00
Wojdylak
e530c7d9ca
[PromotionBundle] Add parameters validation groups for promotion action and promotion rule 2023-12-14 08:49:44 +01:00
Grzegorz Sadowski
79845047c1
feature #15635 [API][Behat] covering tests for managing promotions (Wojdylak)
This PR was merged into the 1.13 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.13
| Bug fix?        | no
| New feature?    | yes
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | N/A
| License         | MIT


Commits
-------

9e8e797c81 [ApiBundle][ProductTaxon] Move deleting productTaxon to productTaxon resource
59c2798883 [ApiBundle][CatalogPromotion] Add order filters
4036f1f132 [Behat] Add API test coverage for features/promotion/tracking_usage folder
e8f1a0a831 [ApiBundle] Add contract tests for ProductTaxon resource
6de508c911 [ChannelsTest] use inArray to check locales
2023-12-14 07:03:58 +01:00
Rafikooo
81cf65339c
[ECS] Apply types order changes 2023-12-14 01:23:05 +01:00
Rafikooo
fd37696d8a
[ECS] Add union types ordering rule 2023-12-14 01:20:21 +01:00
Rafikooo
02abf30f12
[ECS] Apply ecs fixes 2023-12-14 00:55:25 +01:00
Jan Góralski
c93ec9b091
minor #15627 Add an endpoint exposing customer's statistics (jakubtobiasz)
This PR was merged into the 1.13 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.13
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | n/a
| License         | MIT

![CleanShot 2023-12-11 at 13 28 52@2x](https://github.com/Sylius/Sylius/assets/80641364/692ec7a5-185b-4b13-8fb4-0366abf9fe34)


Commits
-------
  Create the GetCustomerStatistics query and the GetCustomerStatisticsHandler
  Add handling the GetCustomerStatistics query
  Use query_bus instead of command_bus for query handlers
  Use HeadersBuilder in the Customer Statistics API test
2023-12-13 16:55:51 +01:00
Wojdylak
6de508c911
[ChannelsTest] use inArray to check locales 2023-12-13 15:13:43 +01:00
Wojdylak
e8f1a0a831
[ApiBundle] Add contract tests for ProductTaxon resource 2023-12-13 15:02:43 +01:00
Wojdylak
4036f1f132
[Behat] Add API test coverage for features/promotion/tracking_usage folder 2023-12-13 14:32:18 +01:00
Wojdylak
59c2798883
[ApiBundle][CatalogPromotion] Add order filters 2023-12-13 13:37:26 +01:00
Wojdylak
9e8e797c81
[ApiBundle][ProductTaxon] Move deleting productTaxon to productTaxon resource 2023-12-13 13:14:42 +01:00
Jacob Tobiasz
05d55a6a25
minor #14286 Prevent eager loading hundreds of countries (kayue)
This PR was merged into the 1.13 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.11 or 1.12 <!-- see the comment below -->                  |
| Bug fix?        | yes                                                       |
| 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/8632                      |
| License         | MIT                                                          |

Eager loading all countries would add extra 8ms - 10ms overhead to Sylius' boot up time. Creating a draft PR to see what test case would it break first.

Commits
-------
  Prevent eager loading hundreds of countries
2023-12-12 10:55:23 +01:00
Jacob Tobiasz
f12a530c7f
bugfix #15435 [Checkout] Prevent extra fields when login in on addressing page (Jibbarth)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A   |
|-----------------|-----|
| Branch?         | 1.12 |
| Bug fix?        | yes |
| New feature?    | no |
| BC breaks?      | no |
| Deprecations?   | no |
| Related tickets | fixes #15183 |
| License         | MIT |

Refs video in #15183

When we login in addressing page after submit once the page, the reload process after login resubmit data, and keep sending `form[customer][email]`, that it doesn't be added in form. 

So I unset these data on pre-submit. 
I also change the csrf_error message for something more "understandable".

By this way, we can still have previous submitted data for address fields.

![image](https://github.com/Sylius/Sylius/assets/3168281/e53f0c5a-8fe7-4bd7-81b9-021eb8d819b7)

The other way, suggested by @Wojdylak, is to change this line https://github.com/Sylius/Sylius/blob/1.12/src/Sylius/Bundle/UiBundle/Resources/private/js/sylius-api-login.js#L50 
by 
```
window.location = window.location.href;
``` 

But using it, all already filled data are lost.

WDYT ? Would it be acceptable to lose such data, or should we keep them ? 

Commits
-------
  [Checkout] Prevent extra fields when login in on addressing page
  Update src/Sylius/Bundle/CoreBundle/Form/Type/Checkout/AddressType.php
  Add tests that form doesn't display Extra fields error after login in checkout
  Remove fr translation
2023-12-12 10:54:06 +01:00
Jacob Tobiasz
11df996075
Use HeadersBuilder in the Customer Statistics API test 2023-12-12 09:25:28 +01:00
Jacob Tobiasz
906878ce88
Use query_bus instead of command_bus for query handlers 2023-12-12 09:12:03 +01:00
Jacob Tobiasz
ac519402b9
Add handling the GetCustomerStatistics query 2023-12-11 13:18:09 +01:00
Jacob Tobiasz
d4640a6743
Create the GetCustomerStatistics query and the GetCustomerStatisticsHandler 2023-12-11 10:27:12 +01:00
Jacob Tobiasz
d3a441f277
minor #15623 [API][Admin] Cover inventory (NoResponseMate)
This PR was merged into the 1.13 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.13 |
| Bug fix?        | no                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no |
| Related tickets | -                      |
| License         | MIT                                                          |


Commits
-------
  [API][Admin] Cover inventory
2023-12-11 09:09:09 +01:00
Jacob Tobiasz
45f31a9e7b
minor #15616 [API] Finish covering taxation scenarios (NoResponseMate)
This PR was merged into the 1.13 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.13 |
| Bug fix?        | kinda                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no |
| Related tickets | -                      |
| License         | MIT                                                          |

Commits
-------
  [API] Finish covering taxation scenarios
  [API][TaxRate] Treat missing/null amount as default
2023-12-11 09:08:44 +01:00
Jibé Barth
37ec2ae002
Remove fr translation 2023-12-09 12:07:46 +01:00
Jibé Barth
34a36bc0cc
Add tests that form doesn't display Extra fields error after login in checkout 2023-12-09 12:05:37 +01:00
Jibé Barth
282d035167
Update src/Sylius/Bundle/CoreBundle/Form/Type/Checkout/AddressType.php
Co-authored-by: Victor Vasiloi <victor.vasiloi@gmail.com>
2023-12-09 10:06:15 +01:00
Jan Goralski
76b6a2145d
[API][TaxRate] Treat missing/null amount as default 2023-12-08 13:57:31 +01:00
Jan Goralski
86e803b2bf
[API][Admin] Cover inventory 2023-12-08 13:17:58 +01:00
Jan Goralski
0e822a99cf
[API] Finish covering taxation scenarios 2023-12-08 13:17:42 +01:00
Jan Góralski
f161d210a7
[UPMERGE] 1.12 -> 1.13 (#15622)
This PR has been generated automatically.
For more details see
[upmerge_pr.yaml](/Sylius/Sylius/blob/1.13/.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 
git merge upstream/1.13 --no-commit
```

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
change the commit title to
```
Resolve conflicts between 1.12 and 1.13
```
2023-12-08 12:14:59 +01:00
Jan Góralski
02a5770fcf
minor #15615 Use serialized name when displaying an error about a wrong request field type (jakubtobiasz)
This PR was merged into the 1.13 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.13
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | improvement after #15568
| License         | MIT


Commits
-------
  Use serialized name when displaying an error about a wrong request field type
2023-12-08 11:56:07 +01:00
Jan Góralski
1367d004f9
minor #15620 Fix CI (jakubtobiasz)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | n/a
| License         | MIT

In some patch version, Symfony updated the return type for one of the methods to `mixed`. PHPSpec doesn't support this return type, so I had to return `anything` manually.

Commits
-------
  Add missing willReturn method calls to PHPSpecs
2023-12-08 09:29:08 +01:00
Jacob Tobiasz
0caa0a2073
Add missing willReturn method calls to PHPSpecs 2023-12-08 08:49:56 +01:00
Jacob Tobiasz
12c7321f4d
Add support for Panther to CookieSetter service 2023-12-07 18:36:02 +01:00
Jacob Tobiasz
560ce41aee
Fix PHPSpec scenario 2023-12-07 17:51:28 +01:00
Jacob Tobiasz
f7aa75f602
Add a support for Symfony Panther in the JS-based Behats
Co-authored-by: Loic Fremont <lc.fremont@gmail.com>
2023-12-07 17:28:43 +01:00
Kayue Yeung
1a3068a198
Prevent eager loading hundreds of countries 2023-12-07 16:01:57 +01:00
Jacob Tobiasz
da19017f80
minor #15609 [Maintenance][API] Marking more inapplicable scenarios with no-api (NoResponseMate)
This PR was merged into the 1.13 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.13 |
| Bug fix?        | no                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no |
| Related tickets | -                      |
| License         | MIT                                                          |


Commits
-------
  [Maintenance][API] Marking more inapplicable scenarios with no-api
2023-12-07 15:42:59 +01:00
Jacob Tobiasz
8be6ad1500
Use serialized name when displaying an error about a wrong request field type 2023-12-07 15:39:25 +01:00
Jacob Tobiasz
4b0bc53732
minor #15614 [Admin][UI] Fix csrf error breaking admin form (NoResponseMate)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12 |
| Bug fix?        | kinda                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no |
| Deprecations?   | no |
| Related tickets | fixes #15606                      |
| License         | MIT                                                          |

![Screenshot 2023-12-07 at 13 09 32](https://github.com/Sylius/Sylius/assets/9448101/aeef1c28-bed4-4fad-a796-87e78946edcc)


Commits
-------
  [Admin][UI] Fix csrf error breaking admin form
2023-12-07 14:26:54 +01:00
Jan Goralski
a0b5b393c5
[Admin][UI] Fix csrf error breaking admin form 2023-12-07 13:10:26 +01:00
Jan Góralski
9a49368da6
minor #15610 JavaScriptTestHelper: Interval Increase (Rafikooo)
This PR was merged into the 1.13 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.13 <!-- see the comment below -->                  |
| Bug fix?        | no                                                      |
| New feature?    | no                                                      |
| BC breaks?      | no                                                      |
| Deprecations?   | no<!-- don't forget to update the UPGRADE-*.md file --> |
| License         | MIT                                                          |

This PR updates the interval between each test browser element reaching attempt from `0.1s` to `1s`.

Commits
-------
  [Behat] Change JavaScriptTestHelper interval from 0.1s to 1s
2023-12-07 13:01:30 +01:00
Rafikooo
38d2564cc3 [ECS] Apply ecs fixes 2023-12-07 12:58:24 +01:00
Jan Góralski
6351f82b89
minor #15611 Validate Paypal express checkout sandbox field type (TheMilek)
This PR was merged into the 1.13 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.13 <!-- see the comment below -->                  |
| Bug fix?        | yes                                                       |
| New feature?    | no                                                      |
| BC breaks?      | no                                                       |
| License         | MIT                                                          |

<!--
 - Bug fixes must be submitted against the 1.12 branch
 - Features and deprecations must be submitted against the 1.13 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
-->
It is minor fix to https://github.com/Sylius/Sylius/pull/15549 PR


Commits
-------
  Validate Paypal express checkout sandbox field type
2023-12-07 09:03:42 +01:00
Kamil Grygierzec
b2c9fa2f18
Validate Paypal express checkout sandbox field type 2023-12-07 00:30:25 +01:00