Skip to content

Commit 1631e83

Browse files
Resolve conflicts between 1.7 and 2.0
2 parents fb1ee77 + 36262c3 commit 1631e83

File tree

393 files changed

+9027
-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

+9027
-11425
lines changed

.github/workflows/build.yaml

Lines changed: 70 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,20 @@ name: Build
33
on:
44
push:
55
branches-ignore:
6+
- 'dependabot/**'
67
- 'upmerge/**'
78
pull_request: ~
89
release:
9-
types: [created]
10+
types: [ created ]
1011
schedule:
1112
-
1213
cron: "0 1 * * 6" # Run at 1am every Saturday
1314
workflow_dispatch: ~
1415

16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
1520
jobs:
1621
tests:
1722
runs-on: ubuntu-latest
@@ -21,42 +26,31 @@ jobs:
2126
strategy:
2227
fail-fast: false
2328
matrix:
24-
php: ["8.3"]
25-
symfony: ["^5.4.21", "^6.4"]
26-
sylius: ["~1.14.0"]
29+
php: ["8.2", "8.3"]
30+
symfony: ["^6.4", "~7.3.0"]
31+
sylius: ["~2.0.1", "~2.1.0"]
2732
database: ["mysql", "postgres"]
2833
mysql: ["8.4"]
2934
postgres: ["15.8"]
30-
node: ["20.x"]
35+
node: ["22.x"]
3136
state_machine_adapter: ["symfony_workflow"]
3237

3338
include:
34-
-
35-
php: "8.3"
36-
symfony: "^6.4"
37-
sylius: "~1.14.0"
39+
- php: "8.3"
40+
symfony: "~7.3.0"
41+
sylius: "~2.1.0"
42+
node: "24.x"
3843
database: "mysql"
3944
mysql: "8.4"
40-
node: "20.x"
41-
wkhtmltopdf: "0.12.6-1"
42-
state_machine_adapter: "symfony_workflow"
43-
-
44-
php: "8.3"
45-
symfony: "^6.4"
46-
sylius: "~1.14.0"
47-
database: "mysql"
48-
mysql: "8.4"
49-
node: "20.x"
50-
wkhtmltopdf: "0.12.6-1"
5145
state_machine_adapter: "winzou_state_machine"
46+
5247
-
5348
php: "8.3"
54-
symfony: "^6.4"
55-
sylius: "~1.14.0"
56-
database: "mysql"
57-
mysql: "8.4"
58-
node: "20.x"
59-
wkhtmltopdf: false
49+
symfony: "~7.3.0"
50+
sylius: "~2.1.0"
51+
node: "24.x"
52+
database: "postgres"
53+
postgres: "15.8"
6054
state_machine_adapter: "symfony_workflow"
6155

6256
env:
@@ -74,7 +68,7 @@ jobs:
7468
with:
7569
php-version: "${{ matrix.php }}"
7670
extensions: intl
77-
tools: symfony
71+
tools: flex, symfony
7872
coverage: none
7973

8074
-
@@ -105,6 +99,10 @@ jobs:
10599
postgresql version: "${{ matrix.postgres }}"
106100
postgresql password: "postgres"
107101

102+
-
103+
name: Output PHP version for Symfony CLI
104+
run: php -v | head -n 1 | awk '{ print $2 }' > .php-version
105+
108106
-
109107
name: Get Composer cache directory
110108
id: composer-cache
@@ -125,7 +123,6 @@ jobs:
125123
run: |
126124
composer global config --no-plugins allow-plugins.symfony/flex true
127125
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^2.4"
128-
composer config --no-plugins allow-plugins.symfony/thanks true
129126
composer config extra.symfony.require "${{ matrix.symfony }}"
130127
131128
-
@@ -134,55 +131,27 @@ jobs:
134131
run: composer require "sylius/sylius:${{ matrix.sylius }}" --no-update --no-scripts --no-interaction
135132

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

175144
-
176-
name: Run analysis
177-
run: composer analyse
145+
name: Run PHPStan
146+
run: vendor/bin/phpstan analyse -c phpstan.neon.dist
178147

