Commit graph

28918 commits

Author SHA1 Message Date
Rafał Jaskulski
a10da71652
minor #14953 Update BuildTestApp actions within workflows (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                                                          |



Commits
-------

acfc256b57 Update BuildTestApp actions within workflows
2023-04-20 10:09:31 +02:00
Jakub Tobiasz
acfc256b57
Update BuildTestApp actions within workflows 2023-04-20 08:50:58 +02:00
Jacob Tobiasz
f1c37f486a
bugfix #14925 [Migrations] Sylius-Standard installation fix (Rafikooo)
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
| License         | MIT

The `bin/console sylius:install` command ends with the following error when using the PostgreSQL database:
<img width="1660" alt="image" src="https://user-images.githubusercontent.com/40125720/231223850-5f44fb63-4fa2-4799-828b-2cd8f65774b6.png">


Commits
-------

b4cb9e7702 [Migrations] Check MySqlPlatform class existance case-sensitive
2023-04-19 09:47:59 +02:00
Grzegorz Sadowski
d3ce45dfbf
bug #14926 [API] API Platform's default exception mappings (Rafikooo)
This PR was merged into the 1.12 branch.

Discussion
----------

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

According to this doc: https://api-platform.com/docs/core/errors/#converting-php-exceptions-to-http-errors
we were missing the API Platform's default exception mappings to status, as YAML overwrites the default config

An incorrectly sent JSON by a client ends up with a 500 HTTP status code, which in production does not inform the client of the reason.

Before (lack of JSON object):
<img width="1439" alt="image" src="https://user-images.githubusercontent.com/40125720/231375258-232d2af5-4414-48e2-8877-63bcc153b0d1.png">
 After: 
<img width="1435" alt="image" src="https://user-images.githubusercontent.com/40125720/231376223-ba1315d9-eb71-4e19-9904-e096c762d420.png">
<img width="1441" alt="image" src="https://user-images.githubusercontent.com/40125720/231376330-194f7440-a5a5-423e-8eb1-a14694ebf52c.png">


Commits
-------

600ef008a3 [API] Restore default API Platform exception response codes
2023-04-18 19:46:17 +02:00
Rafikooo
600ef008a3
[API] Restore default API Platform exception response codes 2023-04-18 07:41:07 +02:00
Mateusz Zalewski
092131c91e
bug #14941 Fix build (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 | 
| License         | MIT


Commits
-------

628a131be1 Silence Http\Message\MessageFactory deprecation report
2023-04-15 08:53:13 +02:00
Jakub Tobiasz
628a131be1
Silence Http\Message\MessageFactory deprecation report 2023-04-15 08:05:05 +02:00
Grzegorz Sadowski
a21480bd56
minor #14938 Revert "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
| Related tickets | n/a
| License         | MIT

This reverts commit de58169f58.



Commits
-------

057960f4ac Revert "Add conflict for doctrine/orm:2.14.2"
2023-04-14 15:13:51 +02:00
Jakub Tobiasz
057960f4ac
Revert "Add conflict for doctrine/orm:2.14.2"
This reverts commit de58169f58.
2023-04-14 14:03:54 +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
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
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
Jakub Tobiasz
de58169f58
Add conflict for doctrine/orm:2.14.2 2023-04-13 08:31:27 +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
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
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
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
Rafikooo
a37a4d7820
[API] Add order item removal validation and return proper HTTP status code 2023-04-05 17:01:41 +02:00
Grzegorz Sadowski
7ef5708778
minor #14912 [Maintenance][CI] Allow manually dispatching unstable workflow (NoResponseMate)
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 | followup #14892                      |
| License         | MIT                                                          |

Trying to run the `Unstable` workflow manually resulted in:
<img width="704" alt="image" src="https://user-images.githubusercontent.com/9448101/229496156-2694f756-b621-4716-ade7-3c1219f044a8.png">
<br>
Now we're asked whether to allow failure or not while running manually:
<img width="264" alt="image" src="https://user-images.githubusercontent.com/9448101/229496559-426f8dc4-e6f5-4603-91c0-090e704c4e51.png">


Commits
-------

fc0f771fd3 [Maintenance][CI] Allow manually dispatching unstable workflow
2023-04-04 07:21:01 +02:00
Grzegorz Sadowski
99180df4b2
bug #14902 [Order] Prevent paying with a disabled method (NoResponseMate)
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 #11679, related #7819 |
| License         | MIT                                                          |

Commits
-------

4fade40420 [Order] Prevent paying with a disabled method
b90f6ddbc1 [Maintenance][CI] Prevent setup errors when using symfony commands with no db connection
2023-04-04 07:17:52 +02:00
Grzegorz Sadowski
1f164cfcf6
bug #14910 Change the ApiPlatform Mapping prepend path (jakubtobiasz)
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 | n/a
| License         | MIT

Since ApiPlatform `2.7` it loads resources' paths on its own. However, prepending comes **after** the paths detected by ApiPlatform. We don't have to remove it to keep support for lower versions of ApiPlatform (but we can remove prepending on `1.13` as we support only `2.7` and above).

By removing the trailing `/` we resolve the issue with duplicated path, as it'll be removed when already added.

