Skip to content

Commit 3b24212

Browse files
authored
[UPMERGE] 1.1 -> 2.0 (#44)
This PR has been generated automatically. For more details see [upmerge_pr.yaml](/Sylius/WishlistPlugin/blob/1.0/.github/workflows/upmerge_pr.yaml). **Remember!** The upmerge should always be merged with using `Merge pull request` button. In case of conflicts, please resolve them manually with usign the following commands: ``` git fetch upstream gh pr checkout <this-pr-number> git merge upstream/2.0 -m "Resolve conflicts between 1.1 and 2.0" ``` If you use other name for the upstream remote, please replace `upstream` with the name of your remote pointing to the `Sylius/WishlistPlugin` repository. Once the conflicts are resolved, please run `git merge --continue` and push the changes to this PR.
2 parents bfe88ef + 5bea9a9 commit 3b24212

File tree

3 files changed

+113
-116
lines changed

3 files changed

+113
-116
lines changed

.github/workflows/build.yml

Lines changed: 38 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
branches-ignore:
66
- 'dependabot/**'
7+
paths-ignore:
8+
- "adr/**"
9+
- "*.md"
710
pull_request:
811
paths-ignore:
912
- "adr/**"
@@ -12,14 +15,18 @@ on:
1215
types: [created]
1316
schedule:
1417
-
15-
cron: "0 1 * * 6" # Run at 1am every Saturday
18+
cron: "0 1 * * *" # Run at 1am every day
1619
workflow_dispatch: ~
1720

21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.ref }}
23+
cancel-in-progress: true
24+
1825
jobs:
1926
tests:
2027
runs-on: ubuntu-latest
2128

22-
name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}"
29+
name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.database_version }}"
2330

2431
strategy:
2532
fail-fast: false
@@ -28,139 +35,50 @@ jobs:
2835
symfony: ["^6.4", "~7.3.0"]
2936
sylius: ["~2.0.7", "~2.1.0"]
3037
node: ["22.x"]
31-
mysql: ["8.4"]
38+
database: ["mysql"]
39+
database_version: ["8.4"]
3240

3341
env:
3442
APP_ENV: test
35-
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}"
43+
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.database_version }}"
3644

3745
steps:
3846
-
39-
uses: actions/checkout@v3
40-
41-
-
42-
name: Setup PHP
43-
uses: shivammathur/setup-php@v2
44-
with:
45-
php-version: "${{ matrix.php }}"
46-
extensions: intl
47-
tools: symfony
48-
coverage: none
49-
50-
-
51-
name: Setup Node
52-
uses: actions/setup-node@v4
53-
with:
54-
node-version: "${{ matrix.node }}"
55-
56-
-
57-
name: Shutdown default MySQL
58-
run: sudo service mysql stop
59-
60-
-
61-
name: Setup MySQL
62-
uses: mirromutth/mysql-action@v1.1
63-
with:
64-
mysql version: "${{ matrix.mysql }}"
65-
mysql root password: "root"
66-
67-
-
68-
name: Output PHP version for Symfony CLI
69-
run: php -v | head -n 1 | awk '{ print $2 }' > .php-version
70-
71-
-
72-
name: Get Composer cache directory
73-
id: composer-cache
74-
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
75-
76-
-
77-
name: Cache Composer
78-
uses: actions/cache@v4
79-
with:
80-
path: ${{ steps.composer-cache.outputs.dir }}
81-
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }}
82-
restore-keys: |
83-
${{ runner.os }}-php-${{ matrix.php }}-composer-
84-
85-
-
86-
name: Restrict Symfony version
87-
if: matrix.symfony != ''
88-
run: |
89-
composer global config --no-plugins allow-plugins.symfony/flex true
90-
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^2.4"
91-
composer config --no-plugins allow-plugins.symfony/thanks true
92-
composer config extra.symfony.require "${{ matrix.symfony }}"
93-
94-
-
95-
name: Restrict Sylius version
96-
if: matrix.sylius != ''
97-
run: composer require "sylius/sylius:${{ matrix.sylius }}" --no-update --no-scripts --no-interaction
98-
99-
-
100-
name: Install PHP dependencies
101-
run: composer install --no-interaction
102-
103-
-
104-
name: Run PHPStan
105-
run: vendor/bin/phpstan analyse -c phpstan.neon src/
106-
107-
-
108-
name: Run ECS
109-
run: vendor/bin/ecs
47+
uses: actions/checkout@v4
11048

