Commit graph

29486 commits

Author SHA1 Message Date
Grzegorz Sadowski
b6c348ffa1
Merge branch '1.12' into 1.13
* 1.12:
  Do not hardcode checking cart state in processors
  Determine Order being processable on itself
  Add conflict for doctrine/orm:2.14.2
  [CS][DX] Refactor
  [Tasks] Improve Robo task
  [Product][Association] Fix attaching association with numeric code
2023-04-14 09:18:08 +02:00
Grzegorz Sadowski
1712bfa65e
refactor #14935 [DX] Do not hardcode order state in order processors (Zales0123)
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 |                       |
| License         | MIT                                                          |

Hello everyone 👋

While browsing our order processors, I figure out that they lack some extendability regarding whether they should be run or not. Most of them have hardcoded check if the `$state` is `cart` - which is a good default behavior, but does not have to be right for everyone (imagine we have a `draft` order, that we still want to process, but is not placed yet). If we want to change that, we would have to override the whole processor just to adjust/remove a simple if at the beginning. 

I think such information (whether the order is processable or not) can be a part of the `Order` entity itself. It's easy to override and we avoid some additional services. We could even go further and have other methods like this for specific cases, but let's start simple.

I believe the general rule of thumb regarding the DX and extendability should be "never use any primitive value directly in the condition in any service" (constant is also a value, as it's not easily replaceable 💃).

Cheers 🚀 🖖  

Commits
-------

c19bb1d15b Determine Order being processable on itself
15a38eafb7 Do not hardcode checking cart state in processors
2023-04-14 09:17:46 +02:00
Rafał Jaskulski
85151fa64d
minor #14931 [Behat][API] Checking out as guest with a registered email (coldic3)
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
-------

6b95ae7a8e [Behat][API] Checking out as guest with a registered email
2023-04-14 08:34:22 +02:00
Jakub Tobiasz
895ae9fd63
Cover accessing non-existing product via API scenario 2023-04-14 07:13:57 +02:00
Mateusz Zalewski
15a38eafb7
Do not hardcode checking cart state in processors 2023-04-13 17:03:41 +02:00
Mateusz Zalewski
c19bb1d15b
Determine Order being processable on itself 2023-04-13 16:52:43 +02:00
Kevin Kaniaburka
6b95ae7a8e
[Behat][API] Checking out as guest with a registered email 2023-04-13 15:16:10 +02:00
Grzegorz Sadowski
6f2b081d41
bug #14930 [Maintenance] Fix schema update with longer UserOAuth tokens (NoResponseMate)
This PR was merged into the 1.13 branch.

Discussion
----------

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

The new length was working fine with migrations and caused no issues when using `schema:update` after migrations, but for whatever reason, using only `schema:update` is throwing hissy-fits:

![image](https://user-images.githubusercontent.com/9448101/231735763-e056333a-bf32-4cf3-a119-e10f31bc83a8.png)


Commits
-------

f59304da05 [Maintenance] Fix schema update with longer UserOAuth tokens
2023-04-13 13:31:57 +02:00
Jan Goralski
f59304da05
[Maintenance] Fix schema update with longer UserOAuth tokens 2023-04-13 12:44:00 +02:00
Grzegorz Sadowski
e95f6ee496
bug #14837 [ProductVariant][API] Resource improvements (Rafikooo)
This PR was merged into the 1.13 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         |  1.13 <!-- see the comment below -->                  |
| Bug fix?        | yes https://github.com/Sylius/Sylius/pull/14837/files#diff-da930a9fffeeb2b173c4be59006198c99fd7d758dd4a5d422a2ff9f74a0a1d1bL69-R69                                                      |
| 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.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
-------

5264b484c1 [ProductVariant] Fix serialization group of POST operation
8feb851ece [ProductVariant][API] Add possibility to POST variant translations
9bd6d0650d [ProductVariant][API] Add possibility to PUT variant translations
4875256995 [ProductVariant][API] Add channelCode validation in channelPricings list
ad2c534af0 [ProductVariant][API] Add product validation
af4a421c33 [Exception] Map UnexpectedValueException to 400 HTTP status code
7eed74b20d [API] Rename the resource from ProductVariantTranslation to ProductVariantTranslations
3a519e8692 [API] Remove non-iri id field from ProductVariantTranslation and ChannelPricing serialization
d40ecdffc0 [Behat] Update context to pass validation
3dccd16479 [Behat][API] Introduce common ResponseContext service
7483de555f [Behat][API] Use ResponseContext within suites
2023-04-13 12:15:58 +02:00
Grzegorz Sadowski
b6954ec549
refactor #14928 [Maintenance] Add missing Spec for HasEnabledEntityValidator (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?   | yes |
| Related tickets | fixes #13586 |
| License         | MIT                                                          |

Commits
-------

5e77372844 [Maintenance] Add missing Spec for HasEnabledEntityValidator
f2920e71eb [Maintenance] Slight refactor of HasEnabledEntityValidator
2023-04-13 11:51:56 +02:00
Grzegorz Sadowski
1d85b6a08e
bug #14929 Add conflict for doctrine/orm:2.14.2 (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
| License         | MIT

Commits
-------

de58169f58 Add conflict for doctrine/orm:2.14.2
2023-04-13 10:37:16 +02:00
Jacob Tobiasz
ab18eda216
feature #14911 [PriceHistory] Add Compiler Pass for upgrade between Sylius 1.12 and Sylius 1.13 version (TheMilek)
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                                                          |

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


Commits
-------

398f04699b [PriceHistory] Add Compiler Pass for upgrade between Sylius 1.12 and Sylius 1.13 version
2023-04-13 09:10:46 +02:00
Jakub Tobiasz
de58169f58
Add conflict for doctrine/orm:2.14.2 2023-04-13 08:31:27 +02:00
Rafikooo
7483de555f
[Behat][API] Use ResponseContext within suites 2023-04-12 21:54:07 +02:00
Rafikooo
3dccd16479
[Behat][API] Introduce common ResponseContext service 2023-04-12 21:54:07 +02:00
Rafikooo
d40ecdffc0
[Behat] Update context to pass validation 2023-04-12 21:54:07 +02:00
Rafikooo
3a519e8692
[API] Remove non-iri id field from ProductVariantTranslation and ChannelPricing serialization 2023-04-12 21:54:07 +02:00
Rafikooo
7eed74b20d
[API] Rename the resource from ProductVariantTranslation to ProductVariantTranslations 2023-04-12 21:54:06 +02:00
Rafikooo
af4a421c33
[Exception] Map UnexpectedValueException to 400 HTTP status code 2023-04-12 21:54:06 +02:00
Rafikooo
ad2c534af0
[ProductVariant][API] Add product validation 2023-04-12 21:54:06 +02:00
Rafikooo
4875256995
[ProductVariant][API] Add channelCode validation in channelPricings list 2023-04-12 21:54:06 +02:00
Rafikooo
9bd6d0650d
[ProductVariant][API] Add possibility to PUT variant translations 2023-04-12 21:54:06 +02:00
Rafikooo
8feb851ece
[ProductVariant][API] Add possibility to POST variant translations 2023-04-12 21:54:06 +02:00
Jan Goralski
f2920e71eb
[Maintenance] Slight refactor of HasEnabledEntityValidator 2023-04-12 13:16:28 +02:00
Jan Goralski
5e77372844
[Maintenance] Add missing Spec for HasEnabledEntityValidator 2023-04-12 12:50:11 +02:00
Jacob Tobiasz
18af095c66
refactor #14923 [CS][DX] Refactor (github-actions[bot])
This PR was merged into the 1.12 branch.

Discussion
----------

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

Commits
-------

5fed4db64e [CS][DX] Refactor
2023-04-12 08:53:12 +02:00
Jacob Tobiasz
971bef194d
minor #14918 [Tasks] Improve Robo task (Rafikooo)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 1.12 and 1.13 <!-- 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                                                          |

It runs `composer validate` after `composer update` and handles the case of already created directories

Commits
-------

b9d2233b07 [Tasks] Improve Robo task
2023-04-12 08:36:23 +02:00
Rafikooo
b4cb9e7702
[Migrations] Check MySqlPlatform class existance case-sensitive 2023-04-11 18:06:16 +02:00
Sylius Bot
5fed4db64e [CS][DX] Refactor 2023-04-10 02:20:12 +00:00
BastienGoze
7dd12907e7 add possibility to configure shipping_address_in_checkout_required with fixtures 2023-04-08 17:32:39 +02:00
Grzegorz Sadowski
d7d1a01fc3
feature #14900 [UpgradeFile] Introduce upgrade from Sylius 1.12 with PriceHistoryPlugin to Sylius 1.13 (TheMilek)
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                                                       |                                                 
| Deprecations?   | no<!-- don't forget to update the UPGRADE-*.md file --> |
| Related tickets | fixes #X, partially #Y, mentioned in #Z                      |
| 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
-->


Commits
-------

239281ebc2 [UpgradeFile] Introduce upgrade from Sylius 1.12 with PriceHistoryPlugin to Sylius 1.13
2023-04-07 15:16:11 +02:00
Grzegorz Sadowski
2447cb69bb
bug #14916 [API][ProductTaxon] Add unique combination validation (NoResponseMate)
This PR was merged into the 1.13 branch.

Discussion
----------

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

Commits
-------

4a31f55535 [Maintenance] Remove redundant scenario
63b44c0c90 [ProductTaxon] Add unique combination validation
2023-04-07 15:14:50 +02:00
Rafikooo
b9d2233b07
[Tasks] Improve Robo task 2023-04-07 13:26:02 +02:00
Jan Góralski
d07647620e
minor #12344 [Product][Association] Fix attaching association with numeric code (hatem20)
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 #12339
| License         | MIT

<!--
 - Bug fixes must be submitted against the 1.7 or 1.8 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
-------

0f62196135 [Product][Association] Fix attaching association with numeric code
2023-04-07 12:58:55 +02:00
Jan Goralski
63b44c0c90
[ProductTaxon] Add unique combination validation 2023-04-07 08:58:09 +02:00
Rafikooo
5264b484c1
[ProductVariant] Fix serialization group of POST operation 2023-04-06 17:47:01 +02:00
TheMilek
239281ebc2
[UpgradeFile] Introduce upgrade from Sylius 1.12 with PriceHistoryPlugin to Sylius 1.13 2023-04-06 16:38:17 +02:00
Jan Goralski
4a31f55535
[Maintenance] Remove redundant scenario 2023-04-06 16:35:08 +02:00
TheMilek
398f04699b
[PriceHistory] Add Compiler Pass for upgrade between Sylius 1.12 and Sylius 1.13 version 2023-04-06 16:34:04 +02:00
Grzegorz Sadowski
a2ac33b163
Merge branch '1.12' into 1.13
* 1.12:
  Change application's version to v1.12.8-dev
  Generate changelog for v1.12.7
  Change application's version to v1.12.7
  [API] Add order item removal validation and return proper HTTP status code
  Update sylius-chart.js
2023-04-06 13:47:50 +02:00
Grzegorz Sadowski
e2389358e1
Change application's version to v1.12.8-dev 2023-04-06 13:37:56 +02:00
Grzegorz Sadowski
41b20dcdd5
Generate changelog for v1.12.7 2023-04-06 13:37:27 +02:00
Grzegorz Sadowski
04b376bb09
Change application's version to v1.12.7 2023-04-06 13:37:26 +02:00
Jan Góralski
6f18cbdaa7
minor #14914 [Orders][API] OrderItem removal validation (Rafikooo)
This PR was merged into the 1.12 branch.

Discussion
----------

| Q               | A                                                            |
|-----------------|--------------------------------------------------------------|
| Branch?         | 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 --> |
| License         | MIT                                                          |

Fixes:
(in prod env this information was hidden which could confuse the client)
![image](https://user-images.githubusercontent.com/40125720/229773377-d7fb05d2-0ca7-4a44-9cec-34ac0862693c.png)
After:
<img width="726" alt="image" src="https://user-images.githubusercontent.com/40125720/229774829-6d46441a-b2bd-40bc-bb6c-890ef2cea7fa.png">



Commits
-------

a37a4d7820 [API] Add order item removal validation and return proper HTTP status code
2023-04-06 10:22:07 +02:00
Rafał Jaskulski
a076c578fd
minor #14915 [Maintenance] Rename OnFlushEntityObserverListener service (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
-------

35adb93d20 [Maintenance] Rename OnFlushEntityObserverListener service
2023-04-06 10:15:33 +02:00
Jacob Tobiasz
9d94516fb8
minor #14825 Update sylius-chart.js (xXNoceboXx)
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 | none                      |
| License         | MIT                                                          |

 - Bug fixes to load chart.js

Seen information on the documentation of chart.js: https://www.chartjs.org/docs/latest/getting-started/integration.html#quick-start

Commits
-------

150a1496d0 Update sylius-chart.js
2023-04-06 10:08:04 +02:00
Jacob Tobiasz
35b5a162ca
refactor #14909 [CS][DX] Refactor (github-actions[bot])
This PR was merged into the 1.13 branch.

Discussion
----------

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

Commits
-------

0b587cab82 [CS][DX] Refactor
2023-04-06 07:52:45 +02:00
Rafikooo
a37a4d7820
[API] Add order item removal validation and return proper HTTP status code 2023-04-05 17:01:41 +02:00
Jan Goralski
35adb93d20
[Maintenance] Rename OnFlushEntityObserverListener service 2023-04-05 16:38:27 +02:00