In the YamlFileLoader loadFile($file) function it is verified that the file actually exists. When it doesn't exist it throws an InvalidArgumentException with message "The service file %s is not valid" while I believe the message should be "The service file %s does not exist".

CommentFileSizeAuthor
#2 2856293-2.patch820 bytesslootjes
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

slootjes created an issue. See original summary.

slootjes’s picture

chiranjeeb2410’s picture

Status: Active » Needs review

@slootjes,

Changing to Needs Review.

Chi’s picture

This file is a verbatim copy of the of Symfony's YamlFileLoader. To keep it in sync we may file an issue against Symfony project first and wait until it gets committed.

slootjes’s picture

This is fixed in Symfony a while ago so should be fixed in Drupal when upgrading the version of the component. Not sure why a verbatim copy is needed, why not use the original file to prevent confusion like this case?

Chi’s picture

@slootjes, it is documented on the class definition.

https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Dependenc...

Btw, we may consider adopting this suggestion.

slootjes’s picture

Makes sense, so then it's not actually a verbatim copy as someone said after all.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Lendude’s picture

Status: Needs review » Closed (duplicate)
Issue tags: -YAML, -exception

@slootjes I'm going to close this as a duplicate of the more comprehensive issue you opened later #3111008: Use native Symfony YamlLoader + Config, makes more sense to do it right in one go and not try to cherry pick the improvements made in Symfony. Obviously feel free to reopen this if you still think adding this makes sense.