Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 12744bc

Browse files
committed
introduce fos_ckeditor
1 parent 4013d11 commit 12744bc

File tree

6 files changed

+43
-7
lines changed

6 files changed

+43
-7
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Changelog
22
=========
33

4-
1.0.0 (unreleased)
4+
2.0.0 (unreleased)
55
------------------
66

7+
* **2019-01-29**: [BC-BREAK] Replace IvoryCkEditor by FOSCkEditor.
8+
Follow the migration Guide at: https://symfony.com/doc/master/bundles/FOSCKEditorBundle/migration.html
9+
10+
1.0.0
11+
-----

composer.json

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,19 @@
3737
"matthiasnoback/symfony-dependency-injection-test": "^1.1",
3838
"matthiasnoback/symfony-config-test": "^2.1",
3939
"burgov/key-value-form-bundle": "^1.0",
40-
"symfony/asset": "^3.4 || ^4.0",
41-
"symfony/browser-kit": "^3.4 || ^4.0",
42-
"symfony/css-selector": "^3.4 || ^4.0",
43-
"friendsofsymfony/ckeditor-bundle": "^3.4 || ^4.0"
40+
"friendsofsymfony/ckeditor-bundle": "^1.0",
41+
"sebastian/environment": "^1.3.4",
42+
"sebastian/exporter": "^2.0.0",
43+
"symfony/asset": "^2.8 || ^3.3 || ^4.0",
44+
"symfony/browser-kit": "^2.8 || ^3.3 || ^4.0",
45+
"symfony/css-selector": "^2.8 || ^3.3 || ^4.0"
4446
},
4547
"suggest": {
4648
"symfony-cmf/routing-bundle": "To make use of the alternate locale provider.",
4749
"doctrine/phpcr-bundle": "To persist the metadata in PHPCR ODM documents",
4850
"doctrine/doctrine-bundle": "To persist the metadata in ORM entities",
4951
"doctrine/orm": "To persist the metadata in ORM entities, ~2.4",
50-
"friendsofsymfony/ckeditor-bundle": "To have CkEditor support on textareas."
52+
"friendsofsymfony/ckeditor-bundl": "To have CkEditor support on textareas."
5153
},
5254
"autoload": {
5355
"psr-4": {
@@ -61,11 +63,16 @@
6163
},
6264
"extra": {
6365
"branch-alias": {
64-
"dev-master": "1.1-dev"
66+
"dev-master": "2.0-dev"
6567
}
6668
},
69+
<<<<<<< HEAD
6770
"conflict": {
6871
"sebastian/environment": "<1.3.4",
6972
"sebastian/exporter": "<2.0.0"
7073
}
74+
=======
75+
"minimum-stability": "dev",
76+
"prefer-stable": true
77+
>>>>>>> 91dc9a3... introduce fos_ckeditor
7178
}

src/Admin/Content/StaticContentAdmin.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ public function getExportFormats()
4040
/**
4141
* Set configuration for CKEditorType.
4242
*
43+
<<<<<<< HEAD
4344
* Documentation: https://symfony.com/doc/master/bundles/FOSCKEditorBundle/index.html
45+
=======
46+
* Documentation: https://symfony.com/doc/master/bundles/FOSCKEditorBundle/usage/config.html
47+
>>>>>>> 91dc9a3... introduce fos_ckeditor
4448
*
4549
* @param array $config configuration for CKEditorType
4650
*/

src/DependencyInjection/Factory/ContentAdminFactory.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,25 @@ public function create(array $config, ContainerBuilder $container, XmlFileLoader
6262
{
6363
$loader->load('content.xml');
6464

65+
<<<<<<< HEAD
6566
$message = 'CKEditorBundle integration was explicitely enabled, but the bundle is not available.';
67+
=======
68+
$message = 'FOSCKEditorBundle integration was explicitely enabled, but the bundle is not available.';
69+
>>>>>>> 91dc9a3... introduce fos_ckeditor
6670
if (class_exists(FOSCKEditorBundle::class)) {
6771
$message .= ' (did you forget to register the bundle in the AppKernel?)';
6872
}
6973

7074
$ckeditorConfig = [];
75+
<<<<<<< HEAD
7176
if ($this->isConfigEnabledAuto($container, $config['fos_ckeditor']['enabled'], 'CKEditorBundle', $message)) {
7277
if (!isset($config['fos_ckeditor']['config_name'])) {
7378
throw new InvalidConfigurationException('The cmf_sonata_phpcr_admin_integration.bundles.content.fos_ckeditor.config_name setting has to be defined when CKEditorBundle integration is enabled.');
79+
=======
80+
if ($this->isConfigEnabledAuto($container, $config['fos_ckeditor']['enabled'], 'FOSCKEditorBundle', $message)) {
81+
if (!isset($config['fos_ckeditor']['config_name'])) {
82+
throw new InvalidConfigurationException('The cmf_sonata_phpcr_admin_integration.bundles.content.fos_ckeditor.config_name setting has to be defined when FOSCKEditorBundle integration is enabled.');
83+
>>>>>>> 91dc9a3... introduce fos_ckeditor
7484
}
7585

7686
unset($config['fos_ckeditor']['enabled']);

tests/Fixtures/App/config/cmf_sonata_admin_integration.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ cmf_routing:
3636

3737
twig:
3838
exception_controller: cmf_seo.error.suggestion_provider.controller:listAction
39+
form_themes:
40+
- '@FOSCKEditor/Form/ckeditor_widget.html.twig'
3941

4042
cmf_core:
4143
persistence:

tests/Unit/DependencyInjection/Factory/ContentAdminFactoryTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,21 @@ protected function setUp()
3333
{
3434
$this->factory = new ContentAdminFactory();
3535
$this->container = new ContainerBuilder();
36+
<<<<<<< HEAD
3637
$this->container->setParameter('kernel.bundles', ['CKEditorBundle' => true]);
38+
=======
39+
$this->container->setParameter('kernel.bundles', ['FOSCKEditorBundle' => true]);
40+
>>>>>>> 91dc9a3... introduce fos_ckeditor
3741
$this->fileLoader = $this->createMock(XmlFileLoader::class);
3842
}
3943

4044
/**
4145
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
46+
<<<<<<< HEAD
4247
* @expectedExceptionMessage config_name setting has to be defined when CKEditorBundle integration is enabled
48+
=======
49+
* @expectedExceptionMessage config_name setting has to be defined when FOSCKEditorBundle integration is enabled
50+
>>>>>>> 91dc9a3... introduce fos_ckeditor
4351
*/
4452
public function testInvalidCKEditorEnabledWithoutConfigName()
4553
{

0 commit comments

Comments
 (0)