Loading core/lib/Drupal/Core/Config/TypedConfigManager.php +1 −5 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ namespace Drupal\Core\Config; use Drupal\Component\Render\FormattableMarkup; use Drupal\Component\Utility\NestedArray; use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Config\Schema\ConfigSchemaAlterException; Loading Loading @@ -83,10 +82,7 @@ public function get($name) { $data = $this->configStorage->read($name); if ($data === FALSE) { // For a typed config the data MUST exist. $data = []; trigger_error(new FormattableMarkup('Missing required data for typed configuration: @config', [ '@config' => $name, ]), E_USER_ERROR); throw new \InvalidArgumentException("Missing required data for typed configuration: $name"); } return $this->createFromNameAndData($name, $data); } Loading core/tests/Drupal/KernelTests/Config/TypedConfigTest.php +1 −2 Original line number Diff line number Diff line Loading @@ -12,7 +12,6 @@ use Drupal\Core\TypedData\Type\IntegerInterface; use Drupal\Core\TypedData\Type\StringInterface; use Drupal\KernelTests\KernelTestBase; use PHPUnit\Framework\Error\Error; use Symfony\Component\Validator\ConstraintViolationListInterface; /** Loading Loading @@ -53,7 +52,7 @@ public function testTypedDataAPI() { $typed_config_manager->get('config_test.non_existent'); $this->fail('Expected error when trying to get non-existent typed config.'); } catch (Error $e) { catch (\InvalidArgumentException $e) { $this->assertEquals('Missing required data for typed configuration: config_test.non_existent', $e->getMessage()); } Loading Loading
core/lib/Drupal/Core/Config/TypedConfigManager.php +1 −5 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ namespace Drupal\Core\Config; use Drupal\Component\Render\FormattableMarkup; use Drupal\Component\Utility\NestedArray; use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Config\Schema\ConfigSchemaAlterException; Loading Loading @@ -83,10 +82,7 @@ public function get($name) { $data = $this->configStorage->read($name); if ($data === FALSE) { // For a typed config the data MUST exist. $data = []; trigger_error(new FormattableMarkup('Missing required data for typed configuration: @config', [ '@config' => $name, ]), E_USER_ERROR); throw new \InvalidArgumentException("Missing required data for typed configuration: $name"); } return $this->createFromNameAndData($name, $data); } Loading
core/tests/Drupal/KernelTests/Config/TypedConfigTest.php +1 −2 Original line number Diff line number Diff line Loading @@ -12,7 +12,6 @@ use Drupal\Core\TypedData\Type\IntegerInterface; use Drupal\Core\TypedData\Type\StringInterface; use Drupal\KernelTests\KernelTestBase; use PHPUnit\Framework\Error\Error; use Symfony\Component\Validator\ConstraintViolationListInterface; /** Loading Loading @@ -53,7 +52,7 @@ public function testTypedDataAPI() { $typed_config_manager->get('config_test.non_existent'); $this->fail('Expected error when trying to get non-existent typed config.'); } catch (Error $e) { catch (\InvalidArgumentException $e) { $this->assertEquals('Missing required data for typed configuration: config_test.non_existent', $e->getMessage()); } Loading