Skip to content

Commit

Permalink
Added missing state_cache.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Jul 19, 2024
1 parent 2f9fc4e commit 59d7f43
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
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

1 comment on commit 59d7f43

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.