11149
-
112-
name: Get Yarn cache directory
113-
id: yarn-cache
114-
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
115-
116-
-
117-
name: Cache Yarn
118-
uses: actions/cache@v4
50+
name: Build Sylius Test Application
51+
uses: SyliusLabs/BuildTestAppAction@v3.2.0
11952
with:
120-
path: ${{ steps.yarn-cache.outputs.dir }}
121-
key: ${{ runner.os }}-node-${{ matrix.node }}-yarn-${{ hashFiles('**/package.json **/yarn.lock') }}
122-
restore-keys: |
123-
${{ runner.os }}-node-${{ matrix.node }}-yarn-
124-
125-
-
126-
name: Install JS dependencies
127-
run: cd vendor/sylius/test-application && yarn install
128-
129-
-
130-
name: Prepare test application database
131-
run: |
132-
vendor/bin/console doctrine:database:create -vvv
133-
vendor/bin/console doctrine:migrations:migrate -vvv
134-
135-
-
136-
name: Prepare test application assets
137-
run: |
138-
vendor/bin/console assets:install -vvv
139-
cd vendor/sylius/test-application && yarn encore dev
140-
141-
-
142-
name: Prepare test application cache
143-
run: vendor/bin/console cache:warmup -vvv
53+
e2e_js: "yes"
54+
cache_key: "${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}"
55+
cache_restore_key: "${{ runner.os }}-php-${{ matrix.php }}-composer-"
56+
database: "${{ matrix.database }}"
57+
database_version: "${{ matrix.database_version }}"
58+
node_version: "${{ matrix.node }}"
59+
php_version: "${{ matrix.php }}"
60+
sylius_version: "${{ matrix.sylius }}"
61+
symfony_version: "${{ matrix.symfony }}"
14462

14563
-
146-
name: Load fixtures in test application
147-
run: vendor/bin/console sylius:fixtures:load -n
64+
name: Run security check
65+
run: composer audit --abandoned=ignore
14866

14967
-
15068
name: Validate composer.json
15169
run: composer validate --ansi --strict
15270

15371
-
154-
name: Validate database schema
155-
run: vendor/bin/console doctrine:schema:validate
72+
name: Run ECS
73+
run: vendor/bin/ecs
15674

15775
-
158-
name: Run Chrome Headless
159-
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 &
76+
name: Lint container
77+
run: vendor/bin/console lint:container
16078

16179
-
162-
name: Run webserver
163-
run: symfony server:start --port=8080 --daemon
80+
name: Run PHPStan
81+
run: vendor/bin/phpstan analyse -c phpstan.neon src/
16482

16583
-
16684
name: Run PHPUnit
@@ -175,15 +93,19 @@ jobs:
17593
uses: actions/upload-artifact@v4
17694
if: failure()
17795
with:
178-
name: "Behat logs - Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}"
96+
name: "Behat logs - Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}"
17997
path: etc/build/
18098
if-no-files-found: ignore
99+
compression-level: 6
100+
overwrite: true
181101

182102
-
183103
name: Upload test log logs
184104
uses: actions/upload-artifact@v4
185105
if: failure()
186106
with:
187-
name: "Var logs - Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}"
107+
name: "Var logs - Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}"
188108
path: tests/Application/var/log/
189109
if-no-files-found: ignore
110+
compression-level: 6
111+
overwrite: true

translations/flashes.de.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sylius_wishlist_plugin:
2+
ui:
3+
remove_wishlist: 'Wunschliste wurde entfernt.'

