Skip to content

Commit 2f473f0

Browse files
authored
Merge pull request #194 from elyanory/sylius-1.12
⬆️ Sylius 1.12
2 parents 2523485 + ec673b7 commit 2f473f0

File tree

12 files changed

+51
-30
lines changed

12 files changed

+51
-30
lines changed

.github/workflows/recipe.yaml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,32 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
php: ['7.4' ,'8.0']
23-
sylius: ["~1.8.0", "~1.9.0", "~1.10.0", "~1.11.0"]
22+
php: ['7.4', '8.0', '8.1']
23+
sylius: ['~1.8.0', '~1.9.0', '~1.10.0', '~1.11.0', '~1.12.0']
2424
exclude:
2525
- php: 8.0
26-
sylius: "~1.8.0"
26+
sylius: '~1.8.0'
2727
- php: 8.0
28-
sylius: "~1.9.0"
28+
sylius: '~1.9.0'
29+
- php: 8.1
30+
sylius: '~1.8.0'
31+
- php: 8.1
32+
sylius: '~1.9.0'
2933
- php: 7.4
30-
sylius: "~1.11.0"
34+
sylius: '~1.11.0'
35+
- php: 7.4
36+
sylius: '~1.12.0'
3137

3238
steps:
3339
- name: Setup PHP
40+
uses: shivammathur/setup-php@v2
41+
with:
42+
php-version: ${{ matrix.php }}
43+
extensions: gd, intl, json
44+
45+
- name: Set project php-version
3446
run: |
35-
sudo update-alternatives --set php /usr/bin/php${{ matrix.php }}
36-
echo "date.timezone=UTC" >> /tmp/timezone.ini
37-
sudo mv /tmp/timezone.ini /etc/php/${{ matrix.php }}/cli/conf.d/timezone.ini
38-
echo ${{ matrix.php }} > .php-version
47+
echo "${{ matrix.php }}" > .php-version
3948
4049
- uses: actions/checkout@v2
4150
with:
@@ -82,7 +91,7 @@ jobs:
8291
- name: Require plugin without install
8392
working-directory: ./sylius
8493
run: |
85-
composer require --no-install --no-update monsieurbiz/sylius-rich-editor-plugin="*@dev"
94+
composer require --no-install --no-scripts monsieurbiz/sylius-rich-editor-plugin="*@dev"
8695
8796
- name: Composer install
8897
working-directory: ./sylius

.github/workflows/security.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,19 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
php: ['7.4', '8.0']
18+
php: ['7.4', '8.0', '8.1']
1919

2020
steps:
2121
- uses: actions/checkout@v2
2222

2323
- name: Setup PHP
24+
uses: shivammathur/setup-php@v2
25+
with:
26+
php-version: ${{ matrix.php }}
27+
extensions: gd, intl, json
28+
29+
- name: Set project php-version
2430
run: |
25-
sudo update-alternatives --set php /usr/bin/php${{ matrix.php }}
26-
echo "date.timezone=UTC" | sudo tee /etc/php/${{ matrix.php }}/cli/conf.d/timezone.ini
2731
echo "${{ matrix.php }}" > .php-version
2832
2933
- uses: actions/cache@v1

.github/workflows/tests.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
php: ['8.0']
19+
php: ['8.0', '8.1']
2020

2121
env:
2222
SYMFONY_ARGS: --no-tls
@@ -30,9 +30,13 @@ jobs:
3030
node-version: '14'
3131

3232
- name: Setup PHP
33+
uses: shivammathur/setup-php@v2
34+
with:
35+
php-version: ${{ matrix.php }}
36+
extensions: gd, intl, json
37+
38+
- name: Set project php-version
3339
run: |
34-
sudo update-alternatives --set php /usr/bin/php${{ matrix.php }}
35-
echo "date.timezone=UTC" | sudo tee /etc/php/${{ matrix.php }}/cli/conf.d/timezone.ini
3640
echo "${{ matrix.php }}" > .php-version
3741
3842
- name: Install symfony CLI

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.DEFAULT_GOAL := help
22
SHELL=/bin/bash
33
APP_DIR=tests/Application
4-
SYLIUS_VERSION=1.11.0
4+
SYLIUS_VERSION=1.12.0
55
SYMFONY=cd ${APP_DIR} && symfony
66
COMPOSER=symfony composer
77
CONSOLE=${SYMFONY} console

