diff --git a/project_dependency.drupal.inc b/project_dependency.drupal.inc
index 2dfedd5..9ed3bf8 100644
--- a/project_dependency.drupal.inc
+++ b/project_dependency.drupal.inc
@@ -60,8 +60,20 @@ function project_dependency_info_parse(array $info_files, $tag) {
       // Drupal 8 uses .info.yml files (except for releases before the switch).
       // We use Symfony module parsing since this modules is still D7 here.
       // When porting this to D8, use native info file parser.
-      $info[$component] = \Symfony\Component\Yaml\Yaml::parse($file) +
-        $defaults;
+      try {
+        $result = \Symfony\Component\Yaml\Yaml::parse(file_get_contents($file));
+      } catch (\Symfony\Component\Yaml\Exception\ParseException $e) {
+        watchdog('project_dependency',
+          'Unable to parse the YAML string:  %string',
+          array('%string' => $e->getMessage())
+        );
+      }
+      if (is_null($result)) {
+        $info[$component] = $defaults;
+      }
+      else {
+        $info[$component] = $result + $defaults;
+      }
     }
     else {
       // D7+ caches the result in the parsing of the file, so must be reset.
