Skip to content

Commit

Permalink
Allow object cache to be forcefully included (#391)
Browse files Browse the repository at this point in the history
* Add support for rsync-ing mu-plugins and adding object-cache.php during testing

* Ignore object cache

* Lock to 85b3aff18f181fd2c7a08dfd639fa4688fe1179a to debug

* lock to the alleyinteractive/mantle-ci#10 branch

* Testing without

* Restore debug code

* Disable fast-fail

* Disable object cache

* Disable the branch lock in
  • Loading branch information
srtfisher authored May 30, 2023
1 parent ec38db4 commit 9755d09
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
jobs:
php-tests:
strategy:
fail-fast: false
matrix:
php: [8.0, 8.1]
wordpress: ["latest"]
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v0.11.0 - 2023-05-xx
## v0.11.0 - 2023-05-30

### Added

- Add support for rsync-ing mu-plugins and adding object-cache.php during testing.

### Changes

Expand Down
8 changes: 1 addition & 7 deletions src/mantle/testing/concerns/trait-rsync-installation.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,7 @@ public function with_object_cache( bool $install = true ): static {
}

// Check if Memcached is installed.
if ( ! class_exists( \Memcached::class ) ) {
// Allow the object cache to be forcefully required.
if ( Utils::env( 'MANTLE_REQUIRE_OBJECT_CACHE', false ) ) {
Utils::error( 'Memcached is not installed. Cannot install object cache. Exiting...' );
exit( 1 );
}

if ( ! class_exists( \Memcached::class ) && ! Utils::env( 'MANTLE_REQUIRE_OBJECT_CACHE', false ) ) {
Utils::error( 'Memcached is not installed. Cannot install object cache. Skipping...' );

return $this;
Expand Down
1 change: 0 additions & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@

\Mantle\Testing\manager()
->maybe_rsync_plugin()
->with_object_cache()
->with_vip_mu_plugins()
->install();

0 comments on commit 9755d09

Please sign in to comment.