![CleanShot 2023-04-03 at 10 19 26](https://user-images.githubusercontent.com/80641364/229452593-4a690c00-2742-4c4f-8f01-fcee7b74957b.png)

After applying my patch:
![CleanShot 2023-04-03 at 10 20 41](https://user-images.githubusercontent.com/80641364/229452714-c8329ab8-4fe2-4437-b74d-8523fb962eae.png)



Commits
-------

60079fb1c8 Change the ApiPlatform Mapping prepend path
2023-04-04 07:14:54 +02:00
Jan Goralski
fc0f771fd3
[Maintenance][CI] Allow manually dispatching unstable workflow 2023-04-03 13:20:47 +02:00
Jan Goralski
b90f6ddbc1
[Maintenance][CI] Prevent setup errors when using symfony commands with no db connection 2023-04-03 10:38:00 +02:00
Jan Goralski
4fade40420
[Order] Prevent paying with a disabled method 2023-04-03 10:37:59 +02:00
Jakub Tobiasz
60079fb1c8
Change the ApiPlatform Mapping prepend path 2023-04-03 10:16:28 +02:00
Jacob Tobiasz
9dd37fd593
minor #14905 [Conflict] Add conflict with symfony/framework-bundle:6.2.8 (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?        | no                                                       |
| New feature?    | no                                                      |
| BC breaks?      | no                                                      |
| Deprecations?   | no<!-- don't forget to update the UPGRADE-*.md file --> |
| License         | MIT                                                          |

Symfony's changelog: https://github.com/symfony/framework-bundle/compare/v6.2.7...v6.2.8#diff-51cca25b9f344e04d253bf67d646ddaf82a361541effdf554dce3f6d2080dc66R76-R78

Commits
-------

3805e7eb75 [Conflict] Add conflict with symfony/framework-bundle:6.2.8
2023-04-03 06:26:42 +02:00
Rafikooo
3805e7eb75
[Conflict] Add conflict with symfony/framework-bundle:6.2.8 2023-03-31 16:44:33 +02:00
Grzegorz Sadowski
0879ab96b7
minor #14892 Improve testing unstable dependencies in 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

The unstable build is run on every PR, but any error is silent, so you have to check manually whether it doesn't fail with the upcoming releases of packages. I left this option mainly because we want an easy way to check whether our fix works.

Also, I run the unstable build on our full build (executed once per day), where the errors are reported, so we'll know that some of the upcoming release of packages may fail with Sylius.

Commits
-------

87927712ac Add experimental builds to CI
2023-03-31 14:21:26 +02:00
Jakub Tobiasz
87927712ac
Add experimental builds to CI 2023-03-30 10:26:41 +02:00
Grzegorz Sadowski
dc9886b0e4
bug #14897 [Channel] Add "order by" to the "find by" methods (coldic3)
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 https://github.com/Sylius/Sylius/actions/runs/4529570438/jobs/7977521181                      |
| License         | MIT                                                          |

It is not handled by the `OrderByIdentifierSqlWalker` because these queries are generated by `Doctrine\ORM\Persisters\Entity\EntityPersister`. I've added `ORDER_BY` to fix the issue. The other way to fix it is to use `createQueryBuilder` instead.

Commits
-------

7212ed57f4 [Channel] Add "order by" to the "find by" methods
2023-03-29 11:02:34 +02:00
Kevin Kaniaburka
7212ed57f4
[Channel] Add "order by" to the "find by" methods 2023-03-28 13:02:26 +02:00
Grzegorz Sadowski
1482bb1b27
Change application's version to v1.12.7-dev 2023-03-28 12:02:48 +02:00
Grzegorz Sadowski
3402111c5f
Generate changelog for v1.12.6 2023-03-28 12:02:05 +02:00
Grzegorz Sadowski
37881019c7
Change application's version to v1.12.6 2023-03-28 12:02:04 +02:00
Grzegorz Sadowski
2b0d3ff262
Generate changelog for v1.11.15 2023-03-28 12:01:40 +02:00
Grzegorz Sadowski
f8840f4672
bug #14887 [Admin][ProductVariant] Switched list rendering from base locale to current (NoResponseMate)
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 | -                      |
| License         | MIT                                                          |

Commits
-------

9cd314ec09 [Admin][ProductVariant] Switched list rendering from base locale to current
2023-03-27 11:27:34 +02:00
Grzegorz Sadowski
8d2e8a2ebf
bug #14880 [Locale][API] Additional locale code validation (NoResponseMate)
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 | -                      |
| License         | MIT                                                          |

Commits
-------

e514c99737 [Locale][API] Additional locale code validation
2023-03-27 10:53:50 +02:00
Jacob Tobiasz
4a0647d403
minor #14884 fix: encore prod retrocompat (maxperei)
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 #14883                      |
| License         | MIT                                                          |

Commits
-------

69c2f8b41b fix: err on using scss var directly inside `calc()` func; resolves Sylius#14883
2023-03-27 09:29:15 +02:00
Grzegorz Sadowski
3df58dc98d
bug #14891 Fix dependency security vulerability for enshrined/svg-sanitize package ()
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 | port of #14871
| License         | MIT

The initial idea was to upmerge changes from `1.11` but while reviving CI we decided to no more upmerge `1.11` to `1.12`. That's why I had to port changes from #14871 manually.

Commits
-------

40beab69f5 Fix dependency security vulerability for enshrined/svg-sanitize package
2023-03-27 08:53:24 +02:00
Grzegorz Sadowski
7215a965ba
bug #14865 Fix calculating cart after trying to add more product than in stock (jakubtobiasz)
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 #14723, successor of #14795
| License         | MIT



Commits
-------

4cb0a52599 Prevent the cart recalculation when the form has errors
2023-03-27 08:23:12 +02:00
Cosmin Sandu
40beab69f5
Fix dependency security vulerability for enshrined/svg-sanitize package
Co-authored-by: Cosmin Sandu <cosmin@foodomarket.com>
2023-03-27 07:56:10 +02:00
Grzegorz Sadowski
7ac21ae068
minor #14886 Add var/log content to artifacts on pipeline fail (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

Small improvement, useful when 500 occurs on a Behat run.

Commits
-------

58c73cf0bb Add var/log directory to artifacts on pipeline fail
2023-03-27 07:24:40 +02:00