Skip to content

Commit 96d691b

Browse files
authored
Merge pull request #1 from maximehuran/feature/sylius-1-13
Sylius 1.13 compatibility and custom background image
2 parents 95d3658 + fea4a7f commit 96d691b

File tree

24 files changed

+319
-316
lines changed

24 files changed

+319
-316
lines changed

.github/workflows/recipe.yaml

Lines changed: 81 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,87 @@
11
name: Flex Recipe
22

33
on:
4-
push:
5-
branches: [ master ]
6-
pull_request:
4+
push:
5+
branches: [ master ]
6+
pull_request:
77

88
jobs:
99

10-
recipe:
11-
12-
name: Flex recipe (PHP ${{ matrix.php }}, Sylius ${{ matrix.sylius }})
13-
14-
runs-on: ubuntu-latest
15-
16-
strategy:
17-
fail-fast: false
18-
matrix:
19-
php: ['8.2']
20-
sylius: ["~1.12.0"]
21-
22-
steps:
23-
- name: Setup PHP
24-
uses: shivammathur/setup-php@v2
25-
with:
26-
php-version: ${{ matrix.php }}
27-
extensions: gd, intl, json
28-
ini-values: date.timezone=UTC
29-
tools: symfony-cli
30-
31-
- name: Set project php-version
32-
run: |
33-
echo ${{ matrix.php }} > .php-version
34-
35-
- uses: actions/checkout@v3
36-
with:
37-
path: plugin
38-
39-
- name: Determine composer cache directory
40-
id: composer-cache-directory
41-
working-directory: plugin
42-
run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT
43-
44-
- name: Cache dependencies installed with composer
45-
uses: actions/cache@v3
46-
id: cache-composer
47-
with:
48-
path: ${{ steps.composer-cache-directory.outputs.directory }}
49-
key: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}-${{ hashFiles('**/composer.json') }}
50-
restore-keys: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}-
51-
52-
- name: Ensure that composer cache directory exists
53-
run: mkdir -p ${{ steps.composer-cache-directory.outputs.directory }}
54-
55-
- name: Composer Github Auth
56-
run: composer config -g github-oauth.github.com ${{ github.token }}
57-
58-
- name: Create Sylius-Standard project without install
59-
run: |
60-
composer create-project --prefer-dist --no-scripts --no-progress --no-install sylius/sylius-standard sylius "${{ matrix.sylius }}"
61-
62-
# Because the sylius-standard has a soft constraint
63-
- name: Make sure to install the required version of Sylius
64-
working-directory: ./sylius
65-
run: |
66-
composer require --no-install --no-scripts --no-progress sylius/sylius="${{ matrix.sylius }}"
67-
68-
- name: Setup some requirements
69-
working-directory: ./sylius
70-
run: |
71-
composer config --no-plugins allow-plugins true
72-
composer config --no-plugins extra.symfony.allow-contrib true
73-
composer config --no-plugins secure-http false
74-
composer config --no-plugins --unset platform.php
75-
composer config --no-plugins extra.symfony.docker false
76-
composer config --no-plugins --json extra.symfony.endpoint '["https://api.github.com/repos/monsieurbiz/symfony-recipes/contents/index.json?ref=flex/master","flex://defaults"]'
77-
composer config repositories.plugin '{"type": "path", "url": "../plugin/"}'
78-
79-
- name: Require plugin & install all dependencies
80-
working-directory: ./sylius
81-
run: |
82-
composer require monsieurbiz/sylius-better-admin-plugin="*@dev"
10+
recipe:
11+
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
php: ['8.0', '8.1', '8.2']
18+
sylius: ["~1.11.0", "~1.12.0", "~1.13.0"]
19+
exclude:
20+
- php: '8.2'
21+
sylius: '~1.11.0'
22+
- php: '8.0'
23+
sylius: '~1.12.0'
24+
- php: '8.0'
25+
sylius: '~1.13.0'
26+
27+
steps:
28+
- name: Setup PHP
29+
uses: shivammathur/setup-php@v2
30+
with:
31+
php-version: ${{ matrix.php }}
32+
extensions: gd, intl, json
33+
ini-values: date.timezone=UTC
34+
tools: symfony-cli
35+
36+
- name: Set project php-version
37+
run: |
38+
echo ${{ matrix.php }} > .php-version
39+
40+
- uses: actions/checkout@v3
41+
with:
42+
path: plugin
43+
44+
- name: Determine composer cache directory
45+
id: composer-cache-directory
46+
working-directory: plugin
47+
run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT
48+
49+
- name: Cache dependencies installed with composer
50+
uses: actions/cache@v3
51+
id: cache-composer
52+
with:
53+
path: ${{ steps.composer-cache-directory.outputs.directory }}
54+
key: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}-${{ hashFiles('**/composer.json') }}
55+
restore-keys: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}-
56+
57+
- name: Ensure that composer cache directory exists
58+
run: mkdir -p ${{ steps.composer-cache-directory.outputs.directory }}
59+
60+
- name: Composer Github Auth
61+
run: composer config -g github-oauth.github.com ${{ github.token }}
62+
63+
- name: Create Sylius-Standard project without install
64+
run: |
65+
composer create-project --prefer-dist --no-scripts --no-progress --no-install sylius/sylius-standard sylius "${{ matrix.sylius }}"
66+
67+
# Because the sylius-standard has a soft constraint
68+
- name: Make sure to install the required version of Sylius
69+
working-directory: ./sylius
70+
run: |
71+
composer require --no-install --no-scripts --no-progress sylius/sylius="${{ matrix.sylius }}"
72+
73+
- name: Setup some requirements
74+
working-directory: ./sylius
75+
run: |
76+
composer config --no-plugins allow-plugins true
77+
composer config --no-plugins extra.symfony.allow-contrib true
78+
composer config --no-plugins secure-http false
79+
composer config --no-plugins --unset platform.php
80+
composer config --no-plugins extra.symfony.docker false
81+
composer config --no-plugins --json extra.symfony.endpoint '["https://api.github.com/repos/monsieurbiz/symfony-recipes/contents/index.json?ref=flex/master","flex://defaults"]'
82+
composer config repositories.plugin '{"type": "path", "url": "../plugin/"}'
83+
84+
- name: Require plugin & install all dependencies
85+
working-directory: ./sylius
86+
run: |
87+
composer require monsieurbiz/sylius-better-admin-plugin="*@dev"

