Skip to content

Commit d4e6551

Browse files
authored
fix: installation errors when upgrading plugin via the WordPress backend (#388)
* fix: update plugin-update-checker and set explicit filename * ci: include top-level plugin folder in release zip. * chore: update changelog * chore: typo
1 parent 07d6471 commit d4e6551

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1726
-2746
lines changed

.github/workflows/upload-release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ jobs:
2222
composer install --no-dev --optimize-autoloader
2323
- name: Create Artifact
2424
run: |
25-
mkdir plugin-build
26-
composer archive -vvv --format=zip --file="plugin-build/wp-graphql-gravity-forms"
25+
mkdir -p plugin-build/wp-graphql-gravity-forms
26+
rsync -rc --exclude-from=.distignore --exclude=plugin-build . plugin-build/wp-graphql-gravity-forms/ --delete --delete-excluded -v
27+
cd plugin-build ; zip -r wp-graphql-gravity-forms.zip wp-graphql-gravity-forms
2728
- name: Upload artifact
2829
uses: actions/upload-artifact@v3
2930
with:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
- fix: Fix installation errors when upgrading plugin via the WordPress backend.
6+
- chore: Update `yahnis-elsts/plugin-update-checker` to v5.2.
7+
- ci: Include top-level plugin folder in release zip.
8+
59
## v0.12.3
610

711
This _minor_ release fixes a few bugs when resolving `GfEntry` data, and addresses some code smells from the updated WPGraphQL Coding Standards. We're also now testing the plugin against WordPress 6.3 and PHP 8.1.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
],
2222
"require": {
2323
"php": ">=7.4",
24-
"yahnis-elsts/plugin-update-checker": "~4.13.0"
24+
"yahnis-elsts/plugin-update-checker": "^5.2.0"
2525
},
2626
"require-dev": {
2727
"codeception/lib-innerbrowser": "^1.0",

composer.lock

Lines changed: 263 additions & 262 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/UpdateChecker.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
namespace WPGraphQL\GF;
1010

11-
use Puc_v4_Factory;
1211
use WPGraphQL\GF\Interfaces\Hookable;
12+
use YahnisElsts\PluginUpdateChecker\v5\PucFactory;
1313

1414
/**
1515
* Class - Update Checker
@@ -37,17 +37,16 @@ public static function check_updates(): void {
3737
*
3838
* @param string $repo_link The url to the repo.
3939
*/
40-
$repo_link = apply_filters( 'graphql_gf_update_repo_url', 'https://github.com/axewp/wp-graphql-gravity-forms/' );
40+
$repo_link = apply_filters( 'graphql_gf_update_repo_url', 'https://github.com/AxeWP/wp-graphql-gravity-forms/' );
4141

42-
/** @var \Puc_v4p13_Vcs_PluginUpdateChecker */
43-
$update_checker = Puc_v4_Factory::buildUpdateChecker(
42+
$update_checker = PucFactory::buildUpdateChecker(
4443
trailingslashit( $repo_link ),
4544
WPGRAPHQL_GF_PLUGIN_FILE,
4645
'wp-graphql-gravity-forms',
4746
);
48-
47+
4948
// @phpstan-ignore-next-line
50-
$update_checker->getVcsApi()->enableReleaseAssets();
49+
$update_checker->getVcsApi()->enableReleaseAssets( '/wp-graphql-gravity-forms\.zip/' );
5150
}
5251

5352
/**

vendor/composer/autoload_files.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
$baseDir = dirname($vendorDir);
77

88
return array(
9-
'7166494aeff09009178f278afd86c83f' => $vendorDir . '/yahnis-elsts/plugin-update-checker/load-v4p13.php',
9+
'efd9d646f43178e7ba3f07758c02ce1d' => $vendorDir . '/yahnis-elsts/plugin-update-checker/load-v5p2.php',
1010
);

vendor/composer/autoload_static.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class ComposerStaticInitf35655797d6bdd77951f2274b8dc4a3f
88
{
99
public static $files = array (
10-
'7166494aeff09009178f278afd86c83f' => __DIR__ . '/..' . '/yahnis-elsts/plugin-update-checker/load-v4p13.php',
10+
'efd9d646f43178e7ba3f07758c02ce1d' => __DIR__ . '/..' . '/yahnis-elsts/plugin-update-checker/load-v5p2.php',
1111
);
1212

1313
public static $prefixLengthsPsr4 = array (

vendor/composer/installed.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,29 @@
22
"packages": [
33
{
44
"name": "yahnis-elsts/plugin-update-checker",
5-
"version": "v4.13",
6-
"version_normalized": "4.13.0.0",
5+
"version": "v5.2",
6+
"version_normalized": "5.2.0.0",
77
"source": {
88
"type": "git",
99
"url": "https://github.com/YahnisElsts/plugin-update-checker.git",
10-
"reference": "6eb27a6911e0e0880d09e5b11f577d3f688f7da7"
10+
"reference": "5a270988c5f76bfdfbbb42cccc7c9627f7dd64d0"
1111
},
1212
"dist": {
1313
"type": "zip",
14-
"url": "https://api.github.com/repos/YahnisElsts/plugin-update-checker/zipball/6eb27a6911e0e0880d09e5b11f577d3f688f7da7",
15-
"reference": "6eb27a6911e0e0880d09e5b11f577d3f688f7da7",
14+
"url": "https://api.github.com/repos/YahnisElsts/plugin-update-checker/zipball/5a270988c5f76bfdfbbb42cccc7c9627f7dd64d0",
15+
"reference": "5a270988c5f76bfdfbbb42cccc7c9627f7dd64d0",
1616
"shasum": ""
1717
},
1818
"require": {
1919
"ext-json": "*",
20-
"php": ">=5.2.0"
20+
"php": ">=5.6.20"
2121
},
22-
"time": "2022-07-29T12:36:25+00:00",
22+
"time": "2023-08-17T12:44:32+00:00",
2323
"type": "library",
2424
"installation-source": "dist",
2525
"autoload": {
2626
"files": [
27-
"load-v4p13.php"
27+
"load-v5p2.php"
2828
]
2929
},
3030
"notification-url": "https://packagist.org/downloads/",
@@ -35,7 +35,7 @@
3535
{
3636
"name": "Yahnis Elsts",
3737
"email": "[email protected]",
38-
"homepage": "http://w-shadow.com/",
38+
"homepage": "https://w-shadow.com/",
3939
"role": "Developer"
4040
}
4141
],
@@ -49,7 +49,7 @@
4949
],
5050
"support": {
5151
"issues": "https://github.com/YahnisElsts/plugin-update-checker/issues",
52-
"source": "https://github.com/YahnisElsts/plugin-update-checker/tree/v4.13"
52+
"source": "https://github.com/YahnisElsts/plugin-update-checker/tree/v5.2"
5353
},
5454
"install-path": "../yahnis-elsts/plugin-update-checker"
5555
}

vendor/composer/installed.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
<?php return array(
22
'root' => array(
33
'name' => 'harness-software/wp-graphql-gravity-forms',
4-
'pretty_version' => 'dev-develop',
5-
'version' => 'dev-develop',
6-
'reference' => '2b5a054a418805892516a3ea6b322afdb890dd79',
4+
'pretty_version' => 'dev-main',
5+
'version' => 'dev-main',
6+
'reference' => '07d6471beff1304aa7e8db183ec63df20ab89800',
77
'type' => 'wordpress-plugin',
88
'install_path' => __DIR__ . '/../../',
99
'aliases' => array(),
1010
'dev' => false,
1111
),
1212
'versions' => array(
1313
'harness-software/wp-graphql-gravity-forms' => array(
14-
'pretty_version' => 'dev-develop',
15-
'version' => 'dev-develop',
16-
'reference' => '2b5a054a418805892516a3ea6b322afdb890dd79',
14+
'pretty_version' => 'dev-main',
15+
'version' => 'dev-main',
16+
'reference' => '07d6471beff1304aa7e8db183ec63df20ab89800',
1717
'type' => 'wordpress-plugin',
1818
'install_path' => __DIR__ . '/../../',
1919
'aliases' => array(),
2020
'dev_requirement' => false,
2121
),
2222
'yahnis-elsts/plugin-update-checker' => array(
23-
'pretty_version' => 'v4.13',
24-
'version' => '4.13.0.0',
25-
'reference' => '6eb27a6911e0e0880d09e5b11f577d3f688f7da7',
23+
'pretty_version' => 'v5.2',
24+
'version' => '5.2.0.0',
25+
'reference' => '5a270988c5f76bfdfbbb42cccc7c9627f7dd64d0',
2626
'type' => 'library',
2727
'install_path' => __DIR__ . '/../yahnis-elsts/plugin-update-checker',
2828
'aliases' => array(),
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build export-ignore

0 commit comments

Comments
 (0)