Skip to content
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
5 changes: 4 additions & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@
# 4. Workflow permissions
# 5. Enable "read and write permissions"
#
# @version 3.0.0
# @version 3.0.1
#
###################################################

name: Create GitHub Release
run-name: Create release for ${{ github.ref_name }} on GitHub.

permissions:
contents: write

on:
push:
tags-ignore:
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
name: Deploy to WordPress.org

env:
# Can't specify the VERSION, or the plugin will deploy in that version.
# VERSION: 3.4.1
# VERSION: 3.4.2
NODE_VERSION: '20.11.0'
PHP_VERSION: '8.3'
PHP_VERSION: '8.4'
TZ: 'America/New_York'

permissions:
contents: read

on:
push:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/populate-caches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@
# https://github.com/lipemat/go-live-update-urls/settings/variables/actions
# @see The reusable workflow for the required variables.
#
# @version 1.1.0
# @version 1.1.1
#
###################################################

name: Populate Caches

permissions:
actions: write
contents: read

on:
push:
branches:
Expand Down
37 changes: 29 additions & 8 deletions .github/workflows/pull-request-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@
# secrets:
# PUBLIC_ACTIONS_PRO_REPO: The token to access the pro repository.
#
# @version 0.0.6
# @version 0.1.0
#
##############################

name: Test & Lint Files

permissions:
actions: read
contents: read

on:
pull_request:
types:
Expand All @@ -32,23 +36,40 @@ jobs:
php-lint:
strategy:
matrix:
php: [ 7.4, 8.0, 8.1, 8.2, 8.3 ]
php: [ 7.4, 8.0, 8.1, 8.2, 8.3, 8.4 ]
uses: lipemat/public-actions/.github/workflows/php-lint.yml@version/1
with:
php: ${{ matrix.php }}

wp-unit:
strategy:
# https://make.wordpress.org/core/handbook/references/php-compatibility-and-wordpress-versions/
matrix:
wp: [ 6.2.6, 6.7.2 ]
php: [ 7.4, 8.3 ]
versions: [
{
php: 7.4,
wp: 6.2.6
},
{
php: 8.1,
wp: 6.2.6
},
{
php: 7.4,
wp: 6.8.2
},
{
php: 8.4,
wp: 6.8.2
},
]
multisite: [ 'single', 'multisite' ]
uses: lipemat/public-actions/.github/workflows/wp-unit-plugin.yml@version/1
with:
multisite: ${{ matrix.multisite }}
php: ${{ matrix.php }}
php: ${{ matrix.versions.php }}
skipDatabaseInstall: false
wp: ${{ matrix.wp }}
wp: ${{ matrix.versions.wp }}
secrets: inherit

