diff --git a/core/modules/simpletest/src/BrowserTestBase.php b/core/modules/simpletest/src/BrowserTestBase.php index 4d0a8f2..0131508 100644 --- a/core/modules/simpletest/src/BrowserTestBase.php +++ b/core/modules/simpletest/src/BrowserTestBase.php @@ -11,6 +11,7 @@ use Behat\Mink\Element\Element; use Behat\Mink\Mink; use Behat\Mink\Session; +use Drupal\Component\Serialization\Yaml; use Drupal\Component\Utility\SafeMarkup; use Drupal\Component\Utility\UrlHelper; use Drupal\Core\Cache\Cache; @@ -876,15 +877,14 @@ public function installDrupal() { copy($settings_services_file, $directory . '/services.yml'); if ($this->strictConfigSchema) { // Add a listener to validate configuration schema on save. - $yaml = new \Symfony\Component\Yaml\Yaml(); $content = file_get_contents($directory . '/services.yml'); - $services = $yaml->parse($content); + $services = Yaml::decode($content); $services['services']['simpletest.config_schema_checker'] = [ 'class' => 'Drupal\Core\Config\Testing\ConfigSchemaChecker', 'arguments' => ['@config.typed'], 'tags' => [['name' => 'event_subscriber']] ]; - file_put_contents($directory . '/services.yml', $yaml->dump($services)); + file_put_contents($directory . '/services.yml', Yaml::encode($services)); } // Since Drupal is bootstrapped already, install_begin_request() will not