lugtn / portal

Tunisian GNU/Linux user group community portal
1 stars 1 forks source link

Drupal 8 features discovery #5

Closed asghaier closed 8 years ago

asghaier commented 8 years ago

Discovery of Drupal 8 CMI and Features. Document the best Drupal 8 development workflow.

asghaier commented 8 years ago

In settings.php

Uncomment:

$settings['bootstrap_config_storage'] = array('Drupal\Core\Config\BootstrapConfigStorageFactory', 'getFileStorage');

Add:

$config_directories = array(
  CONFIG_ACTIVE_DIRECTORY => './../config/active/',
  CONFIG_STAGING_DIRECTORY => './../config/staging/',
  CONFIG_SYNC_DIRECTORY => './../config/sync/',
);

In git root directory create the following directories:

In services.yml

Add:

services:
  config.storage:
    class: Drupal\Core\Config\CachedStorage
    arguments: ['@config.storage.active', '@cache.config']
  config.storage.active:
    class: Drupal\Core\Config\FileStorage
    factory: Drupal\Core\Config\FileStorageFactory::getActive

Setup

  1. Make sure config/active directory is empty, if not remove any files there
  2. Setup a fresh drupal site
  3. New files will be created in config/active directory, remove all files there
  4. git checkout config/active to get the original project config files
  5. Clear all caches in drupal by going to the url /admin/config/development/performance or by using drush cr

Wiki documentation

TODO: Write a more detailed documentation in the wiki for new developers on setting up the project for the first time and how to contribute.

PS: Effective starting from commit https://github.com/gnulugtn/portal/commit/f028dcebd16ff544241a235a5d4bb9bce7bc7443