diff -u b/core/lib/Drupal/Core/Extension/Extension.php b/core/lib/Drupal/Core/Extension/Extension.php --- b/core/lib/Drupal/Core/Extension/Extension.php +++ b/core/lib/Drupal/Core/Extension/Extension.php @@ -161,6 +161,14 @@ 'pathname' => $this->pathname, 'filename' => $this->filename, ); + + // @todo ThemeHandler::listInfo(), ThemeHandler::rebuildThemeData(), and + // system_list() are adding custom properties to the Extension object. + $info = new \ReflectionObject($this); + foreach ($info->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) { + $data[$property->getName()] = $property->getValue($this); + } + return serialize($data); } @@ -172,6 +180,14 @@ $this->type = $data['type']; $this->pathname = $data['pathname']; $this->filename = $data['filename']; + + // @todo ThemeHandler::listInfo(), ThemeHandler::rebuildThemeData(), and + // system_list() are adding custom properties to the Extension object. + foreach ($data as $property => $value) { + if (!isset($this->$property)) { + $this->$property = $value; + } + } } }