Sage 9 + Bedrock error when installed via composer.json

When installing a Sage 9 theme in Bedrock via composer.json, there appear to be some problems with the Bedrock autoloader and namespacing.

It appears that the recursive namespace search in src/setup.php is not finding the add_action WordPress function as would be expected (see screenshot below).

If Sage is removed from composer.json and dumped into web/app/themes it works just fine.

Steps to reproduce:

  • Include base Sage 9 theme via composer.json in the bedrock root directory
  • Run composer update in bedrock root
  • Verify vendor/composer autoloader files are updated
  • Verify sage has been installed into web/app/themes
  • Verify no vendor directory exists in sage theme directory
  • Try to view wordpress site

Running composer update in the sage directory has no effect either. The composer.json inside of Sage has not been modified.

Any ideas on how to get the theme to load when including it this way?

@henkler did you ever solve this?