diff --git a/composer.json b/composer.json index ef54328..85e67df 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ ], "require": { "php": ">=7.4", - "dflydev/dot-access-data": "1.*", + "dflydev/dot-access-data": "^3", "dflydev/placeholder-resolver": "1.*" }, "require-dev": { diff --git a/src/Dflydev/DotAccessConfiguration/AbstractConfiguration.php b/src/Dflydev/DotAccessConfiguration/AbstractConfiguration.php index 8af1a58..c26e913 100644 --- a/src/Dflydev/DotAccessConfiguration/AbstractConfiguration.php +++ b/src/Dflydev/DotAccessConfiguration/AbstractConfiguration.php @@ -12,6 +12,7 @@ namespace Dflydev\DotAccessConfiguration; use Dflydev\DotAccessData\Data; +use Dflydev\DotAccessData\Exception\MissingPathException; use Dflydev\PlaceholderResolver\PlaceholderResolverInterface; use Dflydev\PlaceholderResolver\RegexPlaceholderResolver; @@ -27,7 +28,11 @@ abstract class AbstractConfiguration implements ConfigurationInterface */ public function getRaw($key) { - return $this->data()->get($key); + try { + return $this->data()->get($key); + } catch (MissingPathException $e) { + return null; + } } /**