Skip to content

Commit bfee1fe

Browse files
Resolve conflicts between 1.7 and 2.0
2 parents b19c782 + c176ada commit bfee1fe

File tree

393 files changed

+9032
-11425
lines changed

Some content is hidden

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

393 files changed

+9032
-11425
lines changed

.github/workflows/build.yaml

Lines changed: 75 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
name: Build
22

33
on:
4-
push: ~
4+
push:
5+
branches-ignore:
6+
- 'dependabot/**'
57
pull_request: ~
68
release:
7-
types: [created]
9+
types: [ created ]
810
schedule:
911
-
1012
cron: "0 1 * * 6" # Run at 1am every Saturday
1113
workflow_dispatch: ~
1214

15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
1319
jobs:
1420
tests:
1521
runs-on: ubuntu-latest
@@ -19,42 +25,31 @@ jobs:
1925
strategy:
2026
fail-fast: false
2127
matrix:
22-
php: ["8.3"]
23-
symfony: ["^5.4.21", "^6.4"]
24-
sylius: ["~1.14.0"]
28+
php: ["8.2", "8.3"]
29+
symfony: ["^6.4", "~7.3.0"]
30+
sylius: ["~2.0.1", "~2.1.0"]
2531
database: ["mysql", "postgres"]
2632
mysql: ["8.4"]
2733
postgres: ["15.8"]
28-
node: ["20.x"]
34+
node: ["22.x"]
2935
state_machine_adapter: ["symfony_workflow"]
3036

3137
include:
32-
-
33-
php: "8.3"
34-
symfony: "^6.4"
35-
sylius: "~1.14.0"
36-
database: "mysql"
37-
mysql: "8.4"
38-
node: "20.x"
39-
wkhtmltopdf: "0.12.6-1"
40-
state_machine_adapter: "symfony_workflow"
41-
-
42-
php: "8.3"
43-
symfony: "^6.4"
44-
sylius: "~1.14.0"
38+
- php: "8.3"
39+
symfony: "~7.3.0"
40+
sylius: "~2.1.0"
41+
node: "24.x"
4542
database: "mysql"
4643
mysql: "8.4"
47-
node: "20.x"
48-
wkhtmltopdf: "0.12.6-1"
4944
state_machine_adapter: "winzou_state_machine"
45+
5046
-
5147
php: "8.3"
52-
symfony: "^6.4"
53-
sylius: "~1.14.0"
54-
database: "mysql"
55-
mysql: "8.4"
56-
node: "20.x"
57-
wkhtmltopdf: false
48+
symfony: "~7.3.0"
49+
sylius: "~2.1.0"
50+
node: "24.x"
51+
database: "postgres"
52+
postgres: "15.8"
5853
state_machine_adapter: "symfony_workflow"
5954

6055
env:
@@ -72,7 +67,7 @@ jobs:
7267
with:
7368
php-version: "${{ matrix.php }}"
7469
extensions: intl
75-
tools: symfony
70+
tools: flex, symfony
7671
coverage: none
7772

7873
-
@@ -103,6 +98,14 @@ jobs:
10398
postgresql version: "${{ matrix.postgres }}"
10499
postgresql password: "postgres"
105100

101+
-
102+
name: Output PHP version for Symfony CLI
103+
run: php -v | head -n 1 | awk '{ print $2 }' > .php-version
104+
105+
-
106+
name: Install certificates
107+
run: symfony server:ca:install
108+
106109
-
107110
name: Get Composer cache directory
108111
id: composer-cache
@@ -123,7 +126,6 @@ jobs:
123126
run: |
124127
composer global config --no-plugins allow-plugins.symfony/flex true
125128
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^2.4"
126-
composer config --no-plugins allow-plugins.symfony/thanks true
127129
composer config extra.symfony.require "${{ matrix.symfony }}"
128130
129131
-
@@ -132,55 +134,27 @@ jobs:
132134
run: composer require "sylius/sylius:${{ matrix.sylius }}" --no-update --no-scripts --no-interaction
133135

