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

WIP -- DNM -- Rw update object cache #429

Closed
wants to merge 11 commits into from
Closed
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ There's a known issue with WordPress `alloptions` cache design. Specifically, a
## Changelog ##

### 1.4.3-dev ###
* Bug fix: Connect via unix socket instead of filesystem to be compatible with php open_basedir restrictions [[426](https://github.com/pantheon-systems/wp-redis/pull/426)] (props @hj-collab)
* Bug fix: Fixes assumption that CACHE_PORT & CACHE_PASSWORD are Set. [[428](https://github.com/pantheon-systems/wp-redis/pull/428)] (props @timnolte)

### 1.4.2 (May 15, 2023) ###
Expand Down
2 changes: 1 addition & 1 deletion behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default:
suites:
default:
paths:
- tests/behat
- tests/behat/
contexts:
- Behat\MinkExtension\Context\MinkContext
- PantheonSystems\PantheonWordPressUpstreamTests\Behat\AdminLogIn
Expand Down
2 changes: 1 addition & 1 deletion object-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@ public function build_client_parameters( $redis_server ) {
}
}

if ( file_exists( $redis_server['host'] ) && 'socket' === filetype( $redis_server['host'] ) ) { // unix socket connection.
if ( strpos( $redis_server['host'], 'unix:///' ) === 0 ) { // Unix socket connection.
// port must be null or socket won't connect.
$port = null;
}
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ There's a known issue with WordPress `alloptions` cache design. Specifically, a
== Changelog ==

= 1.4.3-dev =
* Bug fix: Connect via unix socket instead of filesystem to be compatible with php open_basedir restrictions [[426](https://github.com/pantheon-systems/wp-redis/pull/426)] (props @hj-collab)
* Bug fix: Fixes assumption that CACHE_PORT & CACHE_PASSWORD are Set. [[428](https://github.com/pantheon-systems/wp-redis/pull/428)] (props @tnolte)

= 1.4.2 (May 15, 2023) =
Expand Down
35 changes: 35 additions & 0 deletions tests/behat/features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
// features/bootstrap/WPRedisFeatureContext.php

namespace behat\features\bootstrap;

use Behat\Behat\Context\Context;

class FeatureContext implements Context
{

/**
* Initializes context.
*
* Every scenario gets its own context instance.
* You can also pass arbitrary arguments to the
* context constructor through behat.yml.
*/
public function __construct()
{
}

/**
* Waits a certain number of seconds.
*
* @param int $seconds
* How long to wait.
*
* @When I wait :seconds second(s)
*/
public function wait($seconds)
{
sleep($seconds);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Feature: Load WordPress
When I go to "/wp-admin/options-general.php"
And I fill in "blogname" with "Pantheon WordPress Site"
And I press "submit"
When I wait 1 second
Then print current URL
And I should see "Settings saved."

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ Feature: WP Redis
Then I should see "Redis Calls:"
And I should see "Cache Hits:"
And I should see "Cache Misses:"
And I should see "- get:"
And I should see "- redis_get:"
And I should see "- redis-get:"