Skip to content

Slash encoding for Apache #253

Slash encoding for Apache

Slash encoding for Apache #253

Workflow file for this run

name: Flex Recipe
on:
push:
branches: [ master ]
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', '8.2']
sylius: ['~1.11.0', '~1.12.0']
include:
- php: '8.1'
sylius: '~1.12.0'
sylius_paypal: '~1.5.0'
- php: '8.2'
sylius: '~1.12.0'
sylius_paypal: '~1.5.0'
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Set project php-version
run: |
echo "${{ matrix.php }}" > .php-version
- uses: actions/checkout@v2
with:
path: plugin
- run: mkdir -p /home/runner/{.composer/cache,.config/composer}
- uses: actions/cache@v1
id: cache-composer
with:
path: /home/runner/.composer/cache
key: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}-${{ github.sha }}
restore-keys: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}-
- name: Composer Github Auth
run: composer config -g github-oauth.github.com ${{ github.token }}
- 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
run: |
composer require --no-install --no-scripts --no-progress sylius/sylius="${{ matrix.sylius }}"
# Fix Paypal 1.5 on Sylius 1.12 and PHP 8.1
- name: Make sure to install the required version of Sylius Paypal Plugin
if: ${{ matrix.sylius_paypal }}
working-directory: ./sylius
run: |
composer require --no-install --no-scripts --no-progress sylius/paypal-plugin="${{ matrix.sylius_paypal }}" # @see https://github.com/Sylius/PayPalPlugin/issues/295
- name: Setup some requirements
working-directory: ./sylius
run: |
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
composer config --no-plugins --json extra.symfony.endpoint '["https://api.github.com/repos/monsieurbiz/symfony-recipes/contents/index.json?ref=flex/master","flex://defaults"]'
- name: Require plugin & install all dependencies
working-directory: ./sylius
run: |
composer require monsieurbiz/sylius-search-plugin="*@dev"