134136
-
135-
name: Install PHP dependencies
136-
run: composer install --no-interaction
137-
138-
- name: Run security checks
137+
name: Require Winzou State Machine
138+
if: "${{ matrix.state_machine_adapter == 'winzou_state_machine' }}"
139139
run: |
140-
set -e
141-
142-
IGNORED=$(jq -r '.config.audit.ignore[]?' composer.json | sort || true)
143-
144-
if [ -n "$IGNORED" ]; then
145-
echo "Ignored CVEs:"
146-
echo "$IGNORED"
147-
echo
148-
fi
149-
150-
composer audit --no-interaction --abandoned=ignore --no-dev
151-
152-
symfony security:check --format=json > symfony-audit.json || true
153-
154-
FOUND=$(jq -r '.[]?.advisories[]?.cve? // empty' symfony-audit.json | sort | uniq)
155-
DIFF=$(comm -23 <(echo "$FOUND") <(echo "$IGNORED"))
156-
157-
if [ -n "$DIFF" ]; then
158-
echo "❌ New vulnerabilities found by Symfony security:check:"
159-
echo "$DIFF"
160-
exit 1
161-
else
162-
echo "✅ No new vulnerabilities found by Symfony security:check."
163-
fi
164-
165-
-
166-
name: Run ECS
167-
run: vendor/bin/ecs check
140+
composer require winzou/state-machine:^0.4 --no-update
141+
composer require winzou/state-machine-bundle:^0.6 --no-update
168142
169143
-
170-
name: Validate composer.json
171-
run: composer validate --ansi --strict
144+
name: Install PHP dependencies
145+
run: composer install --no-interaction
172146

173147
-
174-
name: Run analysis
175-
run: composer analyse
148+
name: Run PHPStan
149+
run: vendor/bin/phpstan analyse -c phpstan.neon.dist
176150

177151
-
178-
name: Run PHPStan
179-
run: vendor/bin/phpstan analyse -c phpstan.neon.dist src/
152+
name: Run ECS
153+
run: vendor/bin/ecs check src/
180154

181155
-
182-
name: Run PHPSpec
183-
run: vendor/bin/phpspec run --ansi -f progress --no-interaction
156+
name: Run unit tests
157+
run: vendor/bin/phpunit --colors=always --testsuite=unit
184158

185159
-
186160
name: Get Yarn cache directory
@@ -198,54 +172,65 @@ jobs:
198172
199173
-
200174
name: Install JS dependencies
201-
run: (cd tests/Application && yarn install)
175+
run: (cd vendor/sylius/test-application && yarn install)
176+
177+
- name: Check out database schema update
178+
run: |
179+
vendor/bin/console doctrine:database:create
180+
vendor/bin/console doctrine:schema:update --force
181+
vendor/bin/console doctrine:schema:validate
182+
vendor/bin/console doctrine:database:drop --force
202183
203184
-
204185
name: Prepare test application database
205186
run: |
206-
(cd tests/Application && bin/console doctrine:database:create -vvv)
207-
(cd tests/Application && bin/console doctrine:migrations:migrate -n -vvv -q)
187+
vendor/bin/console doctrine:database:create -vvv
188+
vendor/bin/console doctrine:migrations:migrate -n -vvv -q
208189
209190
-
210-
name: Test migrations generation directory
211-
run: |
212-
cp etc/travis/Order.php src/Entity
213-
cp etc/travis/resources.yaml tests/Application/config/packages/
214-
(cd tests/Application && bin/console doctrine:migrations:diff -q)
215-
COUNT=$(ls tests/Application/src/Migrations/ | wc -l)
216-
if [ $COUNT == 0 ]; then exit 1; fi
217-
rm src/Entity/Order.php
218-
rm tests/Application/config/packages/resources.yaml
191+
name: Validate database schema
192+
run: vendor/bin/console doctrine:schema:validate
219193

220194
-
221195
name: Prepare test application assets
222196
run: |
223-
(cd tests/Application && bin/console assets:install public -vvv)
224-
(cd tests/Application && yarn build:prod)
197+
vendor/bin/console assets:install -vvv
198+
(cd vendor/sylius/test-application && yarn build)
225199
226200
-
227201
name: Prepare test application cache
228-
run: (cd tests/Application && bin/console cache:warmup -vvv)
202+
run: vendor/bin/console cache:warmup -vvv
229203

230204
-
231205
name: Validate container
232206
run: (cd tests/Application && bin/console lint:container -vvv)
233207

234208
-
235209
name: Load fixtures in test application
236-
run: (cd tests/Application && bin/console sylius:fixtures:load -n)
210+
run: vendor/bin/console sylius:fixtures:load -n
211+
212+
- name: Run security check
213+
run: symfony security:check
214+
215+
-
216+
name: Validate composer.json
217+
run: composer validate --ansi --strict
218+
219+
-
220+
name: Validate container
221+
run: vendor/bin/console lint:container
237222

238223
-
239-
name: Run PHPUnit
240-
run: vendor/bin/phpunit --colors=always
224+
name: Run Non-unit PHPUnit tests
225+
run: vendor/bin/phpunit --colors=always --testsuite=non-unit
241226

242227
-
243228
name: Run Chrome Headless
244229
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 &
245230

246231
-
247232
name: Run webserver
248-
run: (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon)
233+
run: symfony server:start --port=8080 --daemon
249234