179148
-
180-
name: Run PHPStan
181-
run: vendor/bin/phpstan analyse -c phpstan.neon.dist src/
149+
name: Run ECS
150+
run: vendor/bin/ecs check src/
182151

183152
-
184-
name: Run PHPSpec
185-
run: vendor/bin/phpspec run --ansi -f progress --no-interaction
153+
name: Run unit tests
154+
run: vendor/bin/phpunit --colors=always --testsuite=unit
186155

187156
-
188157
name: Get Yarn cache directory
@@ -200,54 +169,65 @@ jobs:
200169
201170
-
202171
name: Install JS dependencies
203-
run: (cd tests/Application && yarn install)
172+
run: (cd vendor/sylius/test-application && yarn install)
173+
174+
- name: Check out database schema update
175+
run: |
176+
vendor/bin/console doctrine:database:create
177+
vendor/bin/console doctrine:schema:update --force
178+
vendor/bin/console doctrine:schema:validate
179+
vendor/bin/console doctrine:database:drop --force
204180
205181
-
206182
name: Prepare test application database
207183
run: |
208-
(cd tests/Application && bin/console doctrine:database:create -vvv)
209-
(cd tests/Application && bin/console doctrine:migrations:migrate -n -vvv -q)
184+
vendor/bin/console doctrine:database:create -vvv
185+
vendor/bin/console doctrine:migrations:migrate -n -vvv -q
210186
211187
-
212-
name: Test migrations generation directory
213-
run: |
214-
cp etc/travis/Order.php src/Entity
215-
cp etc/travis/resources.yaml tests/Application/config/packages/
216-
(cd tests/Application && bin/console doctrine:migrations:diff -q)
217-
COUNT=$(ls tests/Application/src/Migrations/ | wc -l)
218-
if [ $COUNT == 0 ]; then exit 1; fi
219-
rm src/Entity/Order.php
220-
rm tests/Application/config/packages/resources.yaml
188+
name: Setup messenger transports
189+
run: vendor/bin/console messenger:setup-transports -vvv
190+
191+
-
192+
name: Validate database schema
193+
run: vendor/bin/console doctrine:schema:validate -vvv
221194

222195
-
223196
name: Prepare test application assets
224197
run: |
225-
(cd tests/Application && bin/console assets:install public -vvv)
226-
(cd tests/Application && yarn build:prod)
198+
vendor/bin/console assets:install -vvv
199+
(cd vendor/sylius/test-application && yarn build)
227200
228201
-
229202
name: Prepare test application cache
230-
run: (cd tests/Application && bin/console cache:warmup -vvv)
203+
run: vendor/bin/console cache:warmup -vvv
231204

232205
-
233206
name: Validate container
234-
run: (cd tests/Application && bin/console lint:container -vvv)
207+
run: vendor/bin/console lint:container -vvv
208+
209+
- name: Run security check
210+
run: symfony security:check
211+
212+
-
213+
name: Validate composer.json
214+
run: composer validate --ansi --strict
235215

236216
-
237217
name: Load fixtures in test application
238-
run: (cd tests/Application && bin/console sylius:fixtures:load -n)
218+
run: vendor/bin/console sylius:fixtures:load -n
239219

240220
-
241-
name: Run PHPUnit
242-
run: vendor/bin/phpunit --colors=always
221+
name: Run Non-unit PHPUnit tests
222+
run: vendor/bin/phpunit --colors=always --testsuite=non-unit
243223

244224
-
245225
name: Run Chrome Headless
246226
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 &
247227

248228
-
249229
name: Run webserver
250-
run: (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon)
230+
run: symfony server:start --port=8080 --daemon
251231

252232
-
253233
name: Run Behat
@@ -258,7 +238,8 @@ jobs:
258238
uses: actions/upload-artifact@v4
259239
if: failure()
260240
with:
261-
name: Behat logs
241+
name: "Behat logs - ${{ matrix.sylius }}-${{ github.run_id }}-${{ github.run_number }}"
262242
path: etc/build/
263243
if-no-files-found: ignore
244+
compression-level: 6
264245
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)