assets/css/app.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ html.is-disabled body {
2525
padding: 10px;
2626

2727
// These lines are here to avoid font-size style after removing EOL in the editor
28-
// @see https://github.com/monsieurbiz/SyliusRichEditorPlugin/issues/132
28+
// @see https://github.com/monsieurbiz/SyliusRichEditorPlugin/issues/132
2929
p, span {
3030
font-size: unset !important;
3131
line-height: unset !important;
@@ -60,7 +60,7 @@ html.is-disabled body {
6060
right: 0;
6161
bottom: 0;
6262
left: 0;
63-
z-index: 200;
63+
z-index: 999;
6464
display: none;
6565
padding: 0.714rem 0 0.714rem 5%;
6666
-webkit-user-select: none;

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"description": "A Rich Editor plugin for Sylius.",
66
"license": "MIT",
77
"require": {
8-
"php": "~7.4|~8.0",
8+
"php": "~7.4|~8.0|~8.1",
99
"ext-json": "*",
1010
"ext-intl": "*",
11-
"sylius/sylius": ">=1.8 <1.12"
11+
"sylius/sylius": ">=1.8 <1.13"
1212
},
1313
"require-dev": {
1414
"behat/behat": "^3.6.1",
@@ -30,7 +30,7 @@
3030
"mikey179/vfsstream": "^1.6",
3131
"mockery/mockery": "^1.4",
3232
"pamil/prophecy-common": "^0.1",
33-
"phpspec/phpspec": "^6.1",
33+
"phpspec/phpspec": "^6.1|^7.2",
3434
"phpstan/phpstan": "^0.12.57",
3535
"phpstan/phpstan-doctrine": "^0.12.19",
3636
"phpstan/phpstan-webmozart-assert": "^0.12.7",
@@ -56,7 +56,7 @@
5656
"cache:clear": "symfony-cmd",
5757
"assets:install %PUBLIC_DIR%": "symfony-cmd"
5858
},
59-
"phpcs": "php-cs-fixer fix --using-cache=false",
59+
"phpcs": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix --using-cache=false",
6060
"phpstan": "phpstan analyse -c phpstan.neon src/",
6161
"phpmd": "phpmd --exclude Migrations/* src/ ansi phpmd.xml",
6262
"phpunit": "phpunit",

src/Controller/FormController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,10 @@ public function submitAction(Request $request, FileUploaderInterface $fileUpload
140140
throw $this->createNotFoundException();
141141
}
142142

143+
$data = $request->request->all()[$form->getName()];
144+
143145
// Convert uploaded files to string in form data if necessary, or retrieve current image path if edition
144-
$formData = $this->processFormData($form, $fileUploader, $request->request->get($form->getName()));
146+
$formData = $this->processFormData($form, $fileUploader, $data);
145147

146148
// Generate form render with error display
147149
if (!$form->isValid()) {

src/DependencyInjection/MonsieurBizSyliusRichEditorExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function load(array $config, ContainerBuilder $container): void
4040
/**
4141
* @inheritdoc
4242
*/
43-
public function getAlias()
43+
public function getAlias(): string
4444
{
4545
return str_replace(['rich_editor', 'monsieur_biz'], ['richeditor', 'monsieurbiz'], parent::getAlias());
4646
}

src/Resources/config/routing/admin.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ monsieurbiz_richeditor_admin_form_create:
22
path: /monsieurbiz_richeditor/form/{code}
33
methods: [GET]
44
defaults:
5-
_controller: MonsieurBiz\SyliusRichEditorPlugin\Controller\FormController:viewAction
5+
_controller: MonsieurBiz\SyliusRichEditorPlugin\Controller\FormController::viewAction
66

77
monsieurbiz_richeditor_admin_form_edit:
88
path: /monsieurbiz_richeditor/form/{code}
99
methods: [POST]
1010
defaults:
11-
_controller: MonsieurBiz\SyliusRichEditorPlugin\Controller\FormController:viewAction
11+
_controller: MonsieurBiz\SyliusRichEditorPlugin\Controller\FormController::viewAction
1212

1313
monsieurbiz_richeditor_admin_form_submit:
1414
path: /monsieurbiz_richeditor/submit/{code}/{isEdition}
1515
methods: [POST]
1616
defaults:
17-
_controller: MonsieurBiz\SyliusRichEditorPlugin\Controller\FormController:submitAction
17+
_controller: MonsieurBiz\SyliusRichEditorPlugin\Controller\FormController::submitAction
1818
isEdition: 0
1919
requirements:
2020
isEdition: 1|0
@@ -23,4 +23,4 @@ monsieurbiz_richeditor_admin_form_render_elements:
2323
path: /monsieurbiz_richeditor/render_elements
2424
methods: [POST]
2525
defaults:
26-
_controller: MonsieurBiz\SyliusRichEditorPlugin\Controller\FormController:renderElementsAction
26+
_controller: MonsieurBiz\SyliusRichEditorPlugin\Controller\FormController::renderElementsAction

src/Resources/public/css/rich-editor-css.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)