Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added missing state_cache to settings. #1342

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion tests/phpunit/Drupal/EnvironmentSettingsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ public function testEnvironmentGeneric(): void {
'^.+\.docker\.amazee\.io$',
'^nginx$',
];
$settings['state_cache'] = TRUE;
$this->assertSettings($settings);
}

Expand Down Expand Up @@ -314,6 +315,7 @@ public function testEnvironmentLocal(): void {
'^.+\.docker\.amazee\.io$',
'^nginx$',
];
$settings['state_cache'] = TRUE;
$this->assertSettings($settings);
}

Expand Down Expand Up @@ -359,7 +361,7 @@ public function testEnvironmentCi(): void {
'^.+\.docker\.amazee\.io$',
'^nginx$',
];

$settings['state_cache'] = TRUE;
$this->assertSettings($settings);
}

Expand Down Expand Up @@ -402,6 +404,7 @@ public function testEnvironmentAcquiaDynamic(): void {
$settings['hash_salt'] = hash('sha256', getenv('MARIADB_HOST') ?: 'localhost');
$settings['trusted_host_patterns'][] = '^.+\.docker\.amazee\.io$';
$settings['trusted_host_patterns'][] = '^nginx$';
$settings['state_cache'] = TRUE;
$this->assertSettings($settings);
}

Expand Down Expand Up @@ -443,6 +446,7 @@ public function testEnvironmentAcquiaDev(): void {
$settings['hash_salt'] = hash('sha256', getenv('MARIADB_HOST') ?: 'localhost');
$settings['trusted_host_patterns'][] = '^.+\.docker\.amazee\.io$';
$settings['trusted_host_patterns'][] = '^nginx$';
$settings['state_cache'] = TRUE;
$this->assertSettings($settings);
}

Expand Down Expand Up @@ -484,6 +488,7 @@ public function testEnvironmentAcquiaTest(): void {
$settings['hash_salt'] = hash('sha256', getenv('MARIADB_HOST') ?: 'localhost');
$settings['trusted_host_patterns'][] = '^.+\.docker\.amazee\.io$';
$settings['trusted_host_patterns'][] = '^nginx$';
$settings['state_cache'] = TRUE;
$this->assertSettings($settings);
}

Expand Down Expand Up @@ -523,6 +528,7 @@ public function testEnvironmentAcquiaProd(): void {
$settings['hash_salt'] = hash('sha256', getenv('MARIADB_HOST') ?: 'localhost');
$settings['trusted_host_patterns'][] = '^.+\.docker\.amazee\.io$';
$settings['trusted_host_patterns'][] = '^nginx$';
$settings['state_cache'] = TRUE;
$this->assertSettings($settings);
}
// phpcs:ignore #;> ACQUIA
Expand Down Expand Up @@ -575,6 +581,7 @@ public function testEnvironmentLagoonDynamic(): void {
$settings['trusted_host_patterns'][] = '^nginx\-php$';
$settings['trusted_host_patterns'][] = '^.+\.au\.amazee\.io$';
$settings['trusted_host_patterns'][] = '^example1\.com|example2/com$';
$settings['state_cache'] = TRUE;
$this->assertSettings($settings);
}

Expand Down Expand Up @@ -626,6 +633,7 @@ public function testEnvironmentLagoonDev(): void {
$settings['trusted_host_patterns'][] = '^nginx\-php$';
$settings['trusted_host_patterns'][] = '^.+\.au\.amazee\.io$';
$settings['trusted_host_patterns'][] = '^example1\.com|example2/com$';
$settings['state_cache'] = TRUE;
$this->assertSettings($settings);
}

Expand Down Expand Up @@ -677,6 +685,7 @@ public function testEnvironmentLagoonTest(): void {
$settings['trusted_host_patterns'][] = '^nginx\-php$';
$settings['trusted_host_patterns'][] = '^.+\.au\.amazee\.io$';
$settings['trusted_host_patterns'][] = '^example1\.com|example2/com$';
$settings['state_cache'] = TRUE;
$this->assertSettings($settings);
}

Expand Down Expand Up @@ -727,6 +736,7 @@ public function testEnvironmentLagoonProd(): void {
$settings['trusted_host_patterns'][] = '^nginx\-php$';
$settings['trusted_host_patterns'][] = '^.+\.au\.amazee\.io$';
$settings['trusted_host_patterns'][] = '^example1\.com|example2/com$';
$settings['state_cache'] = TRUE;
$this->assertSettings($settings);
}
// phpcs:ignore #;> LAGOON
Expand Down
3 changes: 3 additions & 0 deletions web/sites/default/default.settings.local.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@

// Hide admin toolbar. Useful for themeing while logged in as admin.
// $settings['hide_admin_toolbar'] = TRUE;

// Disable state cache.
$settings['state_cache'] = FALSE;
3 changes: 3 additions & 0 deletions web/sites/default/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@
$config['system.performance']['css']['preprocess'] = TRUE;
$config['system.performance']['js']['preprocess'] = TRUE;

// Enable state cache.
$settings['state_cache'] = TRUE;

// The default list of directories that will be ignored by Drupal's file API.
$settings['file_scan_ignore_directories'] = [
'node_modules',
Expand Down