Skip to content

Commit d3faae3

Browse files
add upgrade 4.4 doc, divide configuration, update installation steps
1 parent c01449c commit d3faae3

File tree

5 files changed

+40
-11
lines changed

5 files changed

+40
-11
lines changed

UPGRADE-4.4.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# UPGRADE FROM `v4.3` TO `v4.4`
2+
3+
This update adds support for Trix (as an optional WYSIWYG editor). If you would like to replace CKeditor with Trix review the plugin installation steps.
4+
5+
Therefore, the configuration has been split and the `fos_ck_editor` configuration is required to be added with this update.
6+
7+
Import required CKeditor config in your `config/packages/_sylius.yaml` file:
8+
```yaml
9+
# config/packages/_sylius.yaml
10+
11+
imports:
12+
...
13+
14+
- { resource: "@BitBagSyliusCmsPlugin/Resources/config/fos_ck_editor/fos_ck_editor.yml" }
15+
```
16+
17+
Or copy contents of `vendor/BitBag/cms-plugin/src/Resources/config/fos_ck_editor/fos_ck_editor.yml` to `config/packages/fos_ck_editor.yaml` file.

doc/ckeditor-config.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ return [
99
];
1010
```
1111

12-
Install CKeditor ([FOS CKEditor](https://symfony.com/doc/master/bundles/FOSCKEditorBundle/usage/ckeditor.html))
12+
2. Install CKeditor ([FOS CKEditor](https://symfony.com/doc/master/bundles/FOSCKEditorBundle/usage/ckeditor.html))
1313

1414
```bash
1515
$ bin/console ckeditor:install
@@ -23,7 +23,7 @@ $ bin/console ckeditor:install --tag=4.22.1
2323

2424
For more information regarding the `4.22.1` tag, please visit the #485 issue.
2525

26-
Since FOSCKEditorBundle 2.0, to make Twig render the WYSIWYG editor, you must add some configuration under the `twig.form_themes` config key:
26+
3. Since FOSCKEditorBundle 2.0, to make Twig render the WYSIWYG editor, you must add some configuration under the `twig.form_themes` config key:
2727

2828
```yaml
2929
# Symfony 2/3: app/config/config.yml
@@ -34,3 +34,15 @@ twig:
3434
- '@FOSCKEditor/Form/ckeditor_widget.html.twig'
3535
- '@BitBagSyliusCmsPlugin/Form/ckeditor_widget.html.twig'
3636
```
37+
38+
4. Import required CKeditor config in your `config/packages/_sylius.yaml` file:
39+
```yaml
40+
# config/packages/_sylius.yaml
41+
42+
imports:
43+
...
44+
45+
- { resource: "@BitBagSyliusCmsPlugin/Resources/config/fos_ck_editor/fos_ck_editor.yml" }
46+
```
47+
48+
Continue with the next installation steps

doc/installation.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
## Installation
22

33

4-
1. *We work on stable, supported and up-to-date versions of packages. We recommend you to do the same.*
4+
##### 1. *We work on stable, supported and up-to-date versions of packages. We recommend you to do the same.*
55

66
```bash
77
$ composer require bitbag/cms-plugin --no-scripts
88
```
99

10-
2. Add plugin dependencies to your `config/bundles.php` file:
10+
##### 2. Add plugin dependencies to your `config/bundles.php` file:
1111

1212
```php
1313
return [
@@ -16,7 +16,7 @@ return [
1616
];
1717
```
1818

19-
3. Configure a WYSIWYG editor.
19+
##### 3. Configure a WYSIWYG editor.
2020

2121
The plugin supports two WYSIWYG editors: [FOS CKEditor](https://symfony.com/doc/master/bundles/FOSCKEditorBundle/usage/ckeditor.html) by default and [Trix](https://trix-editor.org/) as an alternative.
2222

@@ -25,7 +25,7 @@ You can choose which one you want to use by following one of the guides below:
2525
- [Trix WYSIWYG config](./trix-config.md)*
2626
- [CKeditor WYSIWYG config](./ckeditor-config.md)*
2727

28-
4. Import required config in your `config/packages/_sylius.yaml` file:
28+
##### 4. Import required config in your `config/packages/_sylius.yaml` file:
2929
```yaml
3030
# config/packages/_sylius.yaml
3131

@@ -35,7 +35,7 @@ imports:
3535
- { resource: "@BitBagSyliusCmsPlugin/Resources/config/config.yml" }
3636
```
3737
38-
5. Import routing in your `config/routes.yaml` file:
38+
##### 5. Import routing in your `config/routes.yaml` file:
3939

4040
```yaml
4141
@@ -73,7 +73,7 @@ you will probably need to change the extension of the imported file in
7373
- { resource: "@SitemapPlugin/Resources/config/config.yaml" }
7474
```
7575

76-
6. Finish the installation by updating the database schema and installing assets:
76+
##### 6. Finish the installation by updating the database schema and installing assets:
7777

7878
```bash
7979
$ bin/console cache:clear
@@ -89,7 +89,7 @@ $ bin/console sylius:theme:assets:install --symlink
8989

9090
**Note.** In some cases, the `--symlink` option [may throw some errors](https://github.com/Sylius/SyliusThemeBundle/issues/91). If you consider running the commands without the `--symlink` option, please keep in mind to run them on every potential plugin update.
9191

92-
7. Add plugin assets to your project
92+
##### 7. Add plugin assets to your project
9393

9494
We recommend you to use Webpack (Encore), for which we have prepared four different instructions on how to add this plugin's assets to your project:
9595

@@ -105,7 +105,7 @@ However, if you are not using Webpack, here are instructions on how to add optim
105105

106106
- [Non webpack solution](./01.5-non-webpack.md)
107107

108-
8. Passing required "backend" values to "frontend"
108+
##### 8. Passing required "backend" values to "frontend"
109109

110110
In order to make plugin finally work you need to declare "route", in admin _scripts.html.twig you can pass:
111111

src/Resources/config/config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
imports:
22
- { resource: "@BitBagSyliusCmsPlugin/Resources/config/resources.yml" }
3-
- { resource: "@BitBagSyliusCmsPlugin/Resources/config/fos_ck_editor/fos_ck_editor.yml" }
43
- { resource: "@BitBagSyliusCmsPlugin/Resources/config/grids.yml" }
54
- { resource: "@BitBagSyliusCmsPlugin/Resources/config/services.xml" }
65

tests/Application/config/packages/bitbag_sylius_cms_plugin.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
imports:
22
- { resource: "@BitBagSyliusCmsPlugin/Resources/config/config.yml" }
3+
- { resource: "@BitBagSyliusCmsPlugin/Resources/config/fos_ck_editor/fos_ck_editor.yml" }
34

45
parameters:
56
fixtures_dir: "%kernel.project_dir%/Resources/fixtures"

0 commit comments

Comments
 (0)