Skip to content

Commit

Permalink
Allow Sylius 1.10 to 1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
maximehuran committed Jun 18, 2024
1 parent cbeb767 commit 41b2ddd
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 54 deletions.
55 changes: 18 additions & 37 deletions .github/workflows/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,44 +17,33 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['7.4' ,'8.0', '8.1']
sylius: ["~1.8.0", "~1.9.0", "~1.10.0", "~1.11.0", "~1.12.0"]
php: ['8.0', '8.1', '8.2']
sylius: ["~1.11.0", "~1.12.0", "~1.13.0"]
exclude:
- php: 8.1
sylius: "~1.8.0"
- php: 8.1
sylius: "~1.9.0"
- php: 8.0
sylius: "~1.8.0"
- php: 8.0
sylius: "~1.9.0"
- php: 7.4
sylius: "~1.11.0"
- php: 7.4
sylius: "~1.12.0"
- php: '8.2'
sylius: '~1.11.0'
- php: '8.2'
sylius: '~1.12.0'
- php: '8.0'
sylius: '~1.13.0'

steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: gd, intl, json
ini-values: date.timezone=UTC
tools: symfony-cli

- name: Set project php-version
run: |
echo "${{ matrix.php }}" > .php-version
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
path: plugin

# Run the server at the start so it can download the recipes!
- name: Run standalone symfony flex server
run: |
echo ${{ github.token }} | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
docker run --rm --name flex -d -v $PWD/plugin/recipes:/var/www/flex/var/repo/private/monsieurbiz/sylius-menu-plugin -p 80:80 docker.pkg.github.com/monsieurbiz/docker/symfony-flex-server:latest contrib official
docker ps
- name: Determine composer cache directory
id: composer-cache-directory
working-directory: plugin
Expand Down Expand Up @@ -87,21 +76,13 @@ jobs:
- name: Setup some requirements
working-directory: ./sylius
run: |
composer config repositories.plugin '{"type": "path", "url": "../plugin/"}'
composer config extra.symfony.allow-contrib true
composer config secure-http false
composer config --unset platform.php
- name: Require plugin without install
working-directory: ./sylius
run: |
composer require --no-install --no-scripts monsieurbiz/sylius-menu-plugin="*@dev"
composer config --no-plugins allow-plugins true
composer config --no-plugins extra.symfony.allow-contrib true
composer config --no-plugins secure-http false
composer config --no-plugins --unset platform.php
composer config --no-plugins extra.symfony.docker false
- name: Composer install
- name: Require plugin & install all dependencies
working-directory: ./sylius
run: |
composer config --no-plugins allow-plugins true
composer install
- name: Show flex server logs
run: docker logs --tail 100 flex
composer require monsieurbiz/sylius-menu-plugin="*@dev"
10 changes: 4 additions & 6 deletions .github/workflows/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['7.4', '8.0', '8.1']
php: ['8.0', '8.1', '8.2']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -33,7 +33,7 @@ jobs:
run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies installed with composer
uses: actions/cache@v2
uses: actions/cache@v3
id: cache-composer
with:
path: ${{ steps.composer-cache-directory.outputs.directory }}
Expand All @@ -46,10 +46,8 @@ jobs:
- name: Composer Github Auth
run: composer config -g github-oauth.github.com ${{ github.token }}

- uses: actions/checkout@v2

- name: Install PHP dependencies
run: composer update --prefer-dist

- uses: symfonycorp/security-checker-action@v3
- uses: symfonycorp/security-checker-action@v4

11 changes: 4 additions & 7 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.0', '8.1']
php: ['8.0', '8.1', '8.2']

env:
SYMFONY_ARGS: --no-tls
Expand All @@ -31,22 +31,19 @@ jobs:
with:
php-version: ${{ matrix.php }}
extensions: gd, intl, json
ini-values: date.timezone=UTC
tools: symfony-cli

- name: Set project php-version
run: |
echo "${{ matrix.php }}" > .php-version
- name: Install symfony CLI
run: |
curl https://get.symfony.com/cli/installer | bash
echo "${HOME}/.symfony5/bin" >> $GITHUB_PATH
- name: Determine composer cache directory
id: composer-cache-directory
run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies installed with composer
uses: actions/cache@v2
uses: actions/cache@v3
id: cache-composer
with:
path: ${{ steps.composer-cache-directory.outputs.directory }}
Expand Down
2 changes: 1 addition & 1 deletion .php-version.dist
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.1
8.2
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.DEFAULT_GOAL := help
SHELL=/bin/bash
APP_DIR=tests/Application
SYLIUS_VERSION=1.12.0
SYLIUS_VERSION=1.13.0
SYMFONY=cd ${APP_DIR} && symfony
COMPOSER=symfony composer
CONSOLE=${SYMFONY} console
Expand Down Expand Up @@ -81,6 +81,8 @@ setup_application:
${APP_DIR}/docker-compose.yaml:
rm -f ${APP_DIR}/docker-compose.yml
rm -f ${APP_DIR}/docker-compose.yaml
rm -f ${APP_DIR}/compose.yml # Remove Sylius file about Docker
rm -f ${APP_DIR}/compose.override.dist.yml # Remove Sylius file about Docker
ln -s ../../docker-compose.yaml.dist ${APP_DIR}/docker-compose.yaml
.PHONY: ${APP_DIR}/docker-compose.yaml

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"description": "This plugins allows you to manage menus.",
"license": "MIT",
"require": {
"php": "~7.4|~8.0",
"sylius/sylius": ">=1.8 <1.13"
"php": "~8.0",
"sylius/sylius": ">=1.11 <1.14"
},
"require-dev": {
"behat/behat": "^3.6.1",
Expand Down

0 comments on commit 41b2ddd

Please sign in to comment.