Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Sylius 1.13 and PHP 8.3 compatibility #9

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions .github/workflows/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,28 @@ on:
pull_request:

jobs:

recipe:

name: Flex recipe (PHP ${{ matrix.php }}, Sylius ${{ matrix.sylius }})


runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php: ['8.0', '8.1']
sylius: [ "~1.11.0", "~1.12.0"]

php: ['8.1', '8.2', '8.3']
sylius: [ "~1.11.0", "~1.12.0", "~1.13.0"]
exclude:
- php: '8.3'
sylius: '~1.11.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: |
Expand Down Expand Up @@ -57,7 +59,7 @@ jobs:
- name: Create Sylius-Standard project without install
run: |
composer create-project --prefer-dist --no-scripts --no-progress --no-install sylius/sylius-standard sylius "${{ matrix.sylius }}"

# Because the sylius-standard has a soft constraint
- name: Make sure to install the required version of Sylius
working-directory: ./sylius
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ jobs:

security:

name: Security check (PHP ${{ matrix.php }})

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php: ['8.1']
php: ['8.1', '8.2','8.3']

steps:
- uses: actions/checkout@v3
Expand All @@ -28,7 +26,7 @@ jobs:

- name: Set project php-version
run: |
echo ${{ matrix.php }} > .php-version
echo "${{ matrix.php }}" > .php-version

- name: Determine composer cache directory
id: composer-cache-directory
Expand All @@ -39,7 +37,7 @@ jobs:
id: cache-composer
with:
path: ${{ steps.composer-cache-directory.outputs.directory }}
key: composer2-php:${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
key: composer2-php:${{ matrix.php }}-${{ github.sha }}
restore-keys: composer2-php:${{ matrix.php }}-

- name: Ensure that composer cache directory exists
Expand Down
32 changes: 12 additions & 20 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,36 @@ on:
pull_request:

jobs:

php:

name: Quality tests (PHP ${{ matrix.php }})


runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php: ['8.1']
php: ['8.1', '8.2', '8.3']

env:
SYMFONY_ARGS: --no-tls
COMPOSER_ARGS: --prefer-dist
DOCKER_INTERACTIVE_ARGS: -t

steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'

node-version: '14'
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
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 -1sLf 'https://dl.cloudsmith.io/public/symfony/stable/setup.deb.sh' | sudo -E bash
sudo apt install symfony-cli
echo "${{ matrix.php }}" > .php-version

- name: Determine composer cache directory
id: composer-cache-directory
Expand All @@ -54,7 +46,7 @@ jobs:
id: cache-composer
with:
path: ${{ steps.composer-cache-directory.outputs.directory }}
key: composer2-php:${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
key: composer2-php:${{ matrix.php }}-${{ github.sha }}
restore-keys: composer2-php:${{ matrix.php }}-

- name: Ensure that composer cache directory exists
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
.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
export COMPOSE_PROJECT_NAME=order-history
PLUGIN_NAME=sylius-${COMPOSE_PROJECT_NAME}-plugin
COMPOSE=docker-compose
COMPOSE=docker compose
YARN=yarn
DOCTRINE_MIGRATIONS_NAMESPACE=MonsieurBiz\SyliusOrderHistoryPlugin\Migrations

Expand Down Expand Up @@ -131,7 +131,7 @@ test.container: ## Lint the symfony container
${CONSOLE} lint:container

test.yaml: ## Lint the symfony Yaml files
${CONSOLE} lint:yaml ../../recipes ../../src/Resources/config
${CONSOLE} lint:yaml ../../src/Resources/config --parse-tags

test.schema: ## Validate MySQL Schema
${CONSOLE} doctrine:schema:validate
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ machine events.

![Demo of the Order History](docs/images/demo.png)

## Compatibility

| Sylius Version | PHP Version |
|---|---|

| 1.11 | 8.1 - 8.2 |
| 1.12 | 8.1 - 8.3 |
| 1.13 | 8.1 - 8.3 |

## Installation

Install the plugin via composer:
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": "Add a timeline with all the order events on back-office.",
"license": "MIT",
"require": {
"php": "~8.0",
"sylius/sylius": ">=1.9 <1.13",
"php": "~8.1",
"sylius/sylius": ">=1.11 <1.14",
"beberlei/doctrineextensions": "^1.3"
},
"prefer-stable": true,
Expand Down
3 changes: 0 additions & 3 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,3 @@ parameters:

# Test dependencies
- 'tests/Application/**/*'

ignoreErrors:
- '#^Method MonsieurBiz\\SyliusOrderHistoryPlugin\\Repository\\OrderHistoryEventRepository\:\:getByOrderId\(\) should return array but returns mixed\.$#'
Loading