Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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".
Comment | File | Size | Author |
---|---|---|---|
#2 | 2856293-2.patch | 820 bytes | slootjes |
Comments
Comment #2
slootjes CreditAttribution: slootjes commentedComment #3
chiranjeeb2410 CreditAttribution: chiranjeeb2410 commented@slootjes,
Changing to Needs Review.
Comment #4
Chi CreditAttribution: Chi commentedThis 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.
Comment #5
slootjes CreditAttribution: slootjes commentedThis 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?
Comment #6
Chi CreditAttribution: Chi commented@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.
Comment #7
slootjes CreditAttribution: slootjes commentedMakes sense, so then it's not actually a verbatim copy as someone said after all.
Comment #13
Lendude@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.