phpstan:
Expand All @@ -58,8 +79,8 @@ jobs:
- php: 7.4
phpstan-version: 3.4.2
stubs: 6.2.6
- php: 8.3
stubs: 6.7.1
- php: 8.4
stubs: 6.8.1
uses: lipemat/public-actions/.github/workflows/phpstan-plugin.yml@version/1
with:
php: ${{ matrix.combination.php }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/update-readme.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: Plugin asset/readme update

env:
# Can't specify the VERSION, or the plugin will deploy in that version.
# VERSION: 2.0.0
# VERSION: 2.0.1
IGNORE_OTHER_FILES: true
TZ: 'America/New_York'

permissions:
contents: read

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion dev/git-hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

JEST_CONFIG="jest/jest.config.ts"
LEGACY_PHP_VERSION="7.4"
PHP_VERSION="8.3"
PHP_VERSION="8.4"
PHPUNIT_DIR="../go-live-update-urls-pro/dev/wp-unit"

#####################################################################################
Expand Down
6 changes: 3 additions & 3 deletions go-live-update-urls.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: Updates every URL on your site when going live or changing domains.
* Author: OnPoint Plugins
* Author URI: https://onpointplugins.com
* Version: 7.0.4
* Version: 7.0.6
* Text Domain: go-live-update-urls
* Domain Path: /languages/
* Network: false
Expand All @@ -15,8 +15,8 @@
* @package go-live-update-urls
*/

define( 'GO_LIVE_UPDATE_URLS_VERSION', '7.0.4' );
define( 'GO_LIVE_UPDATE_URLS_REQUIRED_PRO_VERSION', '7.0.4' );
define( 'GO_LIVE_UPDATE_URLS_VERSION', '7.0.6' );
define( 'GO_LIVE_UPDATE_URLS_REQUIRED_PRO_VERSION', '7.1.0' );
define( 'GO_LIVE_UPDATE_URLS_URL', plugin_dir_url( __FILE__ ) );

use Go_Live_Update_Urls\Admin;
Expand Down
4 changes: 3 additions & 1 deletion phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@
<rule ref="WordPress.WP.I18n">
<properties>
<!-- https://github.com/WordPress/WordPress-Coding-Standards/wiki/Customizable-sniff-properties#wordpresswpi18n-setting-your-text-domain -->
<property name="text_domain" type="array" value="go-live-update-urls" />
<property name="text_domain" type="array">
<element value="go-live-update-urls" />
</property>
</properties>
</rule>
</ruleset>
19 changes: 13 additions & 6 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Contributors: onpointplugins, Mat Lipe
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40onpointplugins%2ecom&lc=US&item_name=Go%20Live%20Update%20Urls&no_note=0&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
Tags: search and replace, database, urls, domain, update urls
Requires at least: 6.2.0
Tested up to: 6.8.0
Tested up to: 6.8.2
Requires PHP: 7.4.0
Stable tag: 7.0.4
Stable tag: 7.0.6
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Change the domain on your site with one click.
Expand Down Expand Up @@ -40,7 +40,6 @@ Automatically detects and handles special domain circumstances to give you an ac
* Options and settings
* And much more


<h3>Domain Update Process</h3>
Full step-by-step instructions for a changing a site's domain <a target="_blank" href="https://onpointplugins.com/how-to-change-your-domain-name-on-wordpress/">may be found here</a>.

Expand Down Expand Up @@ -122,15 +121,23 @@ If you find you are running into issues with custom tables, you may want to chec
3. Update prevented due to incomplete data entered.

== Changelog ==
= 7.0.6 =
* Tested to WordPress 6.8.2.
* Required PRO version 7.1.0+.

= 7.0.5 =
* Officially added support for PHP 8.4.
* Improved `Skip_Rows` unit testing.
* Tested to WordPress 6.8.1.

= 7.0.4 =
* Improve labels on tools page.
* Simplified the readme.
* Tested to WordPress 6.8.0.
* Required PRO version 7.0.4+.
* Required PRO version 7.0.4+.

= 7.0.3 =
* Added original plugin author to the readme.
= 7.0.3 =
* Added original plugin author to the readme.
* Upgraded PHPStan to version 2.
* Updated nanoid to latest version to resolve dependency vulnerability.
* Tested to WordPress 6.7.2.
Expand Down
23 changes: 5 additions & 18 deletions src/Skip_Rows.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function set_current_table( $table, $primary_key ) {
*
* @return void
*/
public function set_current_row_id( $db_id ) {
public function set_current_row_id( $db_id ): void {
$this->row_id = $db_id;
}

Expand All @@ -82,7 +82,7 @@ public function set_current_row_id( $db_id ) {
*
* @return void
*/
public function skip_current() {
public function skip_current(): void {
if ( '' === $this->table || 0 === $this->row_id ) {
_doing_it_wrong( __METHOD__, esc_html__( 'You must set a table and DB id before skipping a row.', 'go-live-update-urls' ), '6.5.0' );
}
Expand Down Expand Up @@ -117,10 +117,7 @@ public function get_skipped( $table ): ?array {
* @return string|null
*/
public function get_primary_key( $table ) {
if ( ! isset( $this->primary_keys[ $table ] ) ) {
return null;
}
return $this->primary_keys[ $table ];
return $this->primary_keys[ $table ] ?? null;
}


Expand All @@ -134,22 +131,12 @@ public function get_primary_key( $table ) {
*
* @return void
*/
public function log_error( string $class_name ) {
public function log_error( string $class_name ): void {
//phpcs:ignore -- We want to use the PHP error log.
error_log( vsprintf( 'Go Live skipped row `%s` in the table `%s` because it contains an unavailable PHP class named `%s`.', [
\error_log( \vsprintf( 'Go Live skipped row `%s` in the table `%s` because it contains an unavailable PHP class named `%s`.', [
$this->row_id,
$this->table,
$class_name,
] ) );
}


/**
* Reset all skips for a fresh class.
*
* @return void
*/
public static function reset() {
static::$instance = null;
}
}
Loading