.github/workflows/security.yaml

Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,53 @@
11
name: Security
22

33
on:
4-
push:
5-
pull_request:
4+
push:
5+
pull_request:
66

77
jobs:
88

9-
security:
9+
security:
1010

11-
name: Security check (PHP ${{ matrix.php }})
11+
runs-on: ubuntu-latest
1212

13-
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
php: ['8.1', '8.2']
1417

15-
strategy:
16-
fail-fast: false
17-
matrix:
18-
php: ['8.2']
18+
steps:
19+
- uses: actions/checkout@v3
1920

20-
steps:
21-
- uses: actions/checkout@v3
21+
- name: Setup PHP
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: ${{ matrix.php }}
25+
extensions: gd, intl, json
2226

23-
- name: Setup PHP
24-
uses: shivammathur/setup-php@v2
25-
with:
26-
php-version: ${{ matrix.php }}
27-
extensions: gd, intl, json
28-
ini-values: date.timezone=UTC
27+
- name: Set project php-version
28+
run: |
29+
echo "${{ matrix.php }}" > .php-version
2930
30-
- name: Set project php-version
31-
run: |
32-
echo ${{ matrix.php }} > .php-version
31+
- name: Determine composer cache directory
32+
id: composer-cache-directory
33+
run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT
3334

34-
- name: Determine composer cache directory
35-
id: composer-cache-directory
36-
run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT
35+
- name: Cache dependencies installed with composer
36+
uses: actions/cache@v3
37+
id: cache-composer
38+
with:
39+
path: ${{ steps.composer-cache-directory.outputs.directory }}
40+
key: composer2-php:${{ matrix.php }}-${{ github.sha }}
41+
restore-keys: composer2-php:${{ matrix.php }}-
3742

