Skip to content

Commit

Permalink
Merge branch 'develop' into add/tests-for-onboarding
Browse files Browse the repository at this point in the history
* develop:
  i18n updates
  coming soon settings component updates
  update coming soon module to v 1.1.18
  version bump to 2.6.2
  Composer(deps): Bump newfold-labs/wp-module-patterns
  Composer(deps): Bump newfold-labs/wp-module-data from 2.4.17 to 2.4.18
  Bump version to 2.6.1
  Update to data module 2.4.17
  Fix composer validation
  Prep release 2.6.0
  GitHub Actions(deps): Bump actions/cache from 3 to 4

# Conflicts:
#	cypress.config.js
  • Loading branch information
circlecube committed Jan 29, 2024
2 parents 3f784f3 + 6e9f4ed commit 5a2ac18
Show file tree
Hide file tree
Showing 24 changed files with 787 additions and 244 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cypress-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer vendor directory
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cypress-tests-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer vendor directory
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cypress-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT

- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -69,7 +69,7 @@ jobs:
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer vendor directory
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
if: "!! env.GIT_DIFF"

- name: Cache Composer vendor directory
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/upload-artifact-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT

- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -65,7 +65,7 @@ jobs:
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer vendor directory
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/upload-asset-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT

- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -75,7 +75,7 @@ jobs:
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer vendor directory
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wp-i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache Composer vendor directory
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
1 change: 1 addition & 0 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use WP_Forge\UpgradeHandler\UpgradeHandler;
use NewfoldLabs\WP\ModuleLoader\Container;
use NewfoldLabs\WP\ModuleLoader\Plugin;

use function NewfoldLabs\WP\ModuleLoader\container as setContainer;

// Composer autoloader
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@
},
"require": {
"doctrine/inflector": "1.4.4 as 1.3.1",
"newfold-labs/wp-module-coming-soon": "^1.1.15",
"newfold-labs/wp-module-data": "^2.4.16",
"newfold-labs/wp-module-coming-soon": "^1.1.18",
"newfold-labs/wp-module-data": "^2.4.18",
"newfold-labs/wp-module-deactivation": "^1.0.4",
"newfold-labs/wp-module-ecommerce": "^1.3.19",
"newfold-labs/wp-module-ecommerce": "v1.3.18",
"newfold-labs/wp-module-global-ctb": "^1.0.9",
"newfold-labs/wp-module-help-center": "^1.0.22",
"newfold-labs/wp-module-loader": "^1.0.10",
"newfold-labs/wp-module-marketplace": "^2.2.0",
"newfold-labs/wp-module-notifications": "^1.2.2",
"newfold-labs/wp-module-onboarding": "^1.12.0",
"newfold-labs/wp-module-patterns": "^0.1.12",
"newfold-labs/wp-module-patterns": "^0.1.13",
"newfold-labs/wp-module-performance": "^1.3.0",
"newfold-labs/wp-module-runtime": "^1.0.7",
"newfold-labs/wp-module-secure-passwords": "^1.1",
Expand Down
63 changes: 32 additions & 31 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
const { defineConfig } = require('cypress')
const { phpVersion, core } = require('./.wp-env.json')
const {defineConfig} = require('cypress')
const {phpVersion, core} = require('./.wp-env.json')
const wpVersion = /[^/]*$/.exec(core)[0]

module.exports = defineConfig({
projectId: "kuks2q",
env: {
wpUsername: 'admin',
wpPassword: 'password',
projectId: 'kuks2q',
env: {
wpUsername: 'admin',
wpPassword: 'password',
wpVersion,
phpVersion,
pluginId: 'hostgator',
appId: 'hgwp',
},
downloadsFolder: 'tests/cypress/downloads',
fixturesFolder: 'tests/cypress/fixtures',
screenshotsFolder: 'tests/cypress/screenshots',
video: true,
videosFolder: 'tests/cypress/videos',
chromeWebSecurity: false,
pluginId: 'hostgator',
appId: 'hgwp',
},
downloadsFolder: 'tests/cypress/downloads',
fixturesFolder: 'tests/cypress/fixtures',
screenshotsFolder: 'tests/cypress/screenshots',
video: true,
videosFolder: 'tests/cypress/videos',
chromeWebSecurity: false,
viewportWidth: 1024,
viewportHeight: 768,
blockHosts: [
Expand Down
11 changes: 8 additions & 3 deletions inc/RestApi/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace HostGator\RestApi;

use function NewfoldLabs\WP\ModuleLoader\container;

/**
* Class SettingsController
*/
Expand Down Expand Up @@ -66,8 +68,11 @@ public function update_item( $request ) {
$new_value = $params[ $setting ];
switch ( $setting ) {
case 'comingSoon':
$new_value = ( $new_value ) ? 'true' : 'false';
update_option( 'nfd_coming_soon', $new_value );
if ( $new_value ) {
container()->get( 'comingSoon' )->enable();
} else {
container()->get( 'comingSoon' )->disable();
}
break;
case 'autoUpdatesMajorCore':
$new_value = ( $new_value ) ? 'true' : 'false';
Expand Down Expand Up @@ -168,7 +173,7 @@ public function get_current_settings() {
}

$settings = array(
'comingSoon' => ( 'true' === get_option( 'nfd_coming_soon', 'false' ) ),
'comingSoon' => container()->get( 'comingSoon' )->is_enabled(),
'autoUpdatesAll' => $major && $plugins && $themes,
'autoUpdatesMajorCore' => $major,
'autoUpdatesMinorCore' => $minor,
Expand Down
13 changes: 0 additions & 13 deletions inc/upgrades/1.0.3.php

This file was deleted.

Loading

0 comments on commit 5a2ac18

Please sign in to comment.