Skip to content

Commit ddaff50

Browse files
swissspidyCopilot
andauthored
Update src/Context/FeatureContext.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 5a852e9 commit ddaff50

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Context/FeatureContext.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1785,7 +1785,8 @@ public function install_wp_with_composer( $vendor_directory = 'vendor' ): void {
17851785
$config_extra_php .= "require_once dirname(__DIR__) . '/" . $vendor_directory . "/autoload.php';\n";
17861786

17871787
if ( 'sqlite' === getenv( 'WP_CLI_TEST_OBJECT_CACHE' ) ) {
1788-
$config_extra_php .= "define( 'WP_CACHE_KEY_SALT', '" . bin2hex( random_bytes( 16 ) ) . "' );\n";
1788+
// Use a deterministic salt per install to allow create_config() to reuse cached configs.
1789+
$config_extra_php .= "define( 'WP_CACHE_KEY_SALT', '" . md5( $this->variables['RUN_DIR'] ) . "' );\n";
17891790
}
17901791

17911792
$this->create_config( 'WordPress', $config_extra_php );

0 commit comments

Comments
 (0)