Issue #3485296 by bradjones1, longwave, alexpott: Regression: Deprecation of `yaml_parser_class` setting in 10.3 breaks sites < 11.0
(cherry picked from commit 4a8aaa4a9c
)
merge-requests/10183/head
parent
2a4aa0206a
commit
eb382d2776
|
@ -49,6 +49,10 @@
|
||||||
%Drupal\\editor\\Form\\EditorImageDialog is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. There is no replacement. See https://www.drupal.org/node/3291493%
|
%Drupal\\editor\\Form\\EditorImageDialog is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. There is no replacement. See https://www.drupal.org/node/3291493%
|
||||||
%Drupal\\editor\\Form\\EditorLinkDialog is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. There is no replacement. See https://www.drupal.org/node/3291493%
|
%Drupal\\editor\\Form\\EditorLinkDialog is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. There is no replacement. See https://www.drupal.org/node/3291493%
|
||||||
|
|
||||||
|
# In Drupal 10, skip deprecations for the "yaml_parser_class" setting.
|
||||||
|
# This is retained with a BC layer, but removed in Drupal 11.
|
||||||
|
%The "yaml_parser_class" setting is deprecated in drupal:10.3.0. This setting should be removed from the settings file, since its usage has been removed. See https://www.drupal.org/node/3415489.%
|
||||||
|
|
||||||
# Symfony 7.
|
# Symfony 7.
|
||||||
%Method "Symfony\\Contracts\\Service\\ResetInterface::reset\(\)" might add "void" as a native return type declaration in the future. Do the same in implementation "Drupal\\Component\\DependencyInjection\\Container" now to avoid errors or add an explicit @return annotation to suppress this message.%
|
%Method "Symfony\\Contracts\\Service\\ResetInterface::reset\(\)" might add "void" as a native return type declaration in the future. Do the same in implementation "Drupal\\Component\\DependencyInjection\\Container" now to avoid errors or add an explicit @return annotation to suppress this message.%
|
||||||
|
|
||||||
|
|
|
@ -730,6 +730,8 @@ $settings['container_yamls'][] = $app_root . '/' . $site_path . '/services.yml';
|
||||||
* Provide a fully qualified class name here if you would like to provide an
|
* Provide a fully qualified class name here if you would like to provide an
|
||||||
* alternate implementation YAML parser. The class must implement the
|
* alternate implementation YAML parser. The class must implement the
|
||||||
* \Drupal\Component\Serialization\SerializationInterface interface.
|
* \Drupal\Component\Serialization\SerializationInterface interface.
|
||||||
|
*
|
||||||
|
* This setting is deprecated in Drupal 10.3 and removed in Drupal 11.
|
||||||
*/
|
*/
|
||||||
# $settings['yaml_parser_class'] = NULL;
|
# $settings['yaml_parser_class'] = NULL;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,23 @@
|
||||||
<?php
|
<?php
|
||||||
// phpcs:ignoreFile
|
|
||||||
|
namespace Drupal\Core\Serialization;
|
||||||
|
|
||||||
|
use Drupal\Core\Site\Settings;
|
||||||
|
use Drupal\Component\Serialization\Yaml as ComponentYaml;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides a BC layer for Drupal\Core\Serialization\Yaml.
|
* Provides a YAML serialization implementation.
|
||||||
|
*
|
||||||
|
* Allow settings to override the YAML implementation resolution.
|
||||||
*/
|
*/
|
||||||
class_alias('\Drupal\Component\Serialization\Yaml', '\Drupal\Core\Serialization\Yaml');
|
class Yaml extends ComponentYaml {
|
||||||
|
|
||||||
|
public static function decode($raw) {
|
||||||
|
if ($class = Settings::get('yaml_parser_class')) {
|
||||||
|
return $class::decode($raw);
|
||||||
|
}
|
||||||
|
|
||||||
|
return parent::decode($raw);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -730,6 +730,8 @@ $settings['container_yamls'][] = $app_root . '/' . $site_path . '/services.yml';
|
||||||
* Provide a fully qualified class name here if you would like to provide an
|
* Provide a fully qualified class name here if you would like to provide an
|
||||||
* alternate implementation YAML parser. The class must implement the
|
* alternate implementation YAML parser. The class must implement the
|
||||||
* \Drupal\Component\Serialization\SerializationInterface interface.
|
* \Drupal\Component\Serialization\SerializationInterface interface.
|
||||||
|
*
|
||||||
|
* This setting is deprecated in Drupal 10.3 and removed in Drupal 11.
|
||||||
*/
|
*/
|
||||||
# $settings['yaml_parser_class'] = NULL;
|
# $settings['yaml_parser_class'] = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue