Commit graph

27187 commits

Author SHA1 Message Date
Rafikooo
85f17ce969
[Composer] Add conflict with doctrine/annotations: ^2.0 2023-01-09 13:01:32 +01:00
Rafikooo
7624482c42
[Fix] Symfony container reanimation after friendsofsymfony/rest-bundle: 3.5.0 release 2023-01-09 10:37:52 +01:00
Grzegorz Sadowski
99ea2ba572
bug #14669 Wrong Rounding of the prices in the percentage discount catalog promotions (maxmishyn, everwhatever)
This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.11|
| Bug fix?        | yes |
| New feature?    | no |
| BC breaks?      | no  |
| Deprecations?   | no |
| Related tickets | [fixes](https://github.com/Sylius/Sylius/issues/14522)  |
| License         | MIT                                                          |



Commits
-------

0d6d5a15cc [CatalogPromotions] Fixed percentage discount prices rounding
1ccc7a3640 modify tests
ccacebd290 fix behat
2023-01-05 08:33:13 +01:00
Grzegorz Sadowski
2e9acc90c2
bug #14678 [UX] Fix cart button on small screens (NoResponseMate)
This PR was merged into the 1.11 branch.

Discussion
----------

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

Clicking the cart button when the screen cannot accommodate the popup will now redirect to the cart instead of throwing a console error and doing nothing.

Commits
-------

aa2d054810 [UX] Fix cart button on small screens
2023-01-04 11:26:55 +01:00
Jan Goralski
aa2d054810
[UX] Fix cart button on small screens 2023-01-04 08:26:29 +01:00
Grzegorz Sadowski
50c9d31096
minor #14677 [Maintenance] Remove Doctrine's LifecycleEventArgs deprecations (NoResponseMate)
This PR was merged into the 1.11 branch.

Discussion
----------

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

Commits
-------

d718751f68 [Maintenance] Remove Doctrine's LifecycleEventArgs deprecations
2023-01-04 07:47:05 +01:00
Grzegorz Sadowski
8bc8b72114
minor #14682 It's 2023! 🎉 (coldic3)
This PR was merged into the 1.11 branch.

Discussion
----------

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


Commits
-------

5ba04c0534 It's 2023!
2023-01-04 07:35:27 +01:00
Kevin Kaniaburka
5ba04c0534
It's 2023! 2023-01-03 16:55:57 +01:00
Jan Goralski
d718751f68
[Maintenance] Remove Doctrine's LifecycleEventArgs deprecations 2023-01-03 15:41:25 +01:00
Grzegorz Sadowski
ff6365421f
refactor #13689 Fix typo in sylius_order state machine callback (vvasiloi, Rafikooo, Zales0123)
This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A
| --------------- | -----
| Branch?         | 1.11
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | fixes #13688, replaces #12762 and #12286
| License         | MIT

Credits to @DennisdeBest and @antiseptikk for the previous PRs and to @AymLaf for the reminder.

Commits
-------

6ebbc411d7 Fix typo in sylius_order state machine callback
1260a85012 Add deprecation notice and BC layer
d3e76eb38b Add unit test for CancelOrderStateMachineCallbackPass
bf5838f43c Add convertDeprecationsToExceptions to Core Bundle's phpunit config
3ee618ceaf Add the ability to install jms/serializer-bundle:^4.0 version
96cdffefee Fix static checks
5fabb8377c [Hot-fix] Do not fail scenario after 422 response page
2023-01-03 15:20:58 +01:00
Mateusz Zalewski
5fabb8377c
[Hot-fix] Do not fail scenario after 422 response page 2023-01-03 11:04:42 +01:00
Rafikooo
96cdffefee
Fix static checks 2023-01-03 09:15:03 +01:00
Rafikooo
3ee618ceaf
Add the ability to install jms/serializer-bundle:^4.0 version 2023-01-03 09:15:03 +01:00
Victor Vasiloi
bf5838f43c
Add convertDeprecationsToExceptions to Core Bundle's phpunit config 2023-01-03 09:15:02 +01:00
Victor Vasiloi
d3e76eb38b
Add unit test for CancelOrderStateMachineCallbackPass 2023-01-03 09:15:02 +01:00
Victor Vasiloi
1260a85012
Add deprecation notice and BC layer 2023-01-03 09:15:02 +01:00
Victor Vasiloi
6ebbc411d7
Fix typo in sylius_order state machine callback 2023-01-03 09:15:01 +01:00
everwhatever
ccacebd290 fix behat 2022-12-27 09:01:15 +01:00
Mateusz Zalewski
da0afda45e
refactor #14659 [CS][DX] Refactor (bot@sylius.org)
This PR was merged into the 1.11 branch.

Discussion
----------

This PR has been generated automatically.
For more details see [refactor.yml](/Sylius/Sylius/blob/1.12/.github/workflows/refactor.yml).

Commits
-------

325d8976f7 [CS][DX] Refactor
2022-12-27 08:24:21 +01:00
everwhatever
1ccc7a3640 modify tests 2022-12-27 08:15:06 +01:00
Max Mishyn
0d6d5a15cc [CatalogPromotions] Fixed percentage discount prices rounding 2022-12-27 07:24:44 +01:00
Sylius Bot
325d8976f7 [CS][DX] Refactor 2022-12-26 02:24:25 +00:00
Kamil Grygierzec
416e16681e
minor #14662 Improve loading taxons (jakubtobiasz)
This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.11                  |
| Bug fix?        | yes                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no <!-- don't forget to update the UPGRADE-*.md file --> |
| Related tickets | fixes/closes #11145                      |
| License         | MIT                                                          |

Previously when loading taxons we've been performing plenty of queries due to lazy loading. Changing fetch mode to eager seemed not to work, and also wasn't a desired solution. Two-step hydration instead solved the problem.

I am unable to include "before" results as debug toolbar can't finish loading :|. So as reference, let's use the screenshots from #11145. For 5000 taxons we were executing about ~12.000 queries (it depends on the level of nesting and other factors). For 1000 taxons locally, I've got about 2.000 queries.

Here are the results for 2.000 taxons (in the shop enabled is about 1/3 of that):

Admin Panel:
<img width="159" alt="CleanShot 2022-12-21 at 12 55 37@2x" src="https://user-images.githubusercontent.com/80641364/208899596-1b02c50c-2ecc-48f5-ac1d-f76d56d4c6aa.png">

Shop:
<img width="141" alt="CleanShot 2022-12-21 at 12 56 04@2x" src="https://user-images.githubusercontent.com/80641364/208899679-949d89ea-6691-42f0-ad52-805d7011d6cc.png">






Commits
-------

8ce40d23d5 Add two-step hydration when querying taxons
2022-12-22 15:06:57 +01:00
Jakub Tobiasz
11e59732d8
minor #14651 Remove unit from shipment (kayue, everwhatever)
This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.11  |
| Bug fix?        | yes  |
| New feature?    | no |
| BC breaks?      | no |
| Deprecations?   | no |
| Related tickets | [ticket](https://github.com/Sylius/Sylius/pull/14133)  |
| License         | MIT                                                          |



Commits
-------

981951509a Disassociate OrderItemUnit from all shipments before removal
3889e688a9 add spec
2022-12-22 13:17:18 +01:00
Jakub Tobiasz
2bb3a0f0a1
minor #12712 Fix sprintf parameters order (Creeperface01)
This PR was merged into the 1.11 branch.

Discussion
----------

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

<!--
 - Bug fixes must be submitted against the 1.9 or 1.10 branch (the lowest possible)
 - Features and deprecations must be submitted against the master 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
-->


Commits
-------

b71a67aa25 Fix sprintf parameters order
9f4f4b1677 Update AvailableProductOptionValuesResolverSpec.php
2022-12-22 12:34:36 +01:00
Jakub Tobiasz
54c9a42663
minor #13157 Add missing space to taxes <tr> (pavol-tuka)
This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A
| --------------- | -----
| Branch?         | 1.11
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| License         | MIT

Commits
-------

c5f9458ecd Add missing space to taxes <tr>
2022-12-22 11:50:18 +01:00
Pavol Tuka
c5f9458ecd
Add missing space to taxes <tr> 2022-12-22 10:16:07 +01:00
Creeperface01
9f4f4b1677
Update AvailableProductOptionValuesResolverSpec.php 2022-12-22 10:13:18 +01:00
Creeperface01
b71a67aa25
Fix sprintf parameters order 2022-12-22 10:12:42 +01:00
Jakub Tobiasz
8ce40d23d5
Add two-step hydration when querying taxons 2022-12-21 15:33:35 +01:00
Jakub Tobiasz
2abf0ddd66
minor #14661 [Maintenance][Psalm] Add LifecycleEventArgs to deprecated classes (Rafikooo)
This PR was merged into the 1.11 branch.

Discussion
----------

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

Reference:
https://github.com/doctrine/orm/releases/tag/2.14.0
<!--
 - Bug fixes must be submitted against the 1.11 or 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
-->


Commits
-------

f3b294bc59 [Maintenance][Psalm] Add Doctrine\ORM\Event\LifecycleEventArgs to deprecated classes
a2710242de [PHPStan] Exclude Sylius\Bundle\CoreBundle\Doctrine\DQL\Month class
2022-12-20 16:29:02 +01:00
Rafikooo
a2710242de
[PHPStan] Exclude Sylius\Bundle\CoreBundle\Doctrine\DQL\Month class 2022-12-20 14:41:29 +01:00
Rafikooo
f3b294bc59
[Maintenance][Psalm] Add Doctrine\ORM\Event\LifecycleEventArgs to deprecated classes 2022-12-20 14:41:16 +01:00
Grzegorz Sadowski
ea286af66b
bug #14650 Validate existence of coupon (bashilbers, everwhatever)
This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.11  |
| Bug fix?        | yes |
| New feature?    | no |
| BC breaks?      | no |
| Deprecations?   | no |
| Related tickets | [ticket](https://github.com/Sylius/Sylius/pull/13741/files)       |
| License         | MIT                                                          |


Commits
-------

daba045e67 Validate existence of coupon
6a2515a4bf add test
2022-12-16 13:59:38 +01:00
everwhatever
3889e688a9 add spec 2022-12-16 12:34:40 +01:00
Kayue Yeung
981951509a Disassociate OrderItemUnit from all shipments before removal 2022-12-16 11:44:01 +01:00
everwhatever
6a2515a4bf add test 2022-12-16 11:38:24 +01:00
Sebastiaan Hilbers
daba045e67 Validate existence of coupon 2022-12-16 11:31:38 +01:00
Grzegorz Sadowski
b5a0ec116f
bug #14643 [ProductAssociation] Fix empty product associations (coldic3)
This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.11 |
| Bug fix?        | yes                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no |
| Related tickets | fixes https://github.com/Sylius/Sylius/pull/14600                      |
| License         | MIT                                                          |

See the discussion: https://github.com/Sylius/Sylius/pull/14600#issuecomment-1351053306

Commits
-------

1cc89537f1 [ProductAssociation] Fix empty product associations
2022-12-16 08:44:25 +01:00
Grzegorz Sadowski
75ade84fec
minor #14645 Move Upgrade API from 1.11.11 to 1.11.12 section to the top of file (jakubtobiasz)
This PR was merged into the 1.11 branch.

Discussion
----------

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

"Implementing" suggestion from @GSadee.


Commits
-------

28a469e459 Move Upgrade API from 1.11.11 to 1.11.12 section to the top of file
2022-12-15 14:37:31 +01:00
Jakub Tobiasz
28a469e459
Move Upgrade API from 1.11.11 to 1.11.12 section to the top of file 2022-12-15 09:58:39 +01:00
Grzegorz Sadowski
df922cdb81
bug #14642 Fix invalid API errors normalization (jakubtobiasz)
This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.11                 |
| Bug fix?        | yes                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no <!-- don't forget to update the UPGRADE-*.md file --> |
| Related tickets | fixes #14391                      |
| License         | MIT                                                          |

So far, on production environment when any non-validation related error occurred, the `FOS\RestBundle\Serializer\Normalizer\FlattenExceptionHandler` was used, even on API Platform endpoints. Now, depending on the path of the request, the `FOS\RestBundle\Serializer\Normalizer\FlattenExceptionHandler` or `ApiPlatform\Hydra\Serializer\ErrorNormalizer` is used.


Commits
-------

1203a7a36c Fix invalid API errors normalization
af04cc897d Fix wrong API's errors normalizer
2022-12-15 08:58:08 +01:00
Grzegorz Sadowski
fc062a269b
bug #14580 [Enchancement] Optimize memory usage by sylius:remove-expired-carts command (jakubtobiasz)
This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.11                  |
| Bug fix?        | I consider memory leaking as a bug                                                       |
| New feature?    | no                                                       |
| BC breaks?      | no                                                       |
| Deprecations?   | no |
| Related tickets |                       |
| License         | MIT                                                          |

This PR focus on optimization, not changing the observable behavior, so it doesn't touch command itself, only the service. Moreover, I would like to thank @vvasiloi for helping with this enhancement. The idea of output changes can be implemented (like in Victor's POC #14569), but I believe it should be done later, and in a separate PR.

![image](https://user-images.githubusercontent.com/80641364/204011380-7c01b23e-bb45-424b-b4e8-f9dfa9cdcc62.png)


Commits
-------

cf7e29b4f8 Optimize memory usage by sylius:remove-expired-carts command
f88b9fdfe2 Merge branch '1.11' into maintenance/optimize-carts-removing
c8100505e2 Change a default value of limit in findCartsNotModifiedSince to null
2022-12-15 07:52:20 +01:00
Jakub Tobiasz
af04cc897d
Fix wrong API's errors normalizer 2022-12-15 06:43:00 +01:00
Jakub Tobiasz
1203a7a36c
Fix invalid API errors normalization 2022-12-14 15:48:10 +01:00
Kevin Kaniaburka
1cc89537f1
[ProductAssociation] Fix empty product associations 2022-12-14 15:38:00 +01:00
Jakub Tobiasz
c8100505e2
Change a default value of limit in findCartsNotModifiedSince to null 2022-12-14 15:01:23 +01:00
Grzegorz Sadowski
207b696790
minor #14575 [DX] Add EditorConfig for test API responses (coldic3)
This PR was merged into the 1.11 branch.

Discussion
----------

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

EditorConfig from the root directory forces us to use 2 indents but in tests, we use 4 instead.

Commits
-------

7748c854f5 [DX] Add .editorconfig for test API responses
2022-12-13 13:48:46 +01:00
Grzegorz Sadowski
be657ba886
bug #14525 Adding skipIf for migrations to allow future runs when they should apply (stefantalen)
This PR was merged into the 1.11 branch.

Discussion
----------

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

<!--
 - Bug fixes must be submitted against the 1.11 or 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
-->
While upgrading to Sylius 1.11 I came across this issue where these migrations were executed but I hadn't set the `MESSENGER_TRANSPORT_DSN` environment variable yet.

This resulted in a diff on my database after I added the variable.

By using the `skipIf()` for these migrations will not be executed, it will just give a notice:

```
[notice] Migration Sylius\Bundle\CoreBundle\Migrations\Version20220203115813 skipped during Execution. Reason: "MESSENGER_TRANSPORT_DSN was not found or is not using Doctrine"
[notice] Migration Sylius\Bundle\CoreBundle\Migrations\Version20220407131547 skipped during Execution. Reason: "messenger_messages table was not found"
```
They keep getting skipped on future runs, however when you add the environment variable they will be executed and only then.

Commits
-------

b60b6190f4 Adding skipIf for migrations to allow future runs when they should apply
2022-12-13 13:38:34 +01:00
Grzegorz Sadowski
b4dd222c20
bug #14289 [Api] Change int to integer in ProductVariant and ShippingMethod documentation normalizers ()
This PR was merged into the 1.11 branch.

Discussion
----------

In the `ProductVariantDocumentationNormalizer`, the `price` and `originalPrice` properties have a manual configuration pushed to the array. In this config, `type` is defined as `int`. The issue here is that `int` is not a valid OpenApi data type. 

The same issue occurs with the `price` property in `ShippingMethodDocumentationNormalizer`.  

This fix simply changes `int` to `integer` for the above three properties. 

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

<!--
 - Bug fixes must be submitted against the 1.11 branch
 - Features and deprecations must be submitted against the 1.12 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
-->


Commits
-------

c7c0bf2b7f [Api] Change int to integer in ProductVariant and ShippingMethod documentation normalizers
2022-12-13 13:30:03 +01:00