diff --git a/.github/files/lint-project-structure.sh b/.github/files/lint-project-structure.sh index 9efb4928ffb75..7845e0f3d6edc 100755 --- a/.github/files/lint-project-structure.sh +++ b/.github/files/lint-project-structure.sh @@ -635,4 +635,16 @@ if ! pnpm semver --range "$RANGE" "$PNPM_VERSION" &>/dev/null; then echo "::error file=package.json,line=$LINE::Pnpm version $PNPM_VERSION in .github/versions.sh does not satisfy requirement $RANGE from package.json" fi +# - Check for incorrect next-version tokens. +debug "Checking for incorrect next-version tokens." +RE='[^$]\$next[-_]version\$\|\$next[-_]version\$[^$]\|\$\$next_version\$\$' +while IFS= read -r FILE; do + EXIT=1 + while IFS=: read -r LINE COL X; do + X=${X/#[^$]/} + X=${X/%[^$]/} + echo "::error file=$FILE,line=$LINE,col=$COL::You probably mean \`\$\$next-version\$\$\` here rather than \`$X\`." + done < <( git grep -h --line-number --column -o "$RE" "$FILE" ) +done < <( git -c core.quotepath=off grep -l "$RE" ) + exit $EXIT diff --git a/projects/packages/boost-core/changelog/fix-incorrect-next-version-tokens b/projects/packages/boost-core/changelog/fix-incorrect-next-version-tokens new file mode 100644 index 0000000000000..773098e4cd961 --- /dev/null +++ b/projects/packages/boost-core/changelog/fix-incorrect-next-version-tokens @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Fix incorrect next-version tokens in php `@since` and/or `@deprecated` docs. diff --git a/projects/packages/boost-core/package.json b/projects/packages/boost-core/package.json index b566cf3b7ce05..03ee08f9f7e62 100644 --- a/projects/packages/boost-core/package.json +++ b/projects/packages/boost-core/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@automattic/jetpack-boost-core", - "version": "0.2.7", + "version": "0.2.8-alpha", "description": "Core functionality for boost and relevant packages to depend on", "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/boost-core/#readme", "bugs": { diff --git a/projects/packages/boost-core/src/lib/class-boost-api.php b/projects/packages/boost-core/src/lib/class-boost-api.php index 6742518b27f8b..6fbc4930c944c 100644 --- a/projects/packages/boost-core/src/lib/class-boost-api.php +++ b/projects/packages/boost-core/src/lib/class-boost-api.php @@ -27,7 +27,7 @@ class Boost_API { * Get the API client instance. * * @return Boost_API_Client - * @deprecated $$next_version$$ Use get(), and post() directly instead. + * @deprecated 3.1.1 Use get(), and post() directly instead. */ public static function get_client() { return self::get_api_client(); diff --git a/projects/packages/plugins-installer/changelog/fix-incorrect-next-version-tokens b/projects/packages/plugins-installer/changelog/fix-incorrect-next-version-tokens new file mode 100644 index 0000000000000..773098e4cd961 --- /dev/null +++ b/projects/packages/plugins-installer/changelog/fix-incorrect-next-version-tokens @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Fix incorrect next-version tokens in php `@since` and/or `@deprecated` docs. diff --git a/projects/packages/plugins-installer/src/class-plugins-installer.php b/projects/packages/plugins-installer/src/class-plugins-installer.php index ece165833e974..c86537aadd167 100644 --- a/projects/packages/plugins-installer/src/class-plugins-installer.php +++ b/projects/packages/plugins-installer/src/class-plugins-installer.php @@ -189,7 +189,7 @@ public static function get_plugin_status( $plugin_file ) { /** * Safely checks if the plugin is active * - * @since $next-version$ + * @since 0.1.0 * * @param string $plugin_file The plugin file to check. * @return bool @@ -202,7 +202,7 @@ public static function is_plugin_active( $plugin_file ) { /** * Safely checks if the plugin is active for network * - * @since $next-version$ + * @since 0.1.0 * * @param string $plugin_file The plugin file to check. * @return bool diff --git a/projects/packages/publicize/changelog/fix-incorrect-next-version-tokens b/projects/packages/publicize/changelog/fix-incorrect-next-version-tokens new file mode 100644 index 0000000000000..773098e4cd961 --- /dev/null +++ b/projects/packages/publicize/changelog/fix-incorrect-next-version-tokens @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Fix incorrect next-version tokens in php `@since` and/or `@deprecated` docs. diff --git a/projects/packages/publicize/package.json b/projects/packages/publicize/package.json index 157c9eca5efb2..50e72165fc8d3 100644 --- a/projects/packages/publicize/package.json +++ b/projects/packages/publicize/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@automattic/jetpack-publicize", - "version": "0.49.0", + "version": "0.49.1-alpha", "description": "Publicize makes it easy to share your site’s posts on several social media networks automatically when you publish a new post.", "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/publicize/#readme", "bugs": { diff --git a/projects/packages/publicize/src/auto-conversion-settings/class-rest-settings-controller.php b/projects/packages/publicize/src/auto-conversion-settings/class-rest-settings-controller.php index f9c352b0eca7c..6b3704bdeb8c5 100644 --- a/projects/packages/publicize/src/auto-conversion-settings/class-rest-settings-controller.php +++ b/projects/packages/publicize/src/auto-conversion-settings/class-rest-settings-controller.php @@ -4,7 +4,7 @@ * * Flagged to be removed after deprecation. * - * @deprecated $$next_version$$ + * @deprecated 0.38.3 * * @package automattic/jetpack-publicize */ diff --git a/projects/packages/publicize/src/auto-conversion-settings/class-settings.php b/projects/packages/publicize/src/auto-conversion-settings/class-settings.php index e7c17e183b363..d6cc96f17c3b8 100644 --- a/projects/packages/publicize/src/auto-conversion-settings/class-settings.php +++ b/projects/packages/publicize/src/auto-conversion-settings/class-settings.php @@ -3,7 +3,7 @@ * Settings class. * Flagged to be removed after deprecation. * - * @deprecated $$next_version$$ + * @deprecated 0.38.3 * * @package automattic/jetpack-publicize */ diff --git a/projects/packages/publicize/src/class-publicize-setup.php b/projects/packages/publicize/src/class-publicize-setup.php index 79a70b02643ef..57caa858eecc8 100644 --- a/projects/packages/publicize/src/class-publicize-setup.php +++ b/projects/packages/publicize/src/class-publicize-setup.php @@ -47,7 +47,7 @@ public static function on_jetpack_feature_publicize_enabled() { add_action( 'admin_init', array( static::class, 'register_core_options' ) ); // Flagged to be removed after deprecation. - // @deprecated $$next_version$$ + // @deprecated 0.38.3 add_action( 'rest_api_init', array( new Auto_Conversion\REST_Settings_Controller(), 'register_routes' ) ); ( new Social_Image_Generator\Setup() )->init(); diff --git a/projects/packages/publicize/src/class-rest-controller.php b/projects/packages/publicize/src/class-rest-controller.php index 73069819edd8b..474eb0a2b0e79 100644 --- a/projects/packages/publicize/src/class-rest-controller.php +++ b/projects/packages/publicize/src/class-rest-controller.php @@ -85,7 +85,7 @@ public function register_rest_routes() { // Dismiss a notice. // Flagged to be removed after deprecation. - // @deprecated $$next_version$$. + // @deprecated 0.47.2 register_rest_route( 'jetpack/v4', '/social/dismiss-notice', diff --git a/projects/packages/publicize/src/social-image-generator/class-rest-settings-controller.php b/projects/packages/publicize/src/social-image-generator/class-rest-settings-controller.php index 70bc2432e7376..d40e5976f16bb 100644 --- a/projects/packages/publicize/src/social-image-generator/class-rest-settings-controller.php +++ b/projects/packages/publicize/src/social-image-generator/class-rest-settings-controller.php @@ -4,7 +4,7 @@ * * Flagged to be removed after deprecation. * - * @deprecated $$next_version$$ + * @deprecated 0.38.3 * * @package automattic/jetpack-publicize */ diff --git a/projects/packages/publicize/src/social-image-generator/class-settings.php b/projects/packages/publicize/src/social-image-generator/class-settings.php index b991594c4bed2..cec10fec71b67 100644 --- a/projects/packages/publicize/src/social-image-generator/class-settings.php +++ b/projects/packages/publicize/src/social-image-generator/class-settings.php @@ -4,7 +4,7 @@ * * Flagged to be removed after deprecation. * - * @deprecated $$next_version$$ + * @deprecated 0.38.3 * * @package automattic/jetpack-publicize */ diff --git a/projects/packages/publicize/src/social-image-generator/class-setup.php b/projects/packages/publicize/src/social-image-generator/class-setup.php index ed0b7655a4da5..bdb826c1d4830 100644 --- a/projects/packages/publicize/src/social-image-generator/class-setup.php +++ b/projects/packages/publicize/src/social-image-generator/class-setup.php @@ -28,7 +28,7 @@ public function init() { add_action( 'rest_api_init', array( new REST_Token_Controller(), 'register_routes' ) ); // Flagged to be removed after deprecation. - // @deprecated $$next_version$$ + // @deprecated 0.38.3 add_action( 'rest_api_init', array( new REST_Settings_Controller(), 'register_routes' ) ); } diff --git a/projects/packages/search/changelog/fix-incorrect-next-version-tokens b/projects/packages/search/changelog/fix-incorrect-next-version-tokens new file mode 100644 index 0000000000000..773098e4cd961 --- /dev/null +++ b/projects/packages/search/changelog/fix-incorrect-next-version-tokens @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Fix incorrect next-version tokens in php `@since` and/or `@deprecated` docs. diff --git a/projects/packages/search/package.json b/projects/packages/search/package.json index 2c4fe85f19b36..9f05afd45b565 100644 --- a/projects/packages/search/package.json +++ b/projects/packages/search/package.json @@ -1,6 +1,6 @@ { "name": "jetpack-search", - "version": "0.44.14", + "version": "0.44.15-alpha", "description": "Package for Jetpack Search products", "main": "main.js", "directories": { diff --git a/projects/packages/search/src/class-helper.php b/projects/packages/search/src/class-helper.php index 7661633a4ead5..caf0d837d3d61 100644 --- a/projects/packages/search/src/class-helper.php +++ b/projects/packages/search/src/class-helper.php @@ -891,7 +891,7 @@ public static function generate_initial_javascript_state() { * * @module search * - * @since $next-version$ + * @since 0.41.0 * * @param bool Prevent cookie reset for automattic sites as default value. */ diff --git a/projects/packages/search/src/class-package.php b/projects/packages/search/src/class-package.php index 73b3a97dfa062..5864b26c66ff6 100644 --- a/projects/packages/search/src/class-package.php +++ b/projects/packages/search/src/class-package.php @@ -11,7 +11,7 @@ * Search package general information */ class Package { - const VERSION = '0.44.14'; + const VERSION = '0.44.15-alpha'; const SLUG = 'search'; /** diff --git a/projects/packages/search/src/initializers/class-initializer.php b/projects/packages/search/src/initializers/class-initializer.php index 0cd9f9fe6d71b..aaacb83cbdfb2 100644 --- a/projects/packages/search/src/initializers/class-initializer.php +++ b/projects/packages/search/src/initializers/class-initializer.php @@ -122,7 +122,7 @@ protected static function init_search( $blog_id ) { /** * Filter whether classic search should be enabled. By this stage, search module would be enabled already. * - * @since Jetpack $$next_version$$ + * @since 0.39.6 * @param boolean initial value whether classic search is enabled. * @param boolean filtered result whether classic search is enabled. */ diff --git a/projects/packages/sync/changelog/fix-incorrect-next-version-tokens b/projects/packages/sync/changelog/fix-incorrect-next-version-tokens new file mode 100644 index 0000000000000..773098e4cd961 --- /dev/null +++ b/projects/packages/sync/changelog/fix-incorrect-next-version-tokens @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Fix incorrect next-version tokens in php `@since` and/or `@deprecated` docs. diff --git a/projects/packages/sync/src/class-dedicated-sender.php b/projects/packages/sync/src/class-dedicated-sender.php index 8c15dd37d7354..02cf7739e6f8a 100644 --- a/projects/packages/sync/src/class-dedicated-sender.php +++ b/projects/packages/sync/src/class-dedicated-sender.php @@ -292,7 +292,7 @@ public static function get_request_lock_id_from_request() { * Test Sync spawning functionality by making a request to the * Sync spawning endpoint and storing the result (status code) in a transient. * - * @since $$next_version$$ + * @since 1.34.0 * * @return bool True if we got a successful response, false otherwise. */ diff --git a/projects/packages/sync/src/class-functions.php b/projects/packages/sync/src/class-functions.php index f2df72f7bb5aa..88cc9acc3b33a 100644 --- a/projects/packages/sync/src/class-functions.php +++ b/projects/packages/sync/src/class-functions.php @@ -667,7 +667,7 @@ public static function get_themes() { /** * Return the list of active Jetpack modules. * - * @since $$next_version$$ + * @since 1.34.0 * * @return array */ @@ -678,7 +678,7 @@ public static function get_active_modules() { /** * Return a list of PHP modules that we want to track. * - * @since $$next_version$$ + * @since 1.50.0 * * @return array */ @@ -714,7 +714,7 @@ public static function get_loaded_extensions() { /** * Return the list of active connected Jetpack plugins. * - * @since $$next_version$$ + * @since 3.2.0 * * @return array */ diff --git a/projects/packages/sync/src/class-package-version.php b/projects/packages/sync/src/class-package-version.php index f65c8659412f6..9e0f2078c2fa6 100644 --- a/projects/packages/sync/src/class-package-version.php +++ b/projects/packages/sync/src/class-package-version.php @@ -12,7 +12,7 @@ */ class Package_Version { - const PACKAGE_VERSION = '3.5.1'; + const PACKAGE_VERSION = '3.5.2-alpha'; const PACKAGE_SLUG = 'sync'; diff --git a/projects/packages/sync/src/class-rest-endpoints.php b/projects/packages/sync/src/class-rest-endpoints.php index 23863d0354e8e..22261e9661769 100644 --- a/projects/packages/sync/src/class-rest-endpoints.php +++ b/projects/packages/sync/src/class-rest-endpoints.php @@ -764,7 +764,7 @@ public static function get_object_id_range( $request ) { * @see Actions::init * @see Sender::do_dedicated_sync_and_exit * - * @since $$next_version$$ + * @since 1.34.0 * * @return \WP_REST_Response */ diff --git a/projects/packages/waf/changelog/fix-incorrect-next-version-tokens b/projects/packages/waf/changelog/fix-incorrect-next-version-tokens new file mode 100644 index 0000000000000..773098e4cd961 --- /dev/null +++ b/projects/packages/waf/changelog/fix-incorrect-next-version-tokens @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Fix incorrect next-version tokens in php `@since` and/or `@deprecated` docs. diff --git a/projects/packages/waf/src/class-compatibility.php b/projects/packages/waf/src/class-compatibility.php index 1f818cc23e822..8f3e6d5634a15 100644 --- a/projects/packages/waf/src/class-compatibility.php +++ b/projects/packages/waf/src/class-compatibility.php @@ -235,7 +235,7 @@ public static function is_brute_force_running_in_jetpack() { /** * Default the allow list enabled option to the value of the generic IP lists enabled option it replaced. * - * @since $next-version$ + * @since 0.17.0 * * @param mixed $default The default value to return if the option does not exist in the database. * @param string $option Option name. @@ -268,7 +268,7 @@ public static function default_option_waf_ip_allow_list_enabled( $default, $opti /** * Default the block list enabled option to the value of the generic IP lists enabled option it replaced. * - * @since $next-version$ + * @since 0.17.0 * * @param mixed $default The default value to return if the option does not exist in the database. * @param string $option Option name. diff --git a/projects/packages/waf/src/class-rest-controller.php b/projects/packages/waf/src/class-rest-controller.php index e2433a1f96e10..8a036c11ad14f 100644 --- a/projects/packages/waf/src/class-rest-controller.php +++ b/projects/packages/waf/src/class-rest-controller.php @@ -109,7 +109,7 @@ public static function update_waf( $request ) { /** * IP Lists Enabled * - * @deprecated $next-version$ This is a legacy option maintained here for backwards compatibility. + * @deprecated 0.17.0 This is a legacy option maintained here for backwards compatibility. */ if ( isset( $request['jetpack_waf_ip_list'] ) ) { update_option( Waf_Rules_Manager::IP_BLOCK_LIST_ENABLED_OPTION_NAME, $request['jetpack_waf_ip_list'] ? '1' : '' ); diff --git a/projects/packages/waf/src/class-waf-rules-manager.php b/projects/packages/waf/src/class-waf-rules-manager.php index 14fe1209e50fa..89bf220f1a5d2 100644 --- a/projects/packages/waf/src/class-waf-rules-manager.php +++ b/projects/packages/waf/src/class-waf-rules-manager.php @@ -34,7 +34,7 @@ class Waf_Rules_Manager { /** * IP Lists Enabled Option Name * - * @deprecated $next-version$ Use Waf_Rules_Manager::IP_ALLOW_LIST_ENABLED_OPTION_NAME and Waf_Rules_Manager::IP_BLOCK_LIST_ENABLED_OPTION_NAME instead. + * @deprecated 0.17.0 Use Waf_Rules_Manager::IP_ALLOW_LIST_ENABLED_OPTION_NAME and Waf_Rules_Manager::IP_BLOCK_LIST_ENABLED_OPTION_NAME instead. */ const IP_LISTS_ENABLED_OPTION_NAME = 'jetpack_waf_ip_list'; diff --git a/projects/packages/waf/src/class-waf-runner.php b/projects/packages/waf/src/class-waf-runner.php index dce9ac319fb5f..cfed64e7ec3f4 100644 --- a/projects/packages/waf/src/class-waf-runner.php +++ b/projects/packages/waf/src/class-waf-runner.php @@ -176,7 +176,7 @@ public static function get_config() { * Provide the deprecated IP lists options for backwards compatibility with older versions of the Jetpack and Protect plugins. * i.e. If one plugin is updated and the other is not, the latest version of this package will be used by both plugins. * - * @deprecated $next-version$ + * @deprecated 0.17.0 */ // @phan-suppress-next-line PhanDeprecatedClassConstant -- Needed for backwards compatibility. Waf_Rules_Manager::IP_LISTS_ENABLED_OPTION_NAME => Waf_Rules_Manager::ip_allow_list_enabled() || Waf_Rules_Manager::ip_block_list_enabled(), diff --git a/projects/plugins/jetpack/changelog/fix-incorrect-next-version-tokens b/projects/plugins/jetpack/changelog/fix-incorrect-next-version-tokens new file mode 100644 index 0000000000000..26b00c0c77e0f --- /dev/null +++ b/projects/plugins/jetpack/changelog/fix-incorrect-next-version-tokens @@ -0,0 +1,5 @@ +Significance: patch +Type: other +Comment: Fix incorrect next-version tokens in php `@since` and/or `@deprecated` docs. + + diff --git a/projects/plugins/jetpack/class.jetpack-gutenberg.php b/projects/plugins/jetpack/class.jetpack-gutenberg.php index 496778d9c229f..a0e5d9042545d 100644 --- a/projects/plugins/jetpack/class.jetpack-gutenberg.php +++ b/projects/plugins/jetpack/class.jetpack-gutenberg.php @@ -728,7 +728,7 @@ public static function enqueue_block_editor_assets() { * @module publicize * * @since 10.3.0 - * @deprecated $$next_version$$ This is a feature flag that is no longer used. + * @deprecated 11.5 This is a feature flag that is no longer used. * * @param bool true Enable the RePublicize UI in the block editor context. Defaults to true. */ diff --git a/projects/plugins/jetpack/extensions/blocks/subscriber-login/class-jetpack-subscription-site.php b/projects/plugins/jetpack/extensions/blocks/subscriber-login/class-jetpack-subscription-site.php index 43c117e6ad16b..e6f67e2b16efe 100644 --- a/projects/plugins/jetpack/extensions/blocks/subscriber-login/class-jetpack-subscription-site.php +++ b/projects/plugins/jetpack/extensions/blocks/subscriber-login/class-jetpack-subscription-site.php @@ -3,7 +3,7 @@ * Adds support for Jetpack Subscription Site feature. * * @package automattic/jetpack - * @since $$next_version$$ + * @since 13.3 */ namespace Automattic\Jetpack\Extensions\Subscriber_Login;