Skip to content

Commit 7fe8f40

Browse files
authored
Merge pull request #19 from BitBagCommerce/feature/OP_563
Upgrade plugin to Sylius 2.0
2 parents 0d58a6b + 56fe019 commit 7fe8f40

108 files changed

Lines changed: 1533 additions & 1763 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: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,11 @@ 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" ]
27-
mysql: [ "8.0" ]
28-
29-
exclude:
30-
- sylius: ^1.13
31-
php: 8.0
32-
- sylius: ^1.12
33-
php: 8.0
34-
symfony: ^6.4
23+
php: [ "8.2", "8.3" ]
24+
symfony: [ "^6.4", "^7.1" ]
25+
sylius: [ "^2.0.4" ]
26+
node: [ "20.x", "22.x" ]
27+
mysql: [ "5.7", "8.0" ]
3528

3629
env:
3730
APP_ENV: test
@@ -75,14 +68,6 @@ jobs:
7568
name: Install certificates
7669
run: symfony server:ca:install
7770

78-
-
79-
name: Run Chrome Headless
80-
run: google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 &
81-
82-
-
83-
name: Run webserver
84-
run: (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon)
85-
8671
-
8772
name: Get Composer cache directory
8873
id: composer-cache
@@ -157,17 +142,9 @@ jobs:
157142
name: Validate database schema
158143
run: (cd tests/Application && bin/console doctrine:schema:validate)
159144

160-
-
161-
name: Run PHPSpec
162-
run: vendor/bin/phpspec run --ansi -f progress --no-interaction
163-
164145
-
165146
name: Run PHPUnit
166147
run: vendor/bin/phpunit --colors=always
167-
168-
-
169-
name: Load fixtures in test application
170-
run: (cd tests/Application && bin/console sylius:fixtures:load -n)
171148

172149
-
173150
name: Failed build Slack notification

.github/workflows/coding_standard.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,10 @@ 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.4" ]
24+
node: [ "20.x", "22.x" ]
3225

3326
steps:
3427
- uses: actions/checkout@v3
@@ -70,10 +63,10 @@ jobs:
7063
SYMFONY_REQUIRE: ${{ matrix.symfony }}
7164

7265
- name: Run PHPStan
73-
run: vendor/bin/phpstan analyse -c phpstan.neon -l 8 src/
66+
run: vendor/bin/phpstan analyse -c phpstan.neon -l 7 src/
7467

7568
- name: Run ECS
76-
run: vendor/bin/ecs check src
69+
run: vendor/bin/ecs check src --debug
7770

7871
- name: Failed build Slack notification
7972
uses: rtCamp/action-slack-notify@v2

CONFLICTS.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

README.md

Lines changed: 20 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
We want to impact many unique eCommerce projects and build our brand recognition worldwide, so we are heavily involved in creating open-source solutions, especially for Sylius. We have already created over **35 extensions, which have been downloaded almost 2 million times.**
66

7-
You can find more information about our eCommerce services and technologies on our website: https://bitbag.io/. We have also created a unique service dedicated to creating plugins: https://bitbag.io/services/sylius-plugin-development.
7+
You can find more information about our eCommerce services and technologies on our website: https://bitbag.io/. We have also created a unique service dedicated to creating plugins: https://bitbag.io/services/sylius-plugin-development.
88

9-
Do you like our work? Would you like to join us? Check out the **“Career” tab:** https://bitbag.io/pl/kariera.
9+
Do you like our work? Would you like to join us? Check out the **“Career” tab:** https://bitbag.io/pl/kariera.
1010

11-
# About Us
11+
# About Us
1212
---
1313

1414
BitBag is a software house that implements tailor-made eCommerce platforms with the entire infrastructure—from creating eCommerce platforms to implementing PIM and CMS systems to developing custom eCommerce applications, specialist B2B solutions, and migrations from other platforms.
@@ -27,14 +27,14 @@ We have a 70-person team of experts: business analysts and consultants, eCommerc
2727
* PIM and CMS implementations
2828

2929
**Some numbers from BitBag regarding Sylius:**
30-
* 70 experts on board
30+
* 70 experts on board
3131
* +150 projects delivered on top of Sylius
3232
* 30 countries of BitBag’s customers
3333
* 7 years in the Sylius ecosystem
3434
* +35 plugins created for Sylius
3535

