diff --git a/.travis.yml b/.travis.yml index df421db808d..4f4a1d26503 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,9 @@ language: php -dist: trusty +dist: xenial cache: directories: - - $HOME/.composer/cache/files + - $HOME/.composer/cache addons: artifacts: @@ -23,26 +23,41 @@ env: - DRUPAL_BASE_URL="http://127.0.0.1:8080" - PATH="$PATH:$HOME/.composer/vendor/bin" - TRAVIS_NODE_VERSION="4" + - AWS_ACCESS_KEY_ID=$ARTIFACTS_KEY + - AWS_SECRET_ACCESS_KEY=$ARTIFACTS_SECRET stages: + - prepare for tests - test - name: codecov if: branch = 8.x-1.x-dev jobs: include: - - script: robo job:check-coding-standards - - script: robo job:run-unit-tests - - script: robo job:check-module-circular-dependency - - script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" - - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" - - script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" - - script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" - - script: robo job:run-functional-tests "os-search,analytics,publications,cp-appearance,redirect,twitter,os,vsite,cp-import" - - script: robo job:run-functional-javascript-tests "publications,mailchimp,metatag,redirect,cp-appearance,vsite-preset" - - script: robo job:run-functional-javascript-tests "os-search,cp,profiles,classes,pages" - - script: robo job:run-functional-javascript-tests "events,vsite,widgets" - - script: robo job:run-functional-javascript-tests "os,os-theme-preview,blog,faq,news,presentations,cp-menu" + - stage: prepare for tests + script: robo job:check-coding-standards + - stage: prepare for tests + script: robo job:check-module-circular-dependency + - stage: test + script: robo job:run-unit-tests + - stage: test + script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" + - stage: test + script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" + - stage: test + script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" + - stage: test + script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" + - stage: test + script: robo job:run-functional-tests "os-search,analytics,publications,cp-appearance,redirect,twitter,os,vsite,cp-import" + - stage: test + script: robo job:run-functional-javascript-tests "publications,mailchimp,metatag,redirect,cp-appearance,vsite-preset" + - stage: test + script: robo job:run-functional-javascript-tests "os-search,cp,profiles,classes,pages" + - stage: test + script: robo job:run-functional-javascript-tests "events,vsite,widgets" + - stage: test + script: robo job:run-functional-javascript-tests "os,os-theme-preview,blog,faq,news,presentations,cp-menu" - stage: codecov script: robo job:run-unit-tests-code-coverage after_success: bash <(curl -s https://codecov.io/bash) @@ -97,6 +112,9 @@ jobs: before_install: - echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini + - pyenv global 3.7.1 + - pip install -U pip + - pip install awscli install: - composer global require consolidation/robo:2.0.0 @@ -105,4 +123,6 @@ before_script: - cp .travis/RoboFile.php . after_failure: + - docker-compose logs php + - docker-compose logs mariadb - artifacts upload diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 1c5202197fc..ccf0458ecf3 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -42,7 +42,8 @@ public function __construct() public function jobRunUnitTests($groups = '') { $collection = $this->collectionBuilder(); - $collection->addTaskList($this->buildEnvironment()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->buildComposer()); $collection->addTaskList($this->runUnitTests($groups)); return $collection->run(); } @@ -56,7 +57,8 @@ public function jobRunUnitTests($groups = '') public function jobRunUnitTestsCodeCoverage($groups = '') { $collection = $this->collectionBuilder(); - $collection->addTaskList($this->buildEnvironment()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->buildComposer()); $collection->addTaskList($this->enableXDebug()); $collection->addTaskList($this->runUnitTests($groups)); return $collection->run(); @@ -71,7 +73,8 @@ public function jobRunUnitTestsCodeCoverage($groups = '') public function jobCheckCodingStandards() { $collection = $this->collectionBuilder(); - $collection->addTaskList($this->buildEnvironment()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->buildComposer()); $collection->addTaskList($this->runCheckCodingStandards()); return $collection->run(); } @@ -85,9 +88,12 @@ public function jobCheckCodingStandards() public function jobCheckModuleCircularDependency() { $collection = $this->collectionBuilder(); - $collection->addTaskList($this->buildEnvironment()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->buildComposer()); $collection->addTaskList($this->installDrupal()); + $collection->addTaskList($this->uploadToAws()); $collection->addTaskList($this->runCheckModuleCircularDependency()); + $collection->addTaskList($this->installTestConfigs()); return $collection->run(); } @@ -101,7 +107,9 @@ public function jobRunKernelTests($groups = '') { $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildEnvironment()); - $collection->addTaskList($this->installDrupal()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->buildComposer()); + $collection->addTaskList($this->importDatabase()); $collection->addTaskList($this->installTestConfigs()); $collection->addTaskList($this->runKernelTests($groups)); return $collection->run(); @@ -117,7 +125,9 @@ public function jobRunKernelTestsCodeCoverage($groups = '') { $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildEnvironment()); - $collection->addTaskList($this->installDrupal()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->buildComposer()); + $collection->addTaskList($this->importDatabase()); $collection->addTaskList($this->installTestConfigs()); $collection->addTaskList($this->enableXDebug()); $collection->addTaskList($this->runKernelTests($groups)); @@ -136,7 +146,9 @@ public function jobRunFunctionalTests($groups = '') { $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildEnvironment()); - $collection->addTaskList($this->installDrupal()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->buildComposer()); + $collection->addTaskList($this->importDatabase()); $collection->addTaskList($this->installTestConfigs()); $collection->addTaskList($this->runFunctionalTests($groups)); return $collection->run(); @@ -154,7 +166,9 @@ public function jobRunFunctionalJavascriptTests($groups = '') { $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildEnvironment()); - $collection->addTaskList($this->installDrupal()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->buildComposer()); + $collection->addTaskList($this->importDatabase()); $collection->addTaskList($this->installTestConfigs()); $collection->addTaskList($this->runFunctionalJavascriptTests($groups)); return $collection->run(); @@ -171,6 +185,8 @@ public function jobRunBehatTests() $collection = $this->collectionBuilder(); $collection->addTaskList($this->downloadDatabase()); $collection->addTaskList($this->buildEnvironment()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->importDatabase()); $collection->addTask($this->waitForDrupal()); $collection->addTaskList($this->runUpdatePath()); $collection->addTaskList($this->runBehatTests()); @@ -198,35 +214,110 @@ protected function downloadDatabase() return $tasks; } - /** - * Builds the Docker environment. - * - * @return \Robo\Task\Base\Exec[] - * An array of tasks. - */ - protected function buildEnvironment() - { - $force = true; - $tasks = []; - $tasks[] = $this->taskFilesystemStack() - ->copy('.travis/docker-compose.yml', 'docker-compose.yml', $force) - ->copy('.travis/traefik.yml', 'traefik.yml', $force) - ->copy('.travis/.env', '.env', $force) - ->copy('.travis/config/behat.yml', 'tests/behat.yml', $force); - - $tasks[] = $this->taskExec('echo AWS_ACCESS_KEY_ID=' . getenv('ARTIFACTS_KEY') . ' >> .env'); - $tasks[] = $this->taskExec('echo AWS_SECRET_ACCESS_KEY=' . getenv('ARTIFACTS_SECRET') . ' >> .env'); - $tasks[] = $this->taskExec('echo AWS_ES_ACCESS_ENDPOINT=' . getenv('ARTIFACTS_ES_ENDPOINT') . ' >> .env'); - $tasks[] = $this->taskExec('docker-compose --verbose pull --parallel'); - $tasks[] = $this->taskExec('docker-compose up -d'); - $tasks[] = $this->taskExec('docker-compose exec -T php composer global require hirak/prestissimo'); - $tasks[] = $this->taskExec('make'); - $tasks[] = $this->taskExec('docker-compose exec -T php cp .travis/config/phpunit.xml web/core/phpunit.xml'); - $tasks[] = $this->taskExec('docker-compose exec -T php cp .travis/config//bootstrap.php web/core/tests/bootstrap.php'); - $tasks[] = $this->taskExec('docker-compose exec -T php mkdir -p web/sites/simpletest'); + /** + * Creates the Docker environment. + * + * @return \Robo\Task\Base\Exec[] + * An array of tasks. + */ + protected function buildDocker() + { + $force = true; + $tasks = []; + $tasks[] = $this->taskFilesystemStack() + ->copy('.travis/docker-compose.yml', 'docker-compose.yml', $force) + ->copy('.travis/traefik.yml', 'traefik.yml', $force) + ->copy('.travis/.env', '.env', $force) + ->copy('.travis/config/behat.yml', 'tests/behat.yml', $force); + + $tasks[] = $this->taskExec('echo AWS_ACCESS_KEY_ID=' . getenv('ARTIFACTS_KEY') . ' >> .env'); + $tasks[] = $this->taskExec('echo AWS_SECRET_ACCESS_KEY=' . getenv('ARTIFACTS_SECRET') . ' >> .env'); + $tasks[] = $this->taskExec('echo AWS_ES_ACCESS_ENDPOINT=' . getenv('ARTIFACTS_ES_ENDPOINT') . ' >> .env'); + $tasks[] = $this->taskExec('docker-compose pull'); + $tasks[] = $this->taskExec('docker-compose up -d'); + + return $tasks; + } - return $tasks; - } + /** + * Build environment. + * + * @return \Robo\Task\Base\Exec[] + * An array of tasks. + */ + protected function buildEnvironment() + { + $tasks = []; + + $tasks[] = $this->taskExec('aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER .'); + $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz'); + $tasks[] = $this->taskExec('sudo chown -R 1000:1000 custom_themes'); + + return $tasks; + } + /** + * Import database. + * + * @return \Robo\Task\Base\Exec[] + * An array of tasks. + */ + protected function importDatabase() + { + $tasks = []; + + // Fix import issue. + $tasks[] = $this->taskExec('sudo tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz web'); + $tasks[] = $this->taskExec('sudo tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-settings.tar.xz web/sites/default'); + $tasks[] = $this->taskExec('sudo tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-files.tar.xz web/sites/default'); + $tasks[] = $this->taskExec('sudo chown -R 1000:1000 web/sites/default'); + // Import sql. + $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); + + return $tasks; + } + + /** + * Create sql dump and compressed build and upload to S3. + * + * @return \Robo\Task\Base\Exec[] + * A collection of tasks. + */ + protected function uploadToAws() + { + $tasks[] = $this->taskExec('docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql'); + // Build the artifacts. + $tasks[] = $this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-db.tar.xz web/travis-backup.sql'); + $tasks[] = $this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-settings.tar.xz web/sites/default/settings.php'); + $tasks[] = $this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz custom_themes'); + $tasks[] = $this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-files.tar.xz web/sites/default/files'); + // Upload the artifacts. + $tasks[] = $this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-db.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz'); + $tasks[] = $this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-settings.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-settings.tar.xz'); + $tasks[] = $this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz'); + $tasks[] = $this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-files.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-files.tar.xz'); + + return $tasks; + } + + /** + * Builds the Code Base. + * + * @return \Robo\Task\Base\Exec[] + * An array of tasks. + */ + protected function buildComposer() + { + $force = true; + $tasks = []; + + $tasks[] = $this->taskExec('docker-compose exec -T php composer global require hirak/prestissimo'); + $tasks[] = $this->taskExec('make'); + $tasks[] = $this->taskExec('docker-compose exec -T php cp .travis/config/phpunit.xml web/core/phpunit.xml'); + $tasks[] = $this->taskExec('docker-compose exec -T php cp .travis/config//bootstrap.php web/core/tests/bootstrap.php'); + $tasks[] = $this->taskExec('docker-compose exec -T php mkdir -p web/sites/simpletest'); + + return $tasks; + } /** * Enables xdebug in the Docker environment. @@ -239,7 +330,6 @@ protected function enableXDebug() $tasks[] = $this->taskExecStack() ->exec('echo PHP_XDEBUG_ENABLED=1 >> .env') ->exec('docker-compose up -d'); - return $tasks; } diff --git a/.travis/config/bootstrap.php b/.travis/config/bootstrap.php index 8843d6ff7d6..b178d7d0bcf 100644 --- a/.travis/config/bootstrap.php +++ b/.travis/config/bootstrap.php @@ -16,6 +16,7 @@ * * @param string $scan_directory * The directory that should be recursively scanned. + * * @return array * An associative array of extension directories found within the scanned * directory, keyed by extension name. @@ -78,7 +79,7 @@ function drupal_phpunit_contrib_extension_directory_roots($root = NULL) { * @return array * An associative array of extension directories, keyed by their namespace. */ -function drupal_phpunit_get_extension_namespaces($dirs) { +function drupal_phpunit_get_extension_namespaces(array $dirs) { $suite_names = [ 'Unit', 'Kernel', @@ -135,6 +136,7 @@ function drupal_phpunit_populate_class_loader() { $loader = require __DIR__ . '/../../autoload.php'; // Start with classes in known locations. + $loader->add('Drupal\\TestTools', __DIR__); $loader->add('Drupal\\Tests', __DIR__); $loader->add('Drupal\\TestSite', __DIR__); $loader->add('Drupal\\KernelTests', __DIR__); diff --git a/.travis/config/default.settings.php b/.travis/config/default.settings.php index 241fdd5eb87..e6d3ec4cf81 100644 --- a/.travis/config/default.settings.php +++ b/.travis/config/default.settings.php @@ -76,7 +76,7 @@ * specific needs. * * @code - * $databases['default']['default'] = array ( + * $databases['default']['default'] = [ * 'database' => 'databasename', * 'username' => 'sqlusername', * 'password' => 'sqlpassword', @@ -85,7 +85,7 @@ * 'driver' => 'mysql', * 'prefix' => '', * 'collation' => 'utf8mb4_general_ci', - * ); + * ]; * @endcode */ $databases = []; @@ -156,13 +156,13 @@ * The 'default' element is mandatory and holds the prefix for any tables * not specified elsewhere in the array. Example: * @code - * 'prefix' => array( + * 'prefix' => [ * 'default' => 'main_', * 'users' => 'shared_', * 'sessions' => 'shared_', * 'role' => 'shared_', * 'authmap' => 'shared_', - * ), + * ], * @endcode * You can also use a reference to a schema/database as a prefix. This may be * useful if your Drupal installation exists in a schema that is not the default @@ -170,13 +170,13 @@ * time. * Example: * @code - * 'prefix' => array( + * 'prefix' => [ * 'default' => 'main.', * 'users' => 'shared.', * 'sessions' => 'shared.', * 'role' => 'shared.', * 'authmap' => 'shared.', - * ); + * ]; * @endcode * NOTE: MySQL and SQLite's definition of a schema is a database. * @@ -185,14 +185,14 @@ * example, to enable MySQL SELECT queries to exceed the max_join_size system * variable, and to reduce the database connection timeout to 5 seconds: * @code - * $databases['default']['default'] = array( - * 'init_commands' => array( + * $databases['default']['default'] = [ + * 'init_commands' => [ * 'big_selects' => 'SET SQL_BIG_SELECTS=1', - * ), - * 'pdo' => array( + * ], + * 'pdo' => [ * PDO::ATTR_TIMEOUT => 5, - * ), - * ); + * ], + * ]; * @endcode * * WARNING: The above defaults are designed for database portability. Changing @@ -207,51 +207,37 @@ * * Sample Database configuration format for PostgreSQL (pgsql): * @code - * $databases['default']['default'] = array( + * $databases['default']['default'] = [ * 'driver' => 'pgsql', * 'database' => 'databasename', * 'username' => 'sqlusername', * 'password' => 'sqlpassword', * 'host' => 'localhost', * 'prefix' => '', - * ); + * ]; * @endcode * * Sample Database configuration format for SQLite (sqlite): * @code - * $databases['default']['default'] = array( + * $databases['default']['default'] = [ * 'driver' => 'sqlite', * 'database' => '/path/to/databasefilename', - * ); + * ]; * @endcode */ /** * Location of the site configuration files. * - * The $config_directories array specifies the location of file system - * directories used for configuration data. On install, the "sync" directory is - * created. This is used for configuration imports. The "active" directory is - * not created by default since the default storage for active configuration is - * the database rather than the file system. (This can be changed. See "Active - * configuration settings" below). + * The $settings['config_sync_directory'] specifies the location of file system + * directory used for syncing configuration data. On install, the directory is + * created. This is used for configuration imports. * - * The default location for the "sync" directory is inside a randomly-named - * directory in the public files path. The setting below allows you to override - * the "sync" location. - * - * If you use files for the "active" configuration, you can tell the - * Configuration system where this directory is located by adding an entry with - * array key CONFIG_ACTIVE_DIRECTORY. - * - * Example: - * @code - * $config_directories = array( - * CONFIG_SYNC_DIRECTORY => '/directory/outside/webroot', - * ); - * @endcode + * The default location for this directory is inside a randomly-named + * directory in the public files path. The setting below allows you to set + * its location. */ -$config_directories = []; +# $settings['config_sync_directory'] = '/directory/outside/webroot'; /** * Settings: @@ -342,11 +328,10 @@ * configuration requires the IP addresses of all remote proxies to be * specified in $settings['reverse_proxy_addresses'] to work correctly. * - * Enable this setting to get Drupal to determine the client IP from - * the X-Forwarded-For header (or $settings['reverse_proxy_header'] if set). - * If you are unsure about this setting, do not have a reverse proxy, - * or Drupal operates in a shared hosting environment, this setting - * should remain commented out. + * Enable this setting to get Drupal to determine the client IP from the + * X-Forwarded-For header. If you are unsure about this setting, do not have a + * reverse proxy, or Drupal operates in a shared hosting environment, this + * setting should remain commented out. * * In order for this setting to be used you must specify every possible * reverse proxy IP address in $settings['reverse_proxy_addresses']. @@ -365,34 +350,35 @@ # $settings['reverse_proxy_addresses'] = ['a.b.c.d', ...]; /** - * Set this value if your proxy server sends the client IP in a header - * other than X-Forwarded-For. - */ -# $settings['reverse_proxy_header'] = 'X_CLUSTER_CLIENT_IP'; - -/** - * Set this value if your proxy server sends the client protocol in a header - * other than X-Forwarded-Proto. - */ -# $settings['reverse_proxy_proto_header'] = 'X_FORWARDED_PROTO'; - -/** - * Set this value if your proxy server sends the client protocol in a header - * other than X-Forwarded-Host. - */ -# $settings['reverse_proxy_host_header'] = 'X_FORWARDED_HOST'; - -/** - * Set this value if your proxy server sends the client protocol in a header - * other than X-Forwarded-Port. + * Reverse proxy trusted headers. + * + * Sets which headers to trust from your reverse proxy. + * + * Common values are: + * - \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_ALL + * - \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED + * + * Note the default value of + * @code + * \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_ALL | \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED + * @endcode + * is not secure by default. The value should be set to only the specific + * headers the reverse proxy uses. For example: + * @code + * \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_ALL + * @endcode + * This would trust the following headers: + * - X_FORWARDED_FOR + * - X_FORWARDED_HOST + * - X_FORWARDED_PROTO + * - X_FORWARDED_PORT + * + * @see \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_ALL + * @see \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED + * @see \Symfony\Component\HttpFoundation\Request::setTrustedProxies */ -# $settings['reverse_proxy_port_header'] = 'X_FORWARDED_PORT'; +# $settings['reverse_proxy_trusted_headers'] = \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_ALL | \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED; -/** - * Set this value if your proxy server sends the client protocol in a header - * other than Forwarded. - */ -# $settings['reverse_proxy_forwarded_header'] = 'FORWARDED'; /** * Page caching: @@ -536,6 +522,19 @@ */ # $settings['file_private_path'] = ''; +/** + * Temporary file path: + * + * A local file system path where temporary files will be stored. This directory + * must be absolute, outside of the Drupal installation directory and not + * accessible over the web. + * + * If this is not set, the default for the operating system will be used. + * + * @see \Drupal\Component\FileSystem\FileSystem::getOsTemporaryDirectory() + */ +# $settings['file_temp_path'] = '/tmp'; + /** * Session write interval: * @@ -596,25 +595,6 @@ # ini_set('pcre.backtrack_limit', 200000); # ini_set('pcre.recursion_limit', 200000); -/** - * Active configuration settings. - * - * By default, the active configuration is stored in the database in the - * {config} table. To use a different storage mechanism for the active - * configuration, do the following prior to installing: - * - Create an "active" directory and declare its path in $config_directories - * as explained under the 'Location of the site configuration files' section - * above in this file. To enhance security, you can declare a path that is - * outside your document root. - * - Override the 'bootstrap_config_storage' setting here. It must be set to a - * callable that returns an object that implements - * \Drupal\Core\Config\StorageInterface. - * - Override the service definition 'config.storage.active'. Put this - * override in a services.yml file in the same directory as settings.php - * (definitions in this file will override service definition defaults). - */ -# $settings['bootstrap_config_storage'] = ['Drupal\Core\Config\BootstrapConfigStorageFactory', 'getFileStorage']; - /** * Configuration overrides. * @@ -637,9 +617,7 @@ * configuration values in settings.php will not fire any of the configuration * change events. */ -# $config['system.file']['path']['temporary'] = '/tmp'; # $config['system.site']['name'] = 'My Drupal site'; -# $config['system.theme']['default'] = 'stark'; # $config['user.settings']['anonymous'] = 'Visitor'; /** @@ -705,9 +683,9 @@ * * For example: * @code - * $settings['trusted_host_patterns'] = array( + * $settings['trusted_host_patterns'] = [ * '^www\.example\.com$', - * ); + * ]; * @endcode * will allow the site to only run from www.example.com. * @@ -718,12 +696,12 @@ * * For example: * @code - * $settings['trusted_host_patterns'] = array( + * $settings['trusted_host_patterns'] = [ * '^example\.com$', * '^.+\.example\.com$', * '^example\.org$', * '^.+\.example\.org$', - * ); + * ]; * @endcode * will allow the site to run off of all variants of example.com and * example.org, with all subdomains included. @@ -736,7 +714,7 @@ * with common frontend tools and recursive scanning of directories looking for * extensions. * - * @see file_scan_directory() + * @see \Drupal\Core\File\FileSystemInterface::scanDirectory() * @see \Drupal\Core\Extension\ExtensionDiscovery::scanDirectory() */ $settings['file_scan_ignore_directories'] = [ @@ -754,8 +732,14 @@ */ $settings['entity_update_batch_size'] = 50; -$settings['install_profile'] = 'openscholar'; -$config_directories['sync'] = '../config/sync'; +/** + * Entity update backup. + * + * This is used to inform the entity storage handler that the backup tables as + * well as the original entity type and field storage definitions should be + * retained after a successful entity update process. + */ +$settings['entity_update_backup'] = TRUE; /** * Load local development override configuration, if available. diff --git a/.travis/config/phpunit.xml b/.travis/config/phpunit.xml index 74981715024..fd424b783f3 100644 --- a/.travis/config/phpunit.xml +++ b/.travis/config/phpunit.xml @@ -9,7 +9,6 @@ beStrictAboutTestsThatDoNotTestAnything="true" beStrictAboutOutputDuringTests="true" beStrictAboutChangesToGlobalState="true" - checkForUnintentionallyCoveredCode="false" convertDeprecationsToExceptions="false">