Skip to content

Commit 246368d

Browse files
committed
- update composer build-plugin script to replace the Updater.php class in the Appsero dependency
- add build/Updater.php class to be used to copy and replace the Appsero Updater.php class with a blank class
1 parent e2c8a30 commit 246368d

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

build/Updater.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
namespace Appsero;
3+
4+
/**
5+
* Temp replacement for the Updater.php class
6+
* to allow the plugin to pass WordPress.org
7+
* review process until Appsero has a formal solution.
8+
*
9+
* This file is used to replace the Updater.php class in the Appsero vendor dep after
10+
* composer install is run, before the plugin is bundled as a .zip
11+
*
12+
* see: https://github.com/Appsero/client/issues/34
13+
*/
14+
class Updater {}

composer.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,13 @@
7373
],
7474
"build-app": "@docker-build -a",
7575
"build-test": "@docker-build -t",
76-
"build-plugin": "composer install --no-dev && composer run-script zip && composer install",
76+
"build-plugin": [
77+
"composer install --no-dev",
78+
"rm ./vendor/appsero/client/src/Updater.php",
79+
"cp ./build/Updater.php ./vendor/appsero/client/src/",
80+
"composer run-script zip",
81+
"composer install"
82+
],
7783
"run-app": "@docker-run -a",
7884
"run-test": "@docker-run -t",
7985
"lint": "vendor/bin/phpcs",

0 commit comments

Comments
 (0)