3636
---
37-
[![](https://bitbag.io/wp-content/uploads/2024/09/badges-sylius.png)](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_elasticsearch)
37+
[![](https://bitbag.io/wp-content/uploads/2024/09/badges-sylius.png)](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_elasticsearch)
3838

3939
---
4040

@@ -56,46 +56,28 @@ We have a 70-person team of experts: business analysts and consultants, eCommerc
5656
* [Community](#community)
5757

5858
# Installation
59-
----
59+
6060
The installation process for the Imoje Paywall Plugin can be found [here](doc/installation.md).
6161

62-
## Requirements
63-
---
62+
63+
## Requirements:
6464
We work on stable, supported and up-to-date versions of packages. We recommend you to do the same.
6565

66-
| Package | Version |
67-
|---------------|---------------------|
68-
| PHP | \>=8.1 |
69-
| sylius/sylius | \>=1.12.13 - 1.13.x |
70-
| MySQL | \>= 5.7 |
71-
| NodeJS | \>= 14.x |
66+
| Package | Version |
67+
|---------------|----------|
68+
| PHP | \>=8.1 |
69+
| sylius/sylius | \>=2.0.4 |
70+
| MySQL | \>= 5.7 |
71+
| NodeJS | \>= 20.x |
72+
| Symfony | \>= 6.4 |
7273

73-
## Usage
74+
# Usage
7475

7576
This plugin allows you to use the payment solution delivered by Imoje.
7677

78+
# Configuration
7779

78-
## Configuration
79-
80-
To create an ING-based payment method, go to Payment methods in the Sylius admin panel.
81-
After that, you need to add an ING payment:
82-
83-
![Screenshot showing payment method config in admin](doc/create_ing_method.png)
84-
85-
And now, you can configure your payment method in the admin panel:
86-
87-
![Screenshot showing payment method config in admin](doc/payment_method_config.png)
88-
89-
90-
To configure the imoje gateway, log in to ING the admin panel.
91-
92-
From "Settings" -> "Data for integration" you can acquire all the needed keys:
93-
94-
merchantId, serviceId, shopKey
95-
96-
Also, here in the integration data page you need to configure the path to your webhook, just type in your shop URL followed by /payment/imoje/notify
97-
98-
You also need an authorization token, so you need to go to: "Settings" -> "API Keys". And click on your "API key". This will be your authorization token.
80+
The configuration process for the Imoje Paywall Plugin can be found [here](doc/configuration.md).
9981

10082
# Functionalities
10183

@@ -106,7 +88,7 @@ All main functionalities of the plugin are described **[here.](doc/functionaliti
10688
**If you need some help with Sylius development, don't be hesitated to contact us directly. You can fill the form on [this site](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_mollie) or send us an e-mail to hello@bitbag.io!**
10789

10890
---
109-
# Demo
91+
# Demo
11092

11193
---
11294
We created a demo app with some useful use-cases of plugins! Visit http://demo.sylius.com/ to take a look at it.
@@ -129,7 +111,7 @@ This plugin's source code is completely free and released under the terms of the
129111

130112
[//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen.)
131113

132-
# Contact and support
114+
# Contact and support
133115
---
134116
This open-source plugin was developed to help the Sylius community. If you have any additional questions, would like help with installing or configuring the plugin, or need any assistance with your Sylius project - let us know! **Contact us** or send us an **e-mail to hello@bitbag.io** with your question(s).
135117

composer.json

Lines changed: 32 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,74 +8,67 @@
88
],
99
"license": "MIT",
1010
"require": {
11-
"php": "^8.0",
12-
"doctrine/annotations": "^1.14",
13-
"sylius/sylius": "~1.12.0 || ~1.13.0",
14-
"sylius/mailer-bundle": "^1.8 || ^2.0@beta",
15-
"symfony/webpack-encore-bundle": "^1.15"
11+
"sylius/sylius": "^2.0.4",
12+
"symfony/webpack-encore-bundle": "^2.1"
1613
},
1714
"require-dev": {
18-
"behat/behat": "^3.6.1",
19-
"behat/mink-selenium2-driver": "^1.4",
15+
"behat/behat": "^3.14",
16+
"behat/mink-selenium2-driver": "^1.6",
2017
"bitbag/coding-standard": "^3.0",
21-
"dmore/behat-chrome-extension": "^1.3",
22-
"dmore/chrome-mink-driver": "^2.7",
23-
"friends-of-behat/mink": "^1.8",
24-
"friends-of-behat/mink-browserkit-driver": "^1.4",
25-
"friends-of-behat/mink-debug-extension": "^2.0.0",
26-
"friends-of-behat/mink-extension": "^2.4",
18+
"dmore/behat-chrome-extension": "^1.4",
19+
"dmore/chrome-mink-driver": "^2.9",
20+
"friends-of-behat/mink": "^1.11",
21+
"friends-of-behat/mink-browserkit-driver": "^1.6",
22+
"friends-of-behat/mink-debug-extension": "^2.1",
23+
"friends-of-behat/mink-extension": "^2.7",
2724
"friends-of-behat/page-object-extension": "^0.3",
2825
"friends-of-behat/suite-settings-extension": "^1.0",
29-
"friends-of-behat/symfony-extension": "^2.1",
30-
"friends-of-behat/variadic-extension": "^1.3",
31-
"phpspec/phpspec": "^7.5",
26+
"friends-of-behat/symfony-extension": "^2.6",
27+
"friends-of-behat/variadic-extension": "^1.6",
3228
"phpstan/extension-installer": "^1.0",
3329
"phpstan/phpstan": "^1.10",
3430
"phpstan/phpstan-doctrine": "1.3.40",
3531
"phpstan/phpstan-strict-rules": "^1.3.0",
3632
"phpstan/phpstan-webmozart-assert": "^1.2.0",
3733
"phpunit/phpunit": "^9.5",
3834
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
39-
"sylius-labs/coding-standard": "^4.2",
40-
"symfony/browser-kit": "^5.4 || ^6.0",
41-
"symfony/debug-bundle": "^5.4 || ^6.0",
42-
"symfony/dotenv": "^5.4 || ^6.0",
43-
"symfony/flex": "^2.2.2",
44-
"symfony/intl": "^5.4 || ^6.0",
45-
"symfony/web-profiler-bundle": "^5.4 || ^6.0",
46-
"vimeo/psalm": "4.27.0"
47-
},
48-
"conflict": {
49-
"behat/mink-selenium2-driver": ">=1.7.0",
50-
"symfony/framework-bundle": "6.2.8",
51-
"symfony/validator": "6.4.7"
35+
"sylius/mailer-bundle": "^1.8 || ^2.0@beta",
36+
"sylius-labs/coding-standard": "^4.4",
37+
"symfony/browser-kit": "^6.4 || ^7.1",
38+
"symfony/debug-bundle": "^6.4 || ^7.1",
39+
"symfony/dotenv": "^6.4 || ^7.1",
40+
"symfony/flex": "^2.4",
41+
"symfony/intl": "^6.4 || ^7.1",
42+
"symfony/web-profiler-bundle": "^6.4 || ^7.1",
43+
"nyholm/psr7": "^1.8"
5244
},
5345
"config": {
5446
"sort-packages": true,
5547
"allow-plugins": {
56-
"dealerdirect/phpcodesniffer-composer-installer": false,
48+
"dealerdirect/phpcodesniffer-composer-installer": true,
49+
"php-http/discovery": true,
5750
"phpstan/extension-installer": true,
5851
"symfony/flex": true
5952
}
6053
},
6154
"extra": {
62-
"branch-alias": {
63-
"dev-master": "1.12-dev"
64-
},
6555
"symfony": {
66-
"require": "^5.4 || ^6.0"
56+
"require": "^6.4 || ^7.1"
6757
}
6858
},
6959
"autoload": {
7060
"psr-4": {
71-
"BitBag\\SyliusImojePlugin\\": "src/",
72-
"Tests\\BitBag\\SyliusImojePlugin\\": "tests/"
61+
"BitBag\\SyliusImojePlugin\\": "src/"
7362
}
7463
},
7564
"autoload-dev": {
76-
"classmap": [
77-
"tests/Application/Kernel.php"
78-
]
65+
"psr-4": {
66+
"Tests\\BitBag\\SyliusImojePlugin\\": [
67+
"tests/",
68+
"tests/Application/src"
69+
]
70+
},
71+
"classmap": ["tests/Application/Kernel.php"]
7972
},
8073
"scripts": {
8174
"post-install-cmd": [

config/config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
imports:
2+
- { resource: services.yaml }
3+
- { resource: twig_hooks.yaml }
File renamed without changes.

config/services.xml

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)