Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293507

Add setSerializer to Component\Serialization\Yaml and deprecate Core\Serialization\Yaml

$
0
0

Problem/Motivation

Drupal has two Yaml serialization classes, which is confusing.

  • Drupal\Component\Serialization\Yaml
  • Drupal\Core\Serialization\Yaml

The difference is the latter allows overriding the serializer through Drupal's setting management.

Proposed resolution

Drupal\Component\Serialization\Yaml should have a setSerializer method. DrupalKernel as part of bootEnvironment process could call the method to set the serializer.

Drupal\Component\Serialization\Yaml::setSerializer(Settings::get('yaml_parser_class'))

Remaining tasks

API changes

Adds Drupal\Component\Serialization\Yaml::setSerializer

Deprecates Drupal\Core\Serialization\Yaml

Release notes snippet


Viewing all articles
Browse latest Browse all 293507

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>