From 9a8b47872e243ddad2a905d045382f6f148c4436 Mon Sep 17 00:00:00 2001 From: Djamil Legato Date: Tue, 13 Nov 2018 23:05:18 -0800 Subject: [PATCH 1/8] Updated opencollective backers/sponsors list --- README.md | 63 ++----------------------------------------------------- 1 file changed, 2 insertions(+), 61 deletions(-) diff --git a/README.md b/README.md index 5afbe4365..2e5177354 100644 --- a/README.md +++ b/README.md @@ -107,71 +107,12 @@ If you discover a possible security issue related to Grav or one of its plugins, # Backers Support Grav with a monthly donation to help us continue development. [[Become a backer](https://opencollective.com/grav#backer)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # Sponsors Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/grav#sponsor)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + # License From 4daa07fd14a08c05a3198b12f6bda7230a64d00b Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 15 Nov 2018 16:21:51 -0700 Subject: [PATCH 2/8] Discord Chat button --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2e5177354..471ea1e65 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ![](https://avatars1.githubusercontent.com/u/8237355?v=2&s=50) Grav -[![SensioLabsInsight](https://insight.sensiolabs.com/projects/cfd20465-d0f8-4a0a-8444-467f5b5f16ad/mini.png)](https://insight.sensiolabs.com/projects/cfd20465-d0f8-4a0a-8444-467f5b5f16ad) [![Slack](https://grav-chat.now.sh/badge.svg)](https://chat.getgrav.org) [![Build Status](https://travis-ci.org/getgrav/grav.svg?branch=develop)](https://travis-ci.org/getgrav/grav) [![OpenCollective](https://opencollective.com/grav/backers/badge.svg)](#backers) [![OpenCollective](https://opencollective.com/grav/sponsors/badge.svg)](#sponsors) +[![SensioLabsInsight](https://insight.sensiolabs.com/projects/cfd20465-d0f8-4a0a-8444-467f5b5f16ad/mini.png)](https://insight.sensiolabs.com/projects/cfd20465-d0f8-4a0a-8444-467f5b5f16ad) [![Discord](https://img.shields.io/discord/501836936584101899.svg)](https://chat.getgrav.org) [![Build Status](https://travis-ci.org/getgrav/grav.svg?branch=develop)](https://travis-ci.org/getgrav/grav) [![OpenCollective](https://opencollective.com/grav/backers/badge.svg)](#backers) [![OpenCollective](https://opencollective.com/grav/sponsors/badge.svg)](#sponsors) Grav is a **Fast**, **Simple**, and **Flexible**, file-based Web-platform. There is **Zero** installation required. Just extract the ZIP archive, and you are already up and running. It follows similar principles to other flat-file CMS platforms, but has a different design philosophy than most. Grav comes with a powerful **Package Management System** to allow for simple installation and upgrading of plugins and themes, as well as simple updating of Grav itself. From 5e7eb6b2f4526945d27993cd9bb706ec49cf1991 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 15 Nov 2018 16:29:08 -0700 Subject: [PATCH 3/8] Better discord badge --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 471ea1e65..3dd2a8b62 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ![](https://avatars1.githubusercontent.com/u/8237355?v=2&s=50) Grav -[![SensioLabsInsight](https://insight.sensiolabs.com/projects/cfd20465-d0f8-4a0a-8444-467f5b5f16ad/mini.png)](https://insight.sensiolabs.com/projects/cfd20465-d0f8-4a0a-8444-467f5b5f16ad) [![Discord](https://img.shields.io/discord/501836936584101899.svg)](https://chat.getgrav.org) [![Build Status](https://travis-ci.org/getgrav/grav.svg?branch=develop)](https://travis-ci.org/getgrav/grav) [![OpenCollective](https://opencollective.com/grav/backers/badge.svg)](#backers) [![OpenCollective](https://opencollective.com/grav/sponsors/badge.svg)](#sponsors) +[![SensioLabsInsight](https://insight.sensiolabs.com/projects/cfd20465-d0f8-4a0a-8444-467f5b5f16ad/mini.png)](https://insight.sensiolabs.com/projects/cfd20465-d0f8-4a0a-8444-467f5b5f16ad) [![Discord](https://img.shields.io/discord/501836936584101899.svg?logo=discord&colorB=728ADA&label=Discord%20Chat)](https://chat.getgrav.org) [![Build Status](https://travis-ci.org/getgrav/grav.svg?branch=develop)](https://travis-ci.org/getgrav/grav) [![OpenCollective](https://opencollective.com/grav/backers/badge.svg)](#backers) [![OpenCollective](https://opencollective.com/grav/sponsors/badge.svg)](#sponsors) Grav is a **Fast**, **Simple**, and **Flexible**, file-based Web-platform. There is **Zero** installation required. Just extract the ZIP archive, and you are already up and running. It follows similar principles to other flat-file CMS platforms, but has a different design philosophy than most. Grav comes with a powerful **Package Management System** to allow for simple installation and upgrading of plugins and themes, as well as simple updating of Grav itself. @@ -124,7 +124,7 @@ See [LICENSE](LICENSE.txt) # Running Tests -First install the dev dependencies by running `composer update` from the Grav root. -Then `composer test` will run the Unit Tests, which should be always executed successfully on any site. -Windows users should use the `composer test-windows` command. +First install the dev dependencies by running `composer update` from the Grav root. +Then `composer test` will run the Unit Tests, which should be always executed successfully on any site. +Windows users should use the `composer test-windows` command. You can also run a single unit test file, e.g. `composer test tests/unit/Grav/Common/AssetsTest.php` From 5e1980d77058356bf6f4ab0bea857a03a565aec0 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Thu, 15 Nov 2018 16:30:21 -0700 Subject: [PATCH 4/8] New Discord reference --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3dd2a8b62..6ed3198ca 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ If you discover a possible security issue related to Grav or one of its plugins, * [Install](https://learn.getgrav.org/basics/installation) Grav in few seconds * Understand the [Configuration](https://learn.getgrav.org/basics/grav-configuration) * Take a peek at our available free [Skeletons](https://getgrav.org/downloads/skeletons) -* If you have questions, jump on our [Slack Room](https://getgrav.org/slack)! +* If you have questions, jump on our [Discord Chat Server](https://chat.getgrav.org)! * Have fun! # Exploring More From b6c582ad3a2215da0999826f70398653a528e94a Mon Sep 17 00:00:00 2001 From: Stephan Diehl Date: Sat, 24 Nov 2018 07:01:47 +0100 Subject: [PATCH 5/8] Update InitializeProcessor.php (#2268) fix redirect_trailing_slash in a multi language page --- system/src/Grav/Common/Processors/InitializeProcessor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Processors/InitializeProcessor.php b/system/src/Grav/Common/Processors/InitializeProcessor.php index b56d0b177..6bf8cdd58 100644 --- a/system/src/Grav/Common/Processors/InitializeProcessor.php +++ b/system/src/Grav/Common/Processors/InitializeProcessor.php @@ -47,7 +47,7 @@ class InitializeProcessor extends ProcessorBase implements ProcessorInterface // Redirect pages with trailing slash if configured to do so. $path = $uri->path() ?: '/'; if ($path !== '/' && $config->get('system.pages.redirect_trailing_slash', false) && Utils::endsWith($path, '/')) { - $this->container->redirect(rtrim($path, '/')); + $this->container->redirectLangSafe(rtrim($path, '/')); } $this->container->setLocale(); From 708c79cef8f1ce041ee5333de2305ee5d34a0752 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Tue, 27 Nov 2018 10:15:55 +0200 Subject: [PATCH 6/8] Improved user serialization to use less memory in the session --- CHANGELOG.md | 6 +++++ system/src/Grav/Common/File/CompiledFile.php | 24 +++++++++++++++++++ system/src/Grav/Common/User/User.php | 25 ++++++++++++++++++++ 3 files changed, 55 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b43c8fb5..b80cd01da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v1.5.6 +## mm/dd/2018 + +1. [](#improved) + * Improved user serialization to use less memory in the session + # v1.5.5 ## 11/12/2018 diff --git a/system/src/Grav/Common/File/CompiledFile.php b/system/src/Grav/Common/File/CompiledFile.php index 4da55d9eb..0fc9bb3b4 100644 --- a/system/src/Grav/Common/File/CompiledFile.php +++ b/system/src/Grav/Common/File/CompiledFile.php @@ -82,4 +82,28 @@ trait CompiledFile return parent::content($var); } + + /** + * Serialize file. + */ + public function __sleep() + { + return [ + 'filename', + 'extension', + 'raw', + 'content', + 'settings' + ]; + } + + /** + * Unserialize file. + */ + public function __wakeup() + { + if (!isset(static::$instances[$this->filename])) { + static::$instances[$this->filename] = $this; + } + } } diff --git a/system/src/Grav/Common/User/User.php b/system/src/Grav/Common/User/User.php index 438ca97a7..9cce364fd 100644 --- a/system/src/Grav/Common/User/User.php +++ b/system/src/Grav/Common/User/User.php @@ -286,4 +286,29 @@ class User extends Data return 'https://www.gravatar.com/avatar/' . md5($this->email); } + + /** + * Serialize user. + */ + public function __sleep() + { + return [ + 'items', + 'storage' + ]; + } + + /** + * Unserialize user. + */ + public function __wakeup() + { + $this->gettersVariable = 'items'; + $this->nestedSeparator = '.'; + + if (null === $this->blueprints) { + $blueprints = new Blueprints; + $this->blueprints = $blueprints->get('user/account'); + } + } } From b3e9974e95d34266f24da26308a747054e550621 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Fri, 14 Dec 2018 15:06:39 -0700 Subject: [PATCH 7/8] updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b80cd01da..a0c1d016e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## mm/dd/2018 1. [](#improved) + * Updated InitializeProcessor.php to use lang-safe redirect [#2268](https://github.com/getgrav/grav/pull/2268) * Improved user serialization to use less memory in the session # v1.5.5 From 54a177279ff74b222a1db4470c6285a7ae5f241d Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Fri, 14 Dec 2018 15:07:12 -0700 Subject: [PATCH 8/8] prepare for release --- CHANGELOG.md | 2 +- system/defines.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0c1d016e..bc6af650e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # v1.5.6 -## mm/dd/2018 +## 12/14/2018 1. [](#improved) * Updated InitializeProcessor.php to use lang-safe redirect [#2268](https://github.com/getgrav/grav/pull/2268) diff --git a/system/defines.php b/system/defines.php index 001d88649..9357ae60b 100644 --- a/system/defines.php +++ b/system/defines.php @@ -8,7 +8,7 @@ // Some standard defines define('GRAV', true); -define('GRAV_VERSION', '1.5.5'); +define('GRAV_VERSION', '1.5.6'); define('GRAV_TESTING', false); define('DS', '/');