Skip to content

Commit 31c937f

Browse files
authored
Merge pull request #58 from tomkalon/OP-556
OP-556 - Adding Sylius 2.0 support
2 parents 6aa8540 + 683fd26 commit 31c937f

75 files changed

Lines changed: 562 additions & 457 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,12 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
php: [ "8.0", "8.1", "8.2", "8.3" ]
24-
symfony: [ "^5.4", "^6.4" ]
25-
sylius: [ "^1.12", "^1.13" ]
26-
node: [ "18.x", "20.x" ]
23+
php: [ "8.2", "8.3" ]
24+
symfony: ["^6.4", "^7.1" ]
25+
sylius: [ "~2.0.0" ]
26+
node: [ "20.x", "22.x" ]
2727
mysql: [ "8.0" ]
2828

29-
exclude:
30-
- sylius: ^1.13
31-
php: 8.0
32-
- sylius: ^1.12
33-
php: 8.0
34-
symfony: ^6.4
35-
3629
env:
3730
APP_ENV: test
3831
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}"

.github/workflows/coding_standard.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,11 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
php: [ "8.0", "8.1", "8.2", "8.3" ]
22-
symfony: [ "^5.4", "^6.4" ]
23-
sylius: [ "^1.12", "^1.13" ]
24-
node: [ "18.x", "20.x" ]
25-
26-
exclude:
27-
- sylius: ^1.13
28-
php: 8.0
29-
- sylius: ^1.12
30-
php: 8.0
31-
symfony: ^6.4
21+
php: [ "8.2", "8.3" ]
22+
symfony: ["^6.4", "^7.1" ]
23+
sylius: [ "~2.0.0" ]
24+
node: [ "20.x", "22.x" ]
25+
mysql: [ "8.0" ]
3226

3327
steps:
3428
- uses: actions/checkout@v3

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ For the full installation guide, please go [here](doc/installation.md).
8080

8181
We work on stable, supported and up-to-date versions of packages. We recommend you to do the same.
8282

83-
| Package | Version |
84-
|---------------|-----------------|
85-
| PHP | \>=8.0 |
86-
| sylius/sylius | 1.12.x - 1.13.x |
87-
| MySQL | \>= 5.7 |
88-
| NodeJS | \>= 18.x |
83+
| Package | Version |
84+
|---------------|---------------|
85+
| PHP | 8.2, 8.3 |
86+
| sylius/sylius | 2.0.x |
87+
| MySQL | \>= 8.0 |
88+
| NodeJS | \>=20.x, 22.x |
8989

9090
----
9191

composer.json

