Commit graph

36004 commits

Author SHA1 Message Date
Grzegorz Sadowski
957fd873ec
SYL-3947: UI bundle cleanup (#17036)
Cleaned up UiBundle templates and assets
2024-10-01 13:30:40 +02:00
Grzegorz Sadowski
5b0542eee6
[CS][DX] Refactor (#17072)
This PR has been generated automatically.
For more details see
[refactor.yaml](/Sylius/Sylius/blob/1.12/.github/workflows/refactor.yaml).
2024-10-01 13:21:55 +02:00
Sylius Bot
f50291e103 [CS][DX] Refactor 2024-10-01 11:20:28 +00:00
Grzegorz Sadowski
3ec2396737
Add possibility to remove option values from Product Option (#17048)
| Q               | A
|-----------------|-----
| Branch?         | 2.0 <!-- see the comment below -->
| New feature?    | a bit
| BC breaks?      | yes
| License         | MIT

<!--
 - Bug fixes must be submitted against the 1.13 branch
 - Features and deprecations must be submitted against the 1.14 branch
- Features, removing deprecations and BC breaks must be submitted
against the 2.0 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
-->
![Screenshot 2024-09-27 at 17 41
46](https://github.com/user-attachments/assets/076b858f-1b28-4adf-9d40-2d27cab3f867)
2024-10-01 13:17:03 +02:00
Rafał Jaskulski
59eeedaedf
[API] Make Province endpoints to be subresources of Country (#17059)
| Q               | A
|-----------------|-----
| Branch?         | 2.0
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations? | no<!-- don't forget to update the UPGRADE-*.md file
-->
| Related tickets | 
| License         | MIT

<!--
 - Bug fixes must be submitted against the 1.13 branch
 - Features and deprecations must be submitted against the 1.14 branch
- Features, removing deprecations and BC breaks must be submitted
against the 2.0 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
-->
2024-10-01 10:27:28 +02:00
Grzegorz Sadowski
3322606f56
[API] Adjust operation names after Province endpoints refactor 2024-10-01 08:55:10 +02:00
Grzegorz Sadowski
7a273f7f2b
Adjust PHPUnits tests to Province endpoints refactor 2024-10-01 08:55:07 +02:00
Grzegorz Sadowski
329ab6b90a
[Behat] Adjust contexts to Province endpoints refactor 2024-10-01 08:55:07 +02:00
Grzegorz Sadowski
b3421856e0
[API][Admin] Make Province endpoints to be subresources of Country 2024-10-01 08:55:07 +02:00
Grzegorz Sadowski
0ccee33c9d
[API][Shop] Make Province GET endpoint to be subresources of Country 2024-10-01 08:55:07 +02:00
Kamil Grygierzec
f291a1e91e
Add migration for MySQL 2024-10-01 08:29:18 +02:00
Kamil Grygierzec
1d21e4a29a
add migration for postgress 2024-10-01 08:29:18 +02:00
Kamil Grygierzec
b381697cea
Remove cascade onDelete from Product option value in ProductVariant 2024-10-01 08:29:18 +02:00
Kamil Grygierzec
82de1b5906
Prevent removal of Option values in use 2024-10-01 08:29:18 +02:00
Kamil Grygierzec
f66858c77a
Add persist processor for ProductOption 2024-10-01 08:29:18 +02:00
Kamil Grygierzec
5691cea019
Refactor ResourceDeleteSubscriber 2024-10-01 08:29:18 +02:00
Kamil Grygierzec
3d39f05fdf
cover the tests 2024-10-01 08:29:17 +02:00
Rafał Jaskulski
1c33c35d80
[Behat] Fix displaying themed channel scenario (#17062)
| Q               | A
|-----------------|-----
| Branch?         | 2.0
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | n/a
| License         | MIT

<!--
 - Bug fixes must be submitted against the 1.13 branch
 - Features and deprecations must be submitted against the 1.14 branch
- Features, removing deprecations and BC breaks must be submitted
against the 2.0 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
-->
2024-10-01 08:29:00 +02:00
Kamil Grygierzec
8e4847cc6b
Add remove button to the Form 2024-10-01 08:28:55 +02:00
Rafał Jaskulski
4549e2fa42
Enable tests for placing an orders in chosen locale (#17060)
| Q               | A
|-----------------|-----
| Branch?         | 2.0
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | n/a
| License         | MIT
2024-10-01 08:27:12 +02:00
Grzegorz Sadowski
4bbb7a52a6
[CS][DX] Refactor (#17067)
This PR has been generated automatically.
For more details see
[refactor.yaml](/Sylius/Sylius/blob/1.12/.github/workflows/refactor.yaml).
2024-10-01 06:48:50 +02:00
Grzegorz Sadowski
fdde7357ba
[Admin] Extract Webpack encore entries into Twig hooks (#17057)
| Q               | A
|-----------------|-----
| Branch?         | 2.0
| Bug fix?        | no
| New feature?    | yes
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | 
| License         | MIT

<!--
 - Bug fixes must be submitted against the 1.13 branch
 - Features and deprecations must be submitted against the 1.14 branch
- Features, removing deprecations and BC breaks must be submitted
against the 2.0 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
-->

Extracted from https://github.com/Sylius/Sylius/pull/17034
2024-10-01 06:48:32 +02:00
Grzegorz Sadowski
1534064653
Bump Pagerfanta version to 4.x (#17056)
| Q               | A
|-----------------|-----
| Branch?         |2.0
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | 
| License         | MIT

<!--
 - Bug fixes must be submitted against the 1.13 branch
 - Features and deprecations must be submitted against the 1.14 branch
- Features, removing deprecations and BC breaks must be submitted
against the 2.0 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
-->
2024-10-01 06:47:11 +02:00
Sylius Bot
72dfc88ae2 [CS][DX] Refactor 2024-10-01 02:30:17 +00:00
Karol
36f81a04ac
[API][Behat] Add Customer Persist processor (#17053)
| Q               | A
|-----------------|-----
| Branch?         | 2.0
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | n/a
| License         | MIT

<!--
 - Bug fixes must be submitted against the 1.13 branch
 - Features and deprecations must be submitted against the 1.14 branch
- Features, removing deprecations and BC breaks must be submitted
against the 2.0 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
-->
2024-09-30 13:43:57 +02:00
Wojdylak
d61a8e476a
Enable tests for placing an orders in chosen locale 2024-09-30 13:41:29 +02:00
Wojdylak
eb2cec1ad2
Add localization to live components 2024-09-30 13:41:24 +02:00
Grzegorz Sadowski
b20c2571f0
Add validation for cart item quantity range (#17047)
| Q               | A
|-----------------|-----
| Branch?         | 2.0
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | n/a
| License         | MIT
2024-09-30 11:48:15 +02:00
Michał Pysiak
abe70afa57
Fixes after CR 2024-09-30 11:39:05 +02:00
Michał Pysiak
9e0423dd9b
[Behat] Fix homepage template 2024-09-30 11:30:25 +02:00
Grzegorz Sadowski
fbd67ea517
[Admin] Render a default form (useful for custom resources) (#17055)
| Q               | A
|-----------------|-----
| Branch?         | 2.0
| Bug fix?        | no
| New feature?    | yes
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | 
| License         | MIT

<!--
 - Bug fixes must be submitted against the 1.13 branch
 - Features and deprecations must be submitted against the 1.14 branch
- Features, removing deprecations and BC breaks must be submitted
against the 2.0 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
-->

In the future Sylius stack, some default Twig hooks are defined to
render a form with `form_widget(form)`.
Indeed, most of the time, for custom resources we create for an
e-commerce, we do not need to improve the default form template
rendering. Moreover, the user could see this as an issue of his
configuration cause the creation/edition page will be empty even if he
has defined his Form builder.

So in this PR, I've added the same twig hooks as Sylius stack to make
the transition easier and to allow empty configuration of Twig hooks to
render a form a Sylius developer in an end application.
Moreover, I've disabled this default Twig hooks form rendering in out of
the box Sylius resources.

An example with default form rendering

![image](https://github.com/user-attachments/assets/13765730-a0dc-4d35-abad-a4b69080e8ca)
2024-09-30 10:45:32 +02:00
Michał Pysiak
693a7cdfcb
[Behat] Enable scenario 2024-09-30 10:21:21 +02:00
Rafał Jaskulski
d8122c16dd
Remove unnecessary code (#17054)
| Q               | A
|-----------------|-----
| Branch?         | 2.0
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | n/a
| License         | MIT
2024-09-30 09:56:30 +02:00
Wojdylak
5e27278916
Add validation to AddItemToCart 2024-09-30 09:53:11 +02:00
Loïc Frémont
ad21bd5ca1 Extract Webpack encore entries into Twig hooks 2024-09-30 09:35:52 +02:00
Michał Pysiak
dba51af33d
Add spec for PersistProcessor 2024-09-30 09:27:45 +02:00
Loïc Frémont
c8dd728b58 Bump Pagerfanta version to 4.x 2024-09-30 09:20:47 +02:00
Loïc Frémont
fdc3ccb9d5 Render a default form (useful for custom resources) 2024-09-30 09:04:05 +02:00
Michał Pysiak
5958c399dd
[Behat] Remove legacy scenario 2024-09-30 08:45:18 +02:00
Wojdylak
5967ca1e2e
Remove unnecessary code 2024-09-30 08:42:38 +02:00
Michał Pysiak
13819ebaec
[API][Behat] Add Customer Persist processor 2024-09-30 08:40:01 +02:00
Wojdylak
77c1a00e29
Add notInRangeMessage in test 2024-09-30 08:32:59 +02:00
Wojdylak
8c825bc9b6
Move message to validation files 2024-09-30 08:26:52 +02:00
Wojdylak
0e2772054e
Add validation for cart item quantity range 2024-09-30 08:07:25 +02:00
Grzegorz Sadowski
06c6fe06f9
Enable tests for placing orders as impersonated shop users and for picking up cart created in UI in the api (#17035)
| Q               | A
|-----------------|-----
| Branch?         | 2.0
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | n/a
| License         | MIT
2024-09-30 07:18:11 +02:00
Grzegorz Sadowski
e06428cce2
[Maintenance] Remove FOS Restbundle (#17025)
| Q               | A
|-----------------|-----
| Branch?         | 2.0
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | yes
| Deprecations?   | no
| Related tickets | n/a
| License         | MIT

<!--
 - Bug fixes must be submitted against the 1.13 branch
 - Features and deprecations must be submitted against the 1.14 branch
- Features, removing deprecations and BC breaks must be submitted
against the 2.0 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
-->
2024-09-30 07:15:41 +02:00
Grzegorz Sadowski
eda9403073
Update typehint for $publicDir (#17051)
| Q               | A
|-----------------|-----
| Branch?         | 2.0 
| Bug fix?        | yes
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | none
| License         | MIT

$publicDir is a value of `%sylius_core.public_dir%` which is a string
value (usually a `sylius_core.public_dir:
'%kernel.project_dir%/public'`), not a bool value. Which now causes
assets to be installed into a wrong directory.

Pre-fix:
```bash
➜ bin/console sylius:install:assets --no-interaction;
Installing Sylius assets for environment dev.
Created "/Users/username/Code/Sylius-Standard/1/assets" directory.
Created "/Users/username/Code/Sylius-Standard/1/bundles" directory.
```

Post-fix:
```bash
➜ bin/console sylius:install:assets --no-interaction;
Installing Sylius assets for environment dev.
Created "/Users/username/Code/Sylius-Standard/public/assets" directory.
Created "/Users/username/Code/Sylius-Standard/public/bundles" directory.
```
2024-09-30 06:53:39 +02:00
Egidijus Lukauskas
6408b41cbc
Update typehint for $publicDir 2024-09-28 22:53:33 +03:00
Wojdylak
365de37fba
Enable impersonation tests 2024-09-27 13:31:51 +02:00
Grzegorz Sadowski
6188311d3e
[Maintenance] Remove leftover mentions of master request related methods (#17043)
| Q               | A
|-----------------|-----
| Branch?         | 2.0
| Bug fix?        | kinda
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | -
| License         | MIT
2024-09-27 12:18:24 +02:00