From 64fd6a2bd1355e195b87b944f48361364f7df7f2 Mon Sep 17 00:00:00 2001 From: Sivert Lundli <46197518+Lundli@users.noreply.github.com> Date: Mon, 30 Oct 2023 19:30:03 +0100 Subject: [PATCH] chore: remove ckeditr and elfinder (#387) * chore: remove ckeditr and elfinder * fix: remove imports --- composer.json | 6 +- composer.lock | 234 +----------------- config/bundles.php | 2 - config/packages/fm_elfinder.yaml | 77 ------ config/packages/fos_ckeditor.yaml | 5 - config/routes/fm_elfinder.yaml | 2 - src/Form/Type/CreateExecutiveBoardType.php | 10 - src/Form/Type/CreateTeamType.php | 10 - symfony.lock | 28 --- .../update_executive_board.html.twig | 2 +- templates/team_admin/create_team.html.twig | 2 +- 11 files changed, 5 insertions(+), 373 deletions(-) delete mode 100644 config/packages/fm_elfinder.yaml delete mode 100644 config/packages/fos_ckeditor.yaml delete mode 100644 config/routes/fm_elfinder.yaml diff --git a/composer.json b/composer.json index 03279355..b8a51d90 100644 --- a/composer.json +++ b/composer.json @@ -18,9 +18,7 @@ "dompdf/dompdf": "^2.0", "easycorp/easyadmin-bundle": "^4", "excelwebzone/recaptcha-bundle": "^1.5", - "friendsofsymfony/ckeditor-bundle": "^2.4", "google/apiclient": "^2.12", - "helios-ag/fm-elfinder-bundle": "^12.3", "lexik/jwt-authentication-bundle": "^2.19", "liip/imagine-bundle": "^2.10", "nelmio/api-doc-bundle": "^4.11", @@ -105,11 +103,9 @@ "scripts": { "auto-scripts": { "cache:clear": "symfony-cmd", - "assets:install %PUBLIC_DIR%": "symfony-cmd", - "elfinder:install": "symfony-cmd" + "assets:install %PUBLIC_DIR%": "symfony-cmd" }, "post-install-cmd": [ - "php bin/console ckeditor:install --tag=4.22.1", "php bin/console assets:install public" ], "post-update-cmd": [ diff --git a/composer.lock b/composer.lock index 42f556cf..6eeea324 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "08f68db00705db51a0077440aafac7f6", + "content-hash": "740e9daeee23b8645c80067897567d5f", "packages": [ { "name": "brick/math", @@ -1880,87 +1880,6 @@ ], "time": "2023-05-24T07:17:17+00:00" }, - { - "name": "friendsofsymfony/ckeditor-bundle", - "version": "2.4.0", - "source": { - "type": "git", - "url": "https://github.com/FriendsOfSymfony/FOSCKEditorBundle.git", - "reference": "a4df4056b2832881e17b939e83f25406a6cc6414" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/FriendsOfSymfony/FOSCKEditorBundle/zipball/a4df4056b2832881e17b939e83f25406a6cc6414", - "reference": "a4df4056b2832881e17b939e83f25406a6cc6414", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-zip": "*", - "php": "^7.1|^8.0", - "symfony/asset": "^4.4 || ^5.0 || ^6.0", - "symfony/config": "^4.4 || ^5.0 || ^6.0", - "symfony/dependency-injection": "^4.4 || ^5.0 || ^6.0", - "symfony/expression-language": "^4.4 || ^5.0 || ^6.0", - "symfony/form": "^4.4 || ^5.0 || ^6.0", - "symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0", - "symfony/http-foundation": "^4.4 || ^5.0 || ^6.0", - "symfony/http-kernel": "^4.4 || ^5.0 || ^6.0", - "symfony/options-resolver": "^4.4 || ^5.0 || ^6.0", - "symfony/property-access": "^4.4 || ^5.0 || ^6.0", - "symfony/routing": "^4.4 || ^5.0 || ^6.0", - "symfony/twig-bundle": "^4.4 || ^5.0 || ^6.0", - "twig/twig": "^2.4 || ^3.0" - }, - "conflict": { - "sebastian/environment": "<1.3.4", - "sebastian/exporter": "<2.0.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.0", - "matthiasnoback/symfony-dependency-injection-test": "^3.0 || ^4.0", - "symfony/console": "^4.4 || ^5.0 || ^6.0", - "symfony/phpunit-bridge": "^4.4 || ^5.0 || ^6.0", - "symfony/yaml": "^4.4 || ^5.0 || ^6.0" - }, - "suggest": { - "egeloen/form-extra-bundle": "Allows to load CKEditor asynchronously" - }, - "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "FOS\\CKEditorBundle\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eric GELOEN", - "email": "geloen.eric@gmail.com" - }, - { - "name": "FriendsOfSymfony Community", - "homepage": "https://github.com/FriendsOfSymfony/FOSCKEditorBundle/graphs/contributors" - } - ], - "description": "Provides a CKEditor integration for your Symfony project.", - "keywords": [ - "CKEditor" - ], - "support": { - "issues": "https://github.com/FriendsOfSymfony/FOSCKEditorBundle/issues", - "source": "https://github.com/FriendsOfSymfony/FOSCKEditorBundle/tree/2.4.0" - }, - "time": "2022-01-07T12:34:18+00:00" - }, { "name": "google/apiclient", "version": "v2.15.1", @@ -2509,87 +2428,6 @@ ], "time": "2023-08-27T10:13:57+00:00" }, - { - "name": "helios-ag/fm-elfinder-bundle", - "version": "12.3.3", - "source": { - "type": "git", - "url": "https://github.com/helios-ag/FMElfinderBundle.git", - "reference": "37c3db0cc50b1158d5224acf9da0760881712212" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/helios-ag/FMElfinderBundle/zipball/37c3db0cc50b1158d5224acf9da0760881712212", - "reference": "37c3db0cc50b1158d5224acf9da0760881712212", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": "^7.4 || ^8.0", - "studio-42/elfinder": "~2.1", - "symfony/asset": "^4.4 || ^5.0 || ^5.2 || ^6.0", - "symfony/form": "^4.4 || ^5.0 || ^5.2 || ^6.0", - "symfony/framework-bundle": "^4.4 || ^5.0 || ^5.2 || ^6.0", - "symfony/twig-bundle": "^4.4 || ^5.0 || ^5.2 || ^6.0" - }, - "require-dev": { - "matthiasnoback/symfony-config-test": "^4.0", - "matthiasnoback/symfony-dependency-injection-test": "^4.1", - "php-coveralls/php-coveralls": "^2.0", - "symfony/finder": "^4.4 || ^5.0 || ^5.2 || ^6.0", - "symfony/phpunit-bridge": "^4.1 || ^5.0 || ^5.2 || ^6.0" - }, - "suggest": { - "barryvdh/elfinder-flysystem-driver": "Flysystem driver for elfinder", - "friendsofsymfony/ckeditor-bundle": "FOSCKEditorBundle WYSIWYG Editor Bundle", - "helios-ag/fm-summernote-bundle": "FMSummernoteBundle WYSIWYG Editor Bundle", - "helios-ag/fm-tinymce-bundle": "FMTinyMCEBundle WYSIWYG Editor Bundle", - "spatie/flysystem-dropbox": "Dropbox 2 Driver for Flysystem" - }, - "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "12.0-dev" - } - }, - "autoload": { - "psr-4": { - "FM\\ElfinderBundle\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Al Ganiev", - "email": "helios.ag@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://github.com/helios-ag/FMElfinderBundle/contributors" - } - ], - "description": "ElFinder bundle, adds ElFinder file manager to your Symfony project", - "homepage": "https://github.com/helios-ag/FMElfinderBundle", - "keywords": [ - "elfinder", - "file manager", - "wysiwyg" - ], - "support": { - "issues": "https://github.com/helios-ag/FMElfinderBundle/issues", - "source": "https://github.com/helios-ag/FMElfinderBundle/tree/12.3.3" - }, - "funding": [ - { - "url": "https://paypal.me/heliosag", - "type": "custom" - } - ], - "time": "2023-06-04T11:58:32+00:00" - }, { "name": "imagine/imagine", "version": "1.3.5", @@ -4832,74 +4670,6 @@ "abandoned": "Symfony", "time": "2023-02-24T14:57:12+00:00" }, - { - "name": "studio-42/elfinder", - "version": "2.1.62", - "source": { - "type": "git", - "url": "https://github.com/Studio-42/elFinder.git", - "reference": "91133c14a341158beca82aede0b2138236a96bc8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Studio-42/elFinder/zipball/91133c14a341158beca82aede0b2138236a96bc8", - "reference": "91133c14a341158beca82aede0b2138236a96bc8", - "shasum": "" - }, - "require": { - "php": ">=5.2" - }, - "suggest": { - "barryvdh/elfinder-flysystem-driver": "VolumeDriver for elFinder to use Flysystem as a root.", - "google/apiclient": "VolumeDriver GoogleDrive require `google/apiclient:^2.0.", - "kunalvarma05/dropbox-php-sdk": "VolumeDriver `Dropbox`2 require `kunalvarma05/dropbox-php-sdk.", - "nao-pon/flysystem-google-drive": "require in GoogleDrive network volume mounting with Flysystem." - }, - "type": "library", - "autoload": { - "classmap": [ - "php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Dmitry Levashov", - "email": "dio@std42.ru", - "homepage": "http://std42.ru" - }, - { - "name": "Troex Nevelin", - "email": "troex@fury.scancode.ru", - "homepage": "http://std42.ru" - }, - { - "name": "Naoki Sawada", - "email": "hypweb+elfinder@gmail.com", - "homepage": "http://xoops.hypweb.net" - }, - { - "name": "Community contributions", - "homepage": "https://github.com/Studio-42/elFinder/contributors" - } - ], - "description": "File manager for web", - "homepage": "http://elfinder.org", - "support": { - "issues": "https://github.com/Studio-42/elFinder/issues", - "source": "https://github.com/Studio-42/elFinder/tree/2.1.62" - }, - "funding": [ - { - "url": "https://github.com/nao-pon", - "type": "github" - } - ], - "time": "2023-06-13T16:39:07+00:00" - }, { "name": "swiftmailer/swiftmailer", "version": "v6.3.0", @@ -13436,5 +13206,5 @@ "ext-openssl": "*" }, "platform-dev": [], - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" } diff --git a/config/bundles.php b/config/bundles.php index 0714e35d..196f9cb5 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -16,9 +16,7 @@ Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true], Liip\ImagineBundle\LiipImagineBundle::class => ['all' => true], EWZ\Bundle\RecaptchaBundle\EWZRecaptchaBundle::class => ['all' => true], - FOS\CKEditorBundle\FOSCKEditorBundle::class => ['all' => true], DAMA\DoctrineTestBundle\DAMADoctrineTestBundle::class => ['test' => true], - FM\ElfinderBundle\FMElfinderBundle::class => ['all' => true], Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true], EasyCorp\Bundle\EasyAdminBundle\EasyAdminBundle::class => ['all' => true], Nelmio\ApiDocBundle\NelmioApiDocBundle::class => ['all' => true], diff --git a/config/packages/fm_elfinder.yaml b/config/packages/fm_elfinder.yaml deleted file mode 100644 index 299c3307..00000000 --- a/config/packages/fm_elfinder.yaml +++ /dev/null @@ -1,77 +0,0 @@ -fm_elfinder: - instances: - default: - locale: '%locale%' # defaults to current request locale - editor: ckeditor # other options are tinymce, tinymce4, form, custom and simple - fullscreen: false # defaults true, applies to simple and ckeditor editors - #include_assets: true # disable if you want to handle loading of the javascript and css assets yourself - connector: - debug: false # defaults to false - roots: # at least one root must be defined - uploads: - #show_hidden: false # defaults to false - driver: LocalFileSystem - path: '%public_uploads%' - upload_allow: ['image/png', 'image/jpg', 'image/jpeg', 'application/pdf'] - upload_deny: ['all'] - upload_max_size: 5M - admin_access: - locale: '%locale%' # defaults to current request locale - editor: simple # other options are tinymce, tinymce4, form, custom and ckeditor - fullscreen: true # defaults true, applies to simple and ckeditor editors - #include_assets: true # disable if you want to handle loading of the javascript and css assets yourself - connector: - debug: false # defaults to false - roots: # at least one root must be defined - private: - #show_hidden: false # defaults to false - driver: LocalFileSystem - path: '%private_uploads%' - upload_allow: ['image/png', 'image/jpg', 'image/jpeg', 'application/pdf'] - upload_deny: ['all'] - upload_max_size: 5M - public: - #show_hidden: false # defaults to false - driver: LocalFileSystem - path: '%public_uploads%' - upload_allow: ['image/png', 'image/jpg', 'image/jpeg', 'application/pdf'] - upload_deny: ['all'] - upload_max_size: 5M - ck_editor: - locale: '%locale%' # defaults to current request locale - editor: ckeditor # other options are tinymce, tinymce4, form, custom and simple - fullscreen: true # defaults true, applies to simple and ckeditor editors - #include_assets: true # disable if you want to handle loading of the javascript and css assets yourself - connector: - debug: false # defaults to false - roots: # at least one root must be defined - public: - #show_hidden: false # defaults to false - driver: LocalFileSystem - path: '%public_uploads%' - upload_allow: ['image/png', 'image/jpg', 'image/jpeg'] - upload_deny: ['all'] - upload_max_size: 5M - private: - #show_hidden: false # defaults to false - driver: LocalFileSystem - path: '%private_uploads%' - upload_allow: ['image/png', 'image/jpg', 'image/jpeg', 'application/pdf'] - upload_deny: ['all'] - upload_max_size: 5M - - team_editor: - locale: '%locale%' # defaults to current request locale - editor: ckeditor # other options are tinymce, tinymce4, form, custom and simple - fullscreen: true # defaults true, applies to simple and ckeditor editors - #include_assets: true # disable if you want to handle loading of the javascript and css assets yourself - connector: - debug: false # defaults to false - roots: # at least one root must be defined - public: - #show_hidden: false # defaults to false - driver: LocalFileSystem - path: '%team_images%' - upload_allow: ['image/png', 'image/jpg', 'image/jpeg', 'application/pdf'] - upload_deny: ['all'] - upload_max_size: 5M \ No newline at end of file diff --git a/config/packages/fos_ckeditor.yaml b/config/packages/fos_ckeditor.yaml deleted file mode 100644 index ced8b0b0..00000000 --- a/config/packages/fos_ckeditor.yaml +++ /dev/null @@ -1,5 +0,0 @@ -# Read the documentation: https://symfony.com/doc/current/bundles/FOSCKEditorBundle/index.html - -twig: - form_themes: - - '@FOSCKEditor/Form/ckeditor_widget.html.twig' diff --git a/config/routes/fm_elfinder.yaml b/config/routes/fm_elfinder.yaml deleted file mode 100644 index 6f423836..00000000 --- a/config/routes/fm_elfinder.yaml +++ /dev/null @@ -1,2 +0,0 @@ -fm_elfinder: - resource: "@FMElfinderBundle/Resources/config/routing.yaml" diff --git a/src/Form/Type/CreateExecutiveBoardType.php b/src/Form/Type/CreateExecutiveBoardType.php index 64022b3e..4d50b6fd 100644 --- a/src/Form/Type/CreateExecutiveBoardType.php +++ b/src/Form/Type/CreateExecutiveBoardType.php @@ -3,7 +3,6 @@ namespace App\Form\Type; use App\Entity\ExecutiveBoard; -use FOS\CKEditorBundle\Form\Type\CKEditorType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\EmailType; use Symfony\Component\Form\Extension\Core\Type\SubmitType; @@ -29,15 +28,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) ]) ->add('preview', SubmitType::class, [ 'label' => 'Forhåndsvis', - ]) - ->add('description', CKEditorType::class, [ - 'required' => false, - 'config' => [ - 'height' => 500, - 'filebrowserBrowseRoute' => 'elfinder', - 'filebrowserBrowseRouteParameters' => ['instance' => 'team_editor'], ], - 'label' => 'Lang beskrivelse (valgfritt)', - 'attr' => ['class' => 'hide'], // Graceful loading, hides the textarea that is replaced by ckeditor ]); } diff --git a/src/Form/Type/CreateTeamType.php b/src/Form/Type/CreateTeamType.php index 7945bdcf..58749840 100644 --- a/src/Form/Type/CreateTeamType.php +++ b/src/Form/Type/CreateTeamType.php @@ -3,7 +3,6 @@ namespace App\Form\Type; use App\Entity\Team; -use FOS\CKEditorBundle\Form\Type\CKEditorType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; use Symfony\Component\Form\Extension\Core\Type\DateTimeType; @@ -45,15 +44,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) ->add('active', CheckboxType::class, [ 'label' => 'Aktivt team', 'required' => false, - ]) - ->add('description', CKEditorType::class, [ - 'required' => false, - 'config' => [ - 'height' => 500, - 'filebrowserBrowseRoute' => 'elfinder', - 'filebrowserBrowseRouteParameters' => ['instance' => 'team_editor'], ], - 'label' => 'Lang beskrivelse (valgfritt)', - 'attr' => ['class' => 'hide'], // Graceful loading, hides the textarea that is replaced by ckeditor ]); } diff --git a/symfony.lock b/symfony.lock index dec881b0..6b3d087d 100644 --- a/symfony.lock +++ b/symfony.lock @@ -141,18 +141,6 @@ "friendsofphp/proxy-manager-lts": { "version": "v1.0.3" }, - "friendsofsymfony/ckeditor-bundle": { - "version": "2.4", - "recipe": { - "repo": "github.com/symfony/recipes-contrib", - "branch": "master", - "version": "2.0", - "ref": "f5ad42002183a6881962683e6d84bbb25cdfce5d" - }, - "files": [ - "config/packages/fos_ckeditor.yaml" - ] - }, "google/apiclient": { "version": "2.0", "recipe": { @@ -192,19 +180,6 @@ "guzzlehttp/psr7": { "version": "1.7.0" }, - "helios-ag/fm-elfinder-bundle": { - "version": "10.1", - "recipe": { - "repo": "github.com/symfony/recipes-contrib", - "branch": "master", - "version": "10.0", - "ref": "addd79a9903ee92664f4cff61eb6cdd1b95945e7" - }, - "files": [ - "config/routes/fm_elfinder.yaml", - "config/packages/fm_elfinder.yaml" - ] - }, "imagine/imagine": { "version": "1.2.4" }, @@ -443,9 +418,6 @@ "config/packages/sensio_framework_extra.yaml" ] }, - "studio-42/elfinder": { - "version": "2.1.59" - }, "swiftmailer/swiftmailer": { "version": "v6.2.7" }, diff --git a/templates/executive_board/update_executive_board.html.twig b/templates/executive_board/update_executive_board.html.twig index a5316d43..dea18d8b 100644 --- a/templates/executive_board/update_executive_board.html.twig +++ b/templates/executive_board/update_executive_board.html.twig @@ -21,7 +21,7 @@ {{ form_row(form.shortDescription) }} - {{ form_row(form.description) }} + (For å endre team_description, benytt admin panel)

{{ form_widget(form.preview, {'attr': {'class': 'btn btn-secondary', 'formtarget': '_blank'}}) }} diff --git a/templates/team_admin/create_team.html.twig b/templates/team_admin/create_team.html.twig index 85470db3..6de6af7a 100644 --- a/templates/team_admin/create_team.html.twig +++ b/templates/team_admin/create_team.html.twig @@ -32,7 +32,7 @@ {{ form_row(form.acceptApplication) }} {{ form_row(form.deadline) }} {{ form_row(form.active) }} - {{ form_row(form.description) }} + (For å endre team_description, benytt admin panel)

{{ form_widget(form.preview, {'attr': {'class': 'btn btn-secondary ignore-auto-disable', 'formtarget': '_blank'}}) }}