Resolve #3147708 "D9 compatibility"
Closes #3147708
Changes proposed in this merge request:
- Replace deprecated file_scan_directory with a service and use dependency injection
- Based on the suggestions in the following patch https://www.drupal.org/project/graphql_twig/issues/3107672#comment-13436265
- Check if components directory exists