diff --git a/core/lib/Drupal/Core/Config/Config.php b/core/lib/Drupal/Core/Config/Config.php index 68502c6..8922049 100644 --- a/core/lib/Drupal/Core/Config/Config.php +++ b/core/lib/Drupal/Core/Config/Config.php @@ -11,6 +11,7 @@ use Drupal\Component\Utility\String; use Drupal\Core\Config\ConfigNameException; use Drupal\Core\Config\Schema\SchemaIncompleteException; +use Drupal\Core\DependencyInjection\DependencySerialization; use Drupal\Core\TypedData\PrimitiveInterface; use Drupal\Core\TypedData\Type\FloatInterface; use Drupal\Core\TypedData\Type\IntegerInterface; @@ -20,7 +21,7 @@ /** * Defines the default configuration object. */ -class Config { +class Config extends DependencySerialization { /** * The maximum length of a configuration object name. diff --git a/core/lib/Drupal/Core/DependencyInjection/Container.php b/core/lib/Drupal/Core/DependencyInjection/Container.php index 0cf37a3..7ed65d1 100644 --- a/core/lib/Drupal/Core/DependencyInjection/Container.php +++ b/core/lib/Drupal/Core/DependencyInjection/Container.php @@ -31,8 +31,7 @@ public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE * {@inheritdoc} */ function __sleep() { - throw new \Exception("No, no, don't do this!"); + throw new \Exception('Serializing the service container is not allowed.'); } - } diff --git a/core/lib/Drupal/Core/Language/LanguageManager.php b/core/lib/Drupal/Core/Language/LanguageManager.php index 2bd3f20..6ddf673 100644 --- a/core/lib/Drupal/Core/Language/LanguageManager.php +++ b/core/lib/Drupal/Core/Language/LanguageManager.php @@ -8,12 +8,13 @@ namespace Drupal\Core\Language; use Drupal\Component\Utility\String; +use Drupal\Core\DependencyInjection\DependencySerialization; use Drupal\Core\StringTranslation\TranslationInterface; /** * Class responsible for providing language support on language-unaware sites. */ -class LanguageManager implements LanguageManagerInterface { +class LanguageManager extends DependencySerialization implements LanguageManagerInterface { /** * The string translation service. diff --git a/core/modules/views/lib/Drupal/views/ViewExecutable.php b/core/modules/views/lib/Drupal/views/ViewExecutable.php index 88ebefc..24b45ab 100644 --- a/core/modules/views/lib/Drupal/views/ViewExecutable.php +++ b/core/modules/views/lib/Drupal/views/ViewExecutable.php @@ -7,6 +7,7 @@ namespace Drupal\views; +use Drupal\Core\DependencyInjection\DependencySerialization; use Drupal\Core\Session\AccountInterface; use Drupal\views\Plugin\views\query\QueryPluginBase; use Drupal\views\ViewStorageInterface; @@ -25,7 +26,7 @@ * An object to contain all of the data to generate a view, plus the member * functions to build the view query, execute the query and render the output. */ -class ViewExecutable { +class ViewExecutable extends DependencySerialization { /** * The config entity in which the view is stored.