Lines changed: 40 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,59 @@
44
"description": "Shipping data export environment for Sylius platform applications",
55
"license": "MIT",
66
"require": {
7-
"php": "^8.0",
8-
"doctrine/dbal": "^2.7 || ^3.0",
9-
"sylius/sylius": "~1.12.0 || ~1.13.0"
7+
"php": "^8.2",
8+
"sylius/sylius": "~2.0.0",
9+
"dompdf/dompdf": "^2.0",
10+
"sylius/twig-hooks": "^0.5",
11+
"sylius/twig-extra": "^0.5",
12+
"symfony/ux-autocomplete": "^2.17",
13+
"symfony/ux-live-component": "^2.20",
14+
"symfony/ux-twig-component": "^2.20",
15+
"symfony/webpack-encore-bundle": "^2.1",
16+
"symfony/stimulus-bundle": "^2.12"
1017
},
1118
"require-dev": {
12-
"behat/behat": "^3.7",
19+
"behat/behat": "^3.14",
1320
"behat/mink-selenium2-driver": "~1.6.0",
14-
"symfony/webpack-encore-bundle": "^1.15",
15-
"bitbag/coding-standard": "^3.0",
16-
"dmore/behat-chrome-extension": "^1.3",
17-
"dmore/chrome-mink-driver": "^2.7",
18-
"friends-of-behat/mink": "^1.8",
19-
"friends-of-behat/mink-browserkit-driver": "^1.4",
20-
"friends-of-behat/mink-debug-extension": "^2.0",
21-
"friends-of-behat/mink-extension": "^2.4",
21+
"bitbag/coding-standard": "^3.0.0",
22+
"dmore/behat-chrome-extension": "^1.4",
23+
"friends-of-behat/mink": "^1.11",
24+
"friends-of-behat/mink-browserkit-driver": "^1.6",
25+
"friends-of-behat/mink-debug-extension": "^2.1",
26+
"friends-of-behat/mink-extension": "^2.7",
2227
"friends-of-behat/page-object-extension": "^0.3",
23-
"friends-of-behat/suite-settings-extension": "^1.0",
24-
"friends-of-behat/symfony-extension": "^2.1",
25-
"friends-of-behat/variadic-extension": "^1.3",
28+
"friends-of-behat/suite-settings-extension": "^1.1",
29+
"friends-of-behat/symfony-extension": "^2.6",
30+
"friends-of-behat/variadic-extension": "^1.6",
31+
"gedmo/doctrine-extensions": "^3.9",
32+
"lchrusciel/api-test-case": "^4.1 || ^5.0",
33+
"league/flysystem-bundle": "^3.3",
34+
"nelmio/alice": "^3.10",
35+
"nyholm/psr7": "^1.8",
2636
"phpspec/phpspec": "^7.0",
27-
"phpstan/extension-installer": "^1.0",
28-
"phpstan/phpstan": "^1.8.1",
29-
"phpstan/phpstan-doctrine": "1.3.69",
30-
"phpstan/phpstan-strict-rules": "^1.3.0",
31-
"phpstan/phpstan-webmozart-assert": "^1.2.0",
3237
"phpunit/phpunit": "^9.5",
33-
"sylius-labs/coding-standard": "^4.0",
34-
"symfony/browser-kit": "^5.4 || ^6.0",
35-
"symfony/debug-bundle": "^5.4 || ^6.0",
36-
"symfony/dotenv": "^5.4 || ^6.0",
37-
"symfony/intl": "^5.4 || ^6.0",
38-
"symfony/web-profiler-bundle": "^5.4 || ^6.0",
39-
"polishsymfonycommunity/symfony-mocker-container": "^1.0"
40-
},
41-
"conflict": {
42-
"doctrine/persistence": "<3.0"
38+
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
39+
"robertfausk/behat-panther-extension": "^1.1",
40+
"sylius-labs/coding-standard": "^4.4",
41+
"sylius-labs/suite-tags-extension": "~0.2",
42+
"sylius/mailer-bundle": "^1.8 || ^2.0@beta",
43+
"sylius/sylius-rector": "^2.0",
44+
"symfony/browser-kit": "^6.4 || ^7.1",
45+
"symfony/debug-bundle": "^6.4 || ^7.1",
46+
"symfony/dependency-injection": "^6.4 || ^7.1",
47+
"symfony/dotenv": "^6.4 || ^7.1",
48+
"symfony/http-client": "^6.4 || ^7.1",
49+
"symfony/intl": "^6.4 || ^7.1",
50+
"symfony/web-profiler-bundle": "^6.4 || ^7.1"
4351
},
4452
"config": {
4553
"sort-packages": true,
4654
"allow-plugins": {
4755
"symfony/thanks": true,
4856
"composer/package-versions-deprecated": true,
4957
"dealerdirect/phpcodesniffer-composer-installer": true,
50-
"phpstan/extension-installer": true
58+
"phpstan/extension-installer": true,
59+
"php-http/discovery": true
5160
}
5261
},
5362
"autoload": {

doc/installation.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ ADDITIONAL
1313
## Requirements:
1414
We work on stable, supported and up-to-date versions of packages. We recommend you to do the same.
1515

16-
| Package | Version |
17-
|---------------|-----------------|
18-
| PHP | \>=8.0 |
19-
| sylius/sylius | 1.12.x - 1.13.x |
20-
| MySQL | \>= 5.7 |
21-
| NodeJS | \>= 18.x |
16+
| Package | Version |
17+
|---------------|---------------|
18+
| PHP | 8.2, 8.3 |
19+
| sylius/sylius | 2.0.x |
20+
| MySQL | \>= 8.0 |
21+
| NodeJS | \>=20.x, 22.x |
2222

2323
## Composer:
2424
```bash

phpstan.neon

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ parameters:
44
paths:
55
- src
66

7+
reportUnmatchedIgnoredErrors: false
8+
treatPhpDocTypesAsCertain: false
9+
710
excludePaths:
811
# Makes PHPStan crash
912
- 'src/DependencyInjection/Configuration.php'

src/EventListener/Grid/AdminShippingGatewayGridEventListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function editActionLinks(GridDefinitionConverterEvent $event): void
3737
foreach ($this->shippingGateways as $shippingGatewayType => $shippingGatewayLabel) {
3838
$options['links'][$shippingGatewayType] = [
3939
'label' => $shippingGatewayLabel,
40-
'icon' => 'plus',
40+
'icon' => 'tabler:plus',
4141
'route' => 'bitbag_admin_shipping_gateway_create',
4242
'parameters' => [
4343
'code' => $shippingGatewayType,

src/Repository/ShippingGatewayRepositoryInterface.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
/**
2121
* @template T of ResourceInterface
22-
* @extends RepositoryInterface<T>
2322
*/
2423
interface ShippingGatewayRepositoryInterface extends RepositoryInterface
2524
{

src/Resources/config/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ imports:
22
- { resource: "resource/**/*.yml" }
33
- { resource: "grids/**/*.yml" }
44
- { resource: "services.yml" }
5+
- { resource: "@BitBagSyliusShippingExportPlugin/Resources/config/twig_hooks/twig_hooks.yaml" }

src/Resources/config/grids/bitbag_shipping_gateway.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ sylius_grid:
2929
label: sylius.ui.create
3030
options:
3131
class: primary
32-
icon: plus
32+
icon: "tabler:plus"
3333
header:
34-
icon: cube
34+
icon: "tabler:cube"
3535
label: sylius.ui.type
3636
links:
3737
item:

0 commit comments

Comments
 (0)