protected function bootManifests($flush)
    {
        // Setup autoloader
        $this->getClassLoader()->init($this->getIncludeTests(), $flush);

        // Find modules
        $this->getModuleLoader()->init($this->getIncludeTests(), $flush);

        // Flush config
        if ($flush) {
            $config = $this->getConfigLoader()->getManifest();
            if ($config instanceof CachedConfigCollection) {
                $config->setFlush(true);
            }
        }
        // tell modules to sort, now that config is available
        $this->getModuleLoader()->getManifest()->sort();

        // Find default templates
        $defaultSet = $this->getThemeResourceLoader()->getSet('$default');
        if ($defaultSet instanceof ThemeManifest) {
            $defaultSet->setProject(
                ModuleManifest::config()->get('project')
            );
            $defaultSet->init($this->getIncludeTests(), $flush);
        }
    }