From 71871328c6ad5c5dc75e5db26a7e13876b802fb8 Mon Sep 17 00:00:00 2001 From: Awilum Date: Wed, 5 Aug 2020 15:11:19 +0300 Subject: [PATCH] Themes Admin 1.1.0 --- CHANGELOG.md | 7 +++++++ README.md | 4 ++-- app/Controllers/ThemesController.php | 8 ++++---- composer.json | 4 ++-- dependencies.php | 1 + plugin.yaml | 4 ++-- 6 files changed, 18 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48029e5..f5af072 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ + +# [1.1.0](https://github.com/flextype-plugins/themes-admin/compare/v1.0.6...v1.1.0) (2020-08-05) + +### Features + +* **core** update code base for new Flextype 0.9.9 + # [1.0.6](https://github.com/flextype-plugins/themes-admin/compare/v1.0.5...v1.0.6) (2020-06-23) diff --git a/README.md b/README.md index 255cab0..3f06f0f 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

Themes Admin Plugin for Flextype

-Version License Total downloads Flextype Crowdin Quality Score Discord +Version License Total downloads Flextype Crowdin Quality Score Discord

Themes Admin plugin to manage site themes for the website frontend. @@ -12,7 +12,7 @@ The following dependencies need to be installed for Themes Admin Plugin. | Item | Version | Download | |---|---|---| -| [flextype](https://github.com/flextype/flextype) | 0.9.8 | [download](https://github.com/flextype/flextype/releases) | +| [flextype](https://github.com/flextype/flextype) | 0.9.9 | [download](https://github.com/flextype/flextype/releases) | | [twig](https://github.com/flextype-plugins/twig) | >=1.0.0 | [download](https://github.com/flextype-plugins/twig/releases) | | [admin](https://github.com/flextype-plugins/icon) | >=1.0.0 | [download](https://github.com/flextype-plugins/admin/releases) | | [form](https://github.com/flextype-plugins/form) | >=1.0.0 | [download](https://github.com/flextype-plugins/form/releases) | diff --git a/app/Controllers/ThemesController.php b/app/Controllers/ThemesController.php index 3751876..e5aff2d 100644 --- a/app/Controllers/ThemesController.php +++ b/app/Controllers/ThemesController.php @@ -69,14 +69,14 @@ public function activateProcess(Request $request, Response $response) : Response $post_data = $request->getParsedBody(); $custom_settings_file = PATH['project'] . '/config/plugins/site/settings.yaml'; - $custom_settings_file_data = $this->serializer->decode(Filesystem::read($custom_settings_file), 'yaml'); + $custom_settings_file_data = $this->yaml->decode(Filesystem::read($custom_settings_file)); Arrays::set($custom_settings_file_data, 'theme', $post_data['theme-id']); - Filesystem::write($custom_settings_file, $this->serializer->encode($custom_settings_file_data, 'yaml')); + Filesystem::write($custom_settings_file, $this->yaml->encode($custom_settings_file_data)); // clear cache - $this->cache->clear('doctrine'); + $this->cache->purge('doctrine'); // Redirect to themes index page return $response->withRedirect($this->router->pathFor('admin.themes.index')); @@ -105,7 +105,7 @@ public function information(Request $request, Response $response) : Response [ 'menu_item' => 'themes', 'id' => $id, - 'theme_manifest' => $this->serializer->decode($custom_theme_manifest_file_content, 'yaml'), + 'theme_manifest' => $this->yaml->decode($custom_theme_manifest_file_content), 'links' => [ 'themes' => [ 'link' => $this->router->pathFor('admin.themes.index'), diff --git a/composer.json b/composer.json index 6630913..ac0b3c9 100755 --- a/composer.json +++ b/composer.json @@ -16,13 +16,13 @@ "issues": "https://github.com/flextype-plugins/themes-admin/issues" }, "require": { - "php": ">=7.2.0" + "php": ">=7.2.5" }, "config": { "apcu-autoloader": true, "optimize-autoloader": true, "platform": { - "php": "7.2.0" + "php": "7.2.5" } }, "autoload": { diff --git a/dependencies.php b/dependencies.php index 9f427ba..c432e25 100644 --- a/dependencies.php +++ b/dependencies.php @@ -12,6 +12,7 @@ namespace Flextype\Plugin\ThemesAdmin; use Flextype\Plugin\ThemesAdmin\Controllers\ThemesController; +use Flextype\Plugin\ThemesAdmin\Controllers\TemplatesController; use Flextype\Plugin\ThemesAdmin\Models\Themes; use Slim\Flash\Messages; diff --git a/plugin.yaml b/plugin.yaml index 3512d56..152b617 100755 --- a/plugin.yaml +++ b/plugin.yaml @@ -1,5 +1,5 @@ name: Themes Admin -version: 1.0.6 +version: 1.1.0 description: Themes Admin plugin to manage site themes for the website frontend. icon: fas fa-paint-brush author: @@ -11,7 +11,7 @@ bugs: https://github.com/flextype-plugins/themes-admin/issues license: MIT dependencies: - flextype: 0.9.8 + flextype: 0.9.9 twig: '>=1.0.0' admin: '>=1.0.0' form: '>=1.0.0'