translations/messages.de.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
sylius_wishlist_plugin:
2+
ui:
3+
wishlist: Wunschliste
4+
go_to_wishlist_failure: Es gab ein Problem mit der Weiterleitung. Bitte versuchen Sie es erneut.
5+
add_to_wishlist: Zur Wunschliste hinzufügen
6+
remove_from_wishlist: Von der Wunschliste entfernen
7+
your_wishlist_is_empty: Ihre Wunschliste ist leer
8+
your_wishlist: Ihre Wunschliste
9+
your_wishlists: Ihre Wunschlisten
10+
add_another_wishlist: Eine weitere Wunschliste hinzufügen
11+
added_wishlist_item: Produkt wurde Ihrer Wunschliste hinzugefügt.
12+
removed_wishlist_item: Produkt wurde von Ihrer Wunschliste entfernt.
13+
add_items_to_cart: Alle Artikel der Wunschliste in den Warenkorb legen
14+
export_wishlist_to_pdf: Als PDF exportieren
15+
added_to_cart: Artikel aus der Wunschliste wurden in Ihren Warenkorb gelegt.
16+
save_wishlist: Wunschliste speichern
17+
save_changes: Änderungen speichern
18+
changes_saved: Änderungen wurden gespeichert.
19+
variant_not_unique: Sie haben diese Variante bereits auf Ihrer Wunschliste.
20+
insufficient_stock: '%productName% hat nicht ausreichend Lagerbestand.'
21+
increase_quantity: Erhöhen Sie die Menge von mindestens einem Artikel.
22+
select_products: Wählen Sie mindestens einen Artikel aus.
23+
added_selected_wishlist_items_to_cart: Ausgewählte Artikel der Wunschliste wurden in Ihren Warenkorb gelegt.
24+
removed_selected_wishlist_items: Ausgewählte Produkte wurden von Ihrer Wunschliste entfernt.
25+
toggle_checkboxes: Umschalten
26+
remove: Von der Wunschliste entfernen
27+
add: Hinzufügen
28+
add_to_cart: In den Warenkorb legen
29+
copy_to_wishlist: In eine andere Wunschliste kopieren
30+
export_to_csv: Als CSV exportieren
31+
import_from_csv: Aus CSV importieren
32+
submit: Einreichen
33+
upload_valid_csv: Die hochgeladene Datei hat einen falschen Typ
34+
variant_already_in_wishlist: Variante bereits in der Wunschliste
35+
selected_wishlist_items_successfully_exported: Ausgewählte Produkte wurden erfolgreich exportiert.
36+
create_new_wishlist: Neue Wunschliste wurde erstellt.
37+
remove_wishlist: Wunschliste wurde entfernt.
38+
edit_wishlist_name: Wunschlistenname wurde bearbeitet.
39+
clear_wishlist: Wunschliste leeren
40+
cleared_wishlist: Wunschliste wurde geleert.
41+
create_new_wishlist_label: Wählen Sie einen Namen für die Wunschliste
42+
copied_selected_wishlist_items: Ausgewählte Produkte wurden erfolgreich kopiert.
43+
wishlist_not_found: Wunschliste nicht gefunden
44+
wishlist_for_channel_not_found: Wunschliste für den Kanal nicht gefunden
45+
wishlist_product_not_found: Produkt in der Wunschliste nicht gefunden
46+
csv_file_contains_incorrect_products: Die CSV-Datei enthält falsche Produkte.
47+
wishlist_name_already_exists: Wunschlistenname existiert bereits, versuchen Sie einen anderen.
48+
does_not_have_sufficient_stock: hat nicht genügend Lagerbestand.
49+
wishlist_not_exists: Ihre Wunschliste existiert nicht.
50+
change_wishlist_name: Wunschlistenname ändern.
51+
product_variant_exists_in_another_wishlist: existiert in einer anderen Wunschliste.
52+
wishlist_name_changed: Wunschlistenname wurde geändert.
53+
wishlist_save: Wunschliste speichern
54+
wishlist_saved: Wunschliste wurde gespeichert.
55+
you_have_no_access_to_that_wishlist: Sie haben keinen Zugriff auf diese Wunschliste.
56+
wishlist_has_product_variant: '%productName% Variante ist bereits in der Wunschliste.'
57+
wishlist_modal_copy_title: Wählen Sie eine Wunschliste aus, in die die ausgewählten Artikel kopiert werden sollen
58+
wishlist_modal_copy_cancel: Abbrechen
59+
wishlist_modal_copy_perform: Durchführen
60+
wishlist_modal_add_title: Wählen Sie einen Namen für Ihre neue Wunschliste
61+
wishlist_modal_add_perform: Durchführen
62+
wishlist_modal_add_cancel: Abbrechen
63+
wishlist_modal_add_error: Bitte geben Sie einen Namen für die Wunschliste ein.
64+
wishlist_modal_edit_title: Wählen Sie einen neuen Namen für Ihre Wunschliste
65+
wishlist_modal_edit_error: Bitte geben Sie einen Namen für die Wunschliste ein.
66+
wishlist_modal_edit_perform: Durchführen
67+
wishlist_modal_edit_cancel: Abbrechen
68+
wishlist_modal_remove_title: Wunschliste entfernen
69+
wishlist_modal_remove_content: Sind Sie sicher?
70+
wishlist_modal_remove_perform: Durchführen
71+
wishlist_modal_remove_cancel: Abbrechen
72+
wishlist_modal_placeholder: Meine Wunschlisten...

0 commit comments

Comments
 (0)