Skip to content

Commit

Permalink
Merge pull request #23 from TonySma/v1.11.0-compat
Browse files Browse the repository at this point in the history
Allow Sylius 1.10 / 1.11
  • Loading branch information
maximehuran authored Apr 7, 2022
2 parents 4138a63 + d40fbcb commit e14cd0c
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 4 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ jobs:
fail-fast: false
matrix:
php: ['7.4' ,'8.0']
sylius: ["~1.8.0", "~1.9.0", "~1.10.0"]
sylius: ["~1.8.0", "~1.9.0", "~1.10.0", "~1.11.0"]
exclude:
- php: 8.0
sylius: "~1.8.0"
- php: 8.0
sylius: "~1.9.0"
- php: 7.4
sylius: "~1.11.0"

steps:
- name: Setup PHP
Expand Down Expand Up @@ -63,6 +65,12 @@ jobs:
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 }}"
- name: Setup some requirements
working-directory: ./sylius
run: |
Expand Down
2 changes: 1 addition & 1 deletion .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: ['7.4', '8.0']
php: ['8.0']

env:
SYMFONY_ARGS: --no-tls
Expand Down
2 changes: 1 addition & 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.10.0
SYLIUS_VERSION=1.11.0
SYMFONY=cd ${APP_DIR} && symfony
COMPOSER=symfony composer
CONSOLE=${SYMFONY} console
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"require": {
"php": "~7.4|~8.0",
"sylius/sylius": ">=1.8 <1.11"
"sylius/sylius": ">=1.8 <1.12"
},
"require-dev": {
"behat/behat": "^3.6.1",
Expand Down
43 changes: 43 additions & 0 deletions dist/src/Migrations/Version20220406160423.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php

/*
* This file is part of Monsieur Biz' Menu plugin for Sylius.
*
* (c) Monsieur Biz <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace App\Migrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

final class Version20220406160423 extends AbstractMigration
{
public function getDescription(): string
{
return 'Change length of messenger_messages.queue_name column and create missing indexes, cf https://github.com/Sylius/Sylius/issues/13838';
}

public function up(Schema $schema): void
{
if ($schema->hasTable('messenger_messages')) {
$this->addSql('ALTER TABLE messenger_messages CHANGE queue_name queue_name VARCHAR(190) NOT NULL');
$this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0 ON messenger_messages (queue_name)');
$this->addSql('CREATE INDEX IDX_75EA56E0E3BD61CE ON messenger_messages (available_at)');
}
}

public function down(Schema $schema): void
{
if ($schema->hasTable('messenger_messages')) {
$this->addSql('DROP INDEX IDX_75EA56E0FB7336F0 ON messenger_messages');
$this->addSql('DROP INDEX IDX_75EA56E0E3BD61CE ON messenger_messages');
$this->addSql('ALTER TABLE messenger_messages CHANGE queue_name queue_name VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
}
}
}

0 comments on commit e14cd0c

Please sign in to comment.