Steps to reproduce:
[1] Create an empty yml configuration file for a module.
For example:
/core/modules/history/history.links.menu.yml
[2] Flush all caches.
[3] Enjoy the warnings:
Warning: Invalid argument supplied for foreach() in Drupal\Core\Plugin\Discovery\YamlDiscovery->getDefinitions() (line 88 of D:\d8\core\lib\Drupal\Core\Plugin\Discovery\YamlDiscovery.php).
Severity Warning
Warning: Invalid argument supplied for foreach() in Drupal\Core\Routing\RouteBuilder->rebuild() (line 166 of D:\d8\core\lib\Drupal\Core\Routing\RouteBuilder.php).
Comments
Comment #2
cilefen commentedAre you sure this happens with any yml file a module can implement?
Comment #3
dawehnerSo in that case we could either silently ignore it, or just throw something, which tells people that this doesn't make sense. I kinda prefer the more strict one.
Comment #4
cilefen commentedI cannot reproduce this with the steps in the summary.
Comment #14
quietone commentedLike cilefen, I also was unable to reproduce the issue. I followed the following steps
Since neither I nor cilefen could not reproduce this issue and since there weren't other steps to reproduce the issue provided since the issue was open in Dec 2015, I'm marking the issue "Closed (cannot reproduce)". If anyone can provide complete steps to reproduce the issue (starting from "Install Drupal core"), document those steps in the issue summary and set the issue status back to "Active" [or NW if it has a patch, etc.].
Thanks!