Fix warning with components definition when using the Components module
requested to merge issue/graphql_twig-3197486:3197486-warning-reported-when-using-components-module into 8.x-1.x
Changes proposed in this pull request:
- Check if the Twig include contains a hash
- If it doesn't we don't need to scan all the components
- Add a check for if the components directory path is a string
- This will prevent a warning if the component namespaces have been defined the way the Components module expects them to be defined
Closes #3197486