250235
-
251236
name: Run Behat
@@ -256,7 +241,8 @@ jobs:
256241
uses: actions/upload-artifact@v4
257242
if: failure()
258243
with:
259-
name: Behat logs
244+
name: "Behat logs - ${{ matrix.sylius }}-${{ github.run_id }}-${{ github.run_number }}"
260245
path: etc/build/
261246
if-no-files-found: ignore
247+
compression-level: 6
262248
overwrite: true

.github/workflows/upmerge_pr.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
include:
23+
-
24+
base_branch: "1.6"
25+
target_branch: "1.7"
2326
-
2427
base_branch: "1.7"
2528
target_branch: "2.0"

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
/etc/build/*
66
!/etc/build/.gitignore
77

8-
/tests/Application/yarn.lock
9-
108
/.phpunit.result.cache
119
/behat.yml
1210
/phpspec.yml
1311
/phpunit.xml
12+
13+
/tests/TestApplication/.env.local
14+
/tests/TestApplication/.env.*.local

README.md

Lines changed: 22 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,41 @@
33
<picture>
44
<source media="(prefers-color-scheme: dark)" srcset="https://media.sylius.com/sylius-logo-800-dark.png">
55
<source media="(prefers-color-scheme: light)" srcset="https://media.sylius.com/sylius-logo-800.png">
6-
<img alt="Sylius Logo." src="https://media.sylius.com/sylius-logo-800.png">
6+
<img alt="Sylius Logo" src="https://media.sylius.com/sylius-logo-800.png">
77
</picture>
88
</a>
99
</p>
10-
<br/>
10+
11+
<h1 align="center">PayPal Plugin</h1>
12+
1113
<p align="center">
12-
<a href="">
13-
<img src="https://www.paypalobjects.com/webstatic/mktg/Logo/pp-logo-200px.png" width="200" />
14-
</a>
14+
<a href="https://sylius.com/plugins/" target="_blank">
15+
<img src="https://sylius.com/assets/badge-official-sylius-plugin.png" width="200" alt="Official Sylius Plugin">
16+
</a>
1517
</p>
16-
<br/>
18+
1719
<p align="center">
18-
<a href="https://sylius.com/plugins/" target="_blank">
19-
<img src="https://sylius.com/assets/badge-official-sylius-plugin.png" width="150">
20-
</a>
20+
Official plugin for
21+
<a href="https://www.paypal.com/uk/business/platforms-and-marketplaces" target="_blank">PayPal Commerce Platform</a>
22+
– the newest and most advanced of PayPal solutions.
2123
</p>
2224

23-
# PayPal Plugin
25+
---
2426

25-
Sylius Core Team’s plugin for [PayPal Commerce Platform](https://www.paypal.com/uk/business/platforms-and-marketplaces) - the newest and most advanced of PayPal solutions.
27+
## Documentation
2628

27-
#### Why should I use PayPal in my online business?
29+
📖 Full documentation is available here:
30+
👉 [PayPal Plugin Documentation](https://docs.sylius.com/paypal-plugin)
2831

29-
* one of the most popular payment methods in the world;
30-
* worldwide network of 280+ millions consumers and 24+ millions merchants;
31-
* bank payouts are available in U.S., U.K., the E.U., Australia, and Canada;
32-
* PCI DSS and 3DS 2.0 compliance
33-
* full risk management, incl. customisable fraud tools & insight and dispute resolution via dynamic APIs.
32+
## Security issues
3433

35-
#### What does this plugin give me?
34+
If you think that you have found a security issue, please do not use the issue tracker and do not post it publicly.
35+
Instead, all security issues must be sent to `security@sylius.com`
3636

37-
* official payment integration developed and maintained by the Sylius Core Team;
38-
* global support for over 100 currencies across 200+ markets;
39-
* two-side operations between Sylius & PayPal administration panels (payments, refunds, reports, etc.);
40-
* better conversion thanks to direct checkout from both product & cart page;
41-
* support for all credit & debit cards;
42-
* popular regional payment methods, i.e. iDeal, SEPA, Sofort, eps, Griopay or Przelewy24;
43-
* direct PayPal transactions with PayPal wallet
37+
## Community
4438

45-
1. [Installation](docs/installation.md)
46-
1. [PayPal environment](docs/sandbox-vs-live.md)
47-
1. [Onboarding](docs/onboarding.md)
48-
1. [Reports](docs/reports.md)
49-
1. [Processing payments](docs/processing-payments.md)
50-
1. [Development](docs/development.md)
39+
For online communication, we invite you to chat with us and other users on [Sylius Slack](https://sylius.com/slack).
5140

52-
#### Supported branches
41+
## License
5342

54-
* `1.5` (v1.5.*) - security fixes
55-
* `1.6` (v1.6.*) - bug fixes, improvements
56-
* `1.7` (v1.7.*) - new features
43+
This plugin is released under the [MIT License](LICENSE).

0 commit comments

Comments
 (0)