38-
- name: Cache dependencies installed with composer
39-
uses: actions/cache@v3
40-
id: cache-composer
41-
with:
42-
path: ${{ steps.composer-cache-directory.outputs.directory }}
43-
key: composer2-php:${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
44-
restore-keys: composer2-php:${{ matrix.php }}-
45-
- name: Ensure that composer cache directory exists
46-
run: mkdir -p ${{ steps.composer-cache-directory.outputs.directory }}
43+
- name: Ensure that composer cache directory exists
44+
run: mkdir -p ${{ steps.composer-cache-directory.outputs.directory }}
4745

48-
- name: Composer Github Auth
49-
run: composer config -g github-oauth.github.com ${{ github.token }}
46+
- name: Composer Github Auth
47+
run: composer config -g github-oauth.github.com ${{ github.token }}
5048

51-
- name: Install PHP dependencies
52-
run: composer update --prefer-dist
49+
- name: Install PHP dependencies
50+
run: composer update --prefer-dist
5351

54-
- uses: symfonycorp/security-checker-action@v4
52+
- uses: symfonycorp/security-checker-action@v4
5553

.github/workflows/tests.yaml

Lines changed: 53 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,79 @@
11
name: Tests
22

33
on:
4-
push:
5-
branches: [ master ]
6-
pull_request:
4+
push:
5+
branches: [ master ]
6+
pull_request:
77

88
jobs:
99

10-
php:
10+
php:
1111

12-
name: Quality tests (PHP ${{ matrix.php }})
12+
runs-on: ubuntu-latest
1313

14-
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
php: ['8.1', '8.2']
1518

16-
strategy:
17-
fail-fast: false
18-
matrix:
19-
php: ['8.2']
19+
env:
20+
SYMFONY_ARGS: --no-tls
21+
COMPOSER_ARGS: --prefer-dist
22+
DOCKER_INTERACTIVE_ARGS: -t
2023

21-
env:
22-
COMPOSER_ARGS: --prefer-dist
23-
DOCKER_INTERACTIVE_ARGS: -t
24+
steps:
25+
- uses: actions/checkout@v2
26+
- uses: actions/setup-node@v2
27+
with:
28+
node-version: '14'
29+
- name: Setup PHP
30+
uses: shivammathur/setup-php@v2
31+
with:
32+
php-version: ${{ matrix.php }}
33+
extensions: gd, intl, json
34+
ini-values: date.timezone=UTC
35+
tools: symfony-cli
2436

25-
steps:
26-
- uses: actions/checkout@v3
37+
- name: Set project php-version
38+
run: |
39+
echo "${{ matrix.php }}" > .php-version
2740
28-
- uses: actions/setup-node@v3
29-
with:
30-
node-version: '16'
41+
- name: Determine composer cache directory
42+
id: composer-cache-directory
43+
run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT
3144

32-
- name: Setup PHP
33-
uses: shivammathur/setup-php@v2
34-
with:
35-
php-version: ${{ matrix.php }}
36-
extensions: gd, intl, json
37-
ini-values: date.timezone=UTC
38-
tools: symfony-cli
45+
- name: Cache dependencies installed with composer
46+
uses: actions/cache@v3
47+
id: cache-composer
48+
with:
49+
path: ${{ steps.composer-cache-directory.outputs.directory }}
50+
key: composer2-php:${{ matrix.php }}-${{ github.sha }}
51+
restore-keys: composer2-php:${{ matrix.php }}-
3952

40-
- name: Set project php-version
41-
run: |
42-
echo ${{ matrix.php }} > .php-version
53+
- name: Ensure that composer cache directory exists
54+
run: mkdir -p ${{ steps.composer-cache-directory.outputs.directory }}
4355

44-
- name: Determine composer cache directory
45-
id: composer-cache-directory
46-
run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT
56+
- name: Composer Github Auth
57+
run: composer config -g github-oauth.github.com ${{ github.token }}
4758

48-
- name: Cache dependencies installed with composer
49-
uses: actions/cache@v3
50-
id: cache-composer
51-
with:
52-
path: ${{ steps.composer-cache-directory.outputs.directory }}
53-
key: composer2-php:${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
54-
restore-keys: composer2-php:${{ matrix.php }}-
59+
- run: make install
5560

56-
- name: Ensure that composer cache directory exists
57-
run: mkdir -p ${{ steps.composer-cache-directory.outputs.directory }}
61+
- run: make test.composer
5862

59-
- name: Composer Github Auth
60-
run: composer config -g github-oauth.github.com ${{ github.token }}
63+
- run: make test.phpcs
6164

62-
- run: make install
65+
- run: make test.phpunit
6366

64-
- run: make test.composer
67+
- run: make test.phpstan
6568

66-
- run: make test.phpcs
69+
- run: make test.phpmd
6770

68-
- run: make test.phpstan
71+
- run: make test.phpspec
6972

70-
- run: make test.phpmd
73+
- run: make test.yaml
7174

72-
- run: make test.yaml
75+
- run: make test.twig
7376

74-
- run: make test.twig
77+
- run: make test.schema
7578

76-
- run: make test.schema
77-
78-
- run: make test.container
79+
- run: make test.container

0 commit comments

Comments
 (0)