Skip to content

Commit

Permalink
Bump WP version requirement to 6.4 (#13731)
Browse files Browse the repository at this point in the history
Co-authored-by: Pascal Birchler <[email protected]>
  • Loading branch information
Swanand01 and swissspidy authored Jun 25, 2024
1 parent 16cc8f0 commit 8b8c84d
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
matrix:
# TODO: add back Firefox once support is more mature.
browser: ['chrome']
wp: ['6.3']
wp: ['6.4']
snapshots: [false]
experimental: [false]
# We want to split up the tests into 2 parts running in parallel.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-unit-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
experimental: false

- php: '7.4'
wp: '6.3'
wp: '6.4'
experimental: false

- php: '8.2'
Expand Down
6 changes: 2 additions & 4 deletions includes/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,8 @@ public function __construct( Shopping_Vendors $shopping_vendors ) {
* @since 1.37.0
*/
public function prime_option_caches(): void {
if ( \function_exists( 'wp_prime_option_caches_by_group' ) ) {
wp_prime_option_caches_by_group( self::SETTING_GROUP );
wp_prime_option_caches_by_group( self::SETTING_GROUP_EXPERIMENTS );
}
wp_prime_option_caches_by_group( self::SETTING_GROUP );
wp_prime_option_caches_by_group( self::SETTING_GROUP_EXPERIMENTS );
}

/**
Expand Down
19 changes: 10 additions & 9 deletions includes/Shopping/Product_Meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@
namespace Google\Web_Stories\Shopping;

use Google\Web_Stories\Infrastructure\HasMeta;
use Google\Web_Stories\Infrastructure\HasRequirements;
use Google\Web_Stories\Infrastructure\PluginUninstallAware;
use Google\Web_Stories\Service_Base;
use Google\Web_Stories\Story_Post_Type;

/**
* Class Product_Meta.
*/
class Product_Meta extends Service_Base implements HasMeta, PluginUninstallAware {
class Product_Meta extends Service_Base implements HasMeta, PluginUninstallAware, HasRequirements {
/**
* The products meta key.
*/
Expand Down Expand Up @@ -87,22 +88,22 @@ public function register(): void {
* @since 1.22.0
*/
public function register_meta(): void {
register_meta(
'post',
register_post_meta(
$this->story_post_type::POST_TYPE_SLUG,
self::PRODUCTS_POST_META_KEY,
[
'type' => 'object',
'description' => __( 'Products', 'web-stories' ),
'show_in_rest' => [
'type' => 'object',
'description' => __( 'Products', 'web-stories' ),
'show_in_rest' => [
'schema' => [
'type' => 'object',
'properties' => [],
'additionalProperties' => true,
],
],
'default' => [],
'single' => true,
'object_subtype' => $this->story_post_type::POST_TYPE_SLUG,
'default' => [],
'single' => true,
'revisions_enabled' => true,
]
);
}
Expand Down
12 changes: 7 additions & 5 deletions includes/Story_Post_Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,17 @@ public function register_meta(): void {
'show_in_rest' => true,
'default' => $active_publisher_logo_id,
'single' => true,
'revisions_enabled' => true,
]
);

register_post_meta(
$this->get_slug(),
self::POSTER_META_KEY,
[
'type' => 'object',
'description' => __( 'Poster object', 'web-stories' ),
'show_in_rest' => [
'type' => 'object',
'description' => __( 'Poster object', 'web-stories' ),
'show_in_rest' => [
'schema' => [
'type' => 'object',
'properties' => [
Expand All @@ -175,8 +176,9 @@ public function register_meta(): void {
],
],
],
'default' => [],
'single' => true,
'default' => [],
'single' => true,
'revisions_enabled' => true,
]
);
}
Expand Down
3 changes: 2 additions & 1 deletion includes/Taxonomy/Category_Taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

namespace Google\Web_Stories\Taxonomy;

use Google\Web_Stories\Infrastructure\HasRequirements;
use Google\Web_Stories\REST_API\Stories_Terms_Controller;
use Google\Web_Stories\Story_Post_Type;

Expand All @@ -36,7 +37,7 @@
*
* @phpstan-import-type TaxonomyArgs from \Google\Web_Stories\Taxonomy\Taxonomy_Base
*/
class Category_Taxonomy extends Taxonomy_Base {
class Category_Taxonomy extends Taxonomy_Base implements HasRequirements {
/**
* Constructor.
*
Expand Down
2 changes: 1 addition & 1 deletion phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" ?>
<ruleset name="Web Stories PHP Coding Standards Rules">
<config name="minimum_supported_wp_version" value="6.3" />
<config name="minimum_supported_wp_version" value="6.4" />

<rule ref="WordPress-Core">
<type>error</type>
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Contributors: google
Tested up to: 6.5
Requires at least: 6.3
Requires at least: 6.4
Stable tag: V.V.V
License: Apache-2.0
License URI: https://www.apache.org/licenses/LICENSE-2.0
Expand Down
4 changes: 2 additions & 2 deletions web-stories.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Author: Google
* Author URI: https://opensource.google.com/
* Version: 1.38.0-alpha.0
* Requires at least: 6.3
* Requires at least: 6.4
* Requires PHP: 7.4
* Text Domain: web-stories
* License: Apache License 2.0
Expand Down Expand Up @@ -47,7 +47,7 @@
define( 'WEBSTORIES_PLUGIN_DIR_PATH', plugin_dir_path( WEBSTORIES_PLUGIN_FILE ) );
define( 'WEBSTORIES_PLUGIN_DIR_URL', plugin_dir_url( WEBSTORIES_PLUGIN_FILE ) );
define( 'WEBSTORIES_MINIMUM_PHP_VERSION', '7.4' );
define( 'WEBSTORIES_MINIMUM_WP_VERSION', '6.3' );
define( 'WEBSTORIES_MINIMUM_WP_VERSION', '6.4' );
define( 'WEBSTORIES_CDN_URL', 'https://wp.stories.google/static/main' );

if ( ! defined( 'WEBSTORIES_DEV_MODE' ) ) {
Expand Down

0 comments on commit 8b8c84d

Please sign in to comment.