diff --git a/core/lib/Drupal/Component/Serialization/YamlPecl.php b/core/lib/Drupal/Component/Serialization/YamlPecl.php
index 8200f49..a9d9801 100644
--- a/core/lib/Drupal/Component/Serialization/YamlPecl.php
+++ b/core/lib/Drupal/Component/Serialization/YamlPecl.php
@@ -52,6 +52,7 @@ public static function decode($raw) {
     $ndocs = 0;
     $data = yaml_parse($raw, 0, $ndocs, [
       YAML_BOOL_TAG => '\Drupal\Component\Serialization\YamlPecl::applyBooleanCallbacks',
+      '!php/const' => '\Drupal\Component\Serialization\YamlPecl::parsePhpConstant',
     ]);
     restore_error_handler();
     return $data;
@@ -107,4 +108,21 @@ public static function applyBooleanCallbacks($value, $tag, $flags) {
     return $map[strtolower($value)];
   }
 
+  /**
+   * Parse PHP constants from the encoded content.
+   *
+   * @param mixed $value
+   *   Value from YAML file.
+   * @param string $tag
+   *   Tag that triggered the callback.
+   * @param int $flags
+   *   Scalar entity style flags.
+   *
+   * @return string
+   *   The value of $value interpreted as a constant.
+   */
+  public static function parsePhpConstant($value, $tag, $flags) {
+    return constant($value);
+  }
+
 }
diff --git a/core/lib/Drupal/Component/Serialization/YamlSymfony.php b/core/lib/Drupal/Component/Serialization/YamlSymfony.php
index efe3039..22a2afb 100644
--- a/core/lib/Drupal/Component/Serialization/YamlSymfony.php
+++ b/core/lib/Drupal/Component/Serialization/YamlSymfony.php
@@ -34,7 +34,7 @@ public static function decode($raw) {
       $yaml = new Parser();
       // Make sure we have a single trailing newline. A very simple config like
       // 'foo: bar' with no newline will fail to parse otherwise.
-      return $yaml->parse($raw, SymfonyYaml::PARSE_EXCEPTION_ON_INVALID_TYPE | SymfonyYaml::PARSE_KEYS_AS_STRINGS);
+      return $yaml->parse($raw, SymfonyYaml::PARSE_EXCEPTION_ON_INVALID_TYPE | SymfonyYaml::PARSE_KEYS_AS_STRINGS | SymfonyYaml::PARSE_CONSTANT);
     }
     catch (\Exception $e) {
       throw new InvalidDataTypeException($e->getMessage(), $e->getCode(), $e);
diff --git a/core/profiles/standard/config/install/field.storage.node.field_tags.yml b/core/profiles/standard/config/install/field.storage.node.field_tags.yml
index 73f821f..031b12b 100644
--- a/core/profiles/standard/config/install/field.storage.node.field_tags.yml
+++ b/core/profiles/standard/config/install/field.storage.node.field_tags.yml
@@ -12,7 +12,7 @@ settings:
   target_type: taxonomy_term
 module: core
 locked: false
-cardinality: -1
+cardinality: !php/const Drupal\Core\Field\FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED
 translatable: true
 indexes: {  }
 persist_with_no_fields: false
