diff --git a/.distignore b/.distignore
deleted file mode 100644
index d542a53..0000000
--- a/.distignore
+++ /dev/null
@@ -1,45 +0,0 @@
-# A set of files you probably don't want in your WordPress.org distribution
-.babelrc
-.deployignore
-.distignore
-.editorconfig
-.eslintignore
-.eslintrc
-.git
-.gitignore
-.github
-.gitlab-ci.yml
-.travis.yml
-.DS_Store
-.*~
-Thumbs.db
-behat.yml
-bitbucket-pipelines.yml
-bin
-.circleci/config.yml
-composer.json
-composer.lock
-dependencies.yml
-Gruntfile.js
-package.json
-package-lock.json
-phpunit.xml
-phpunit.xml.dist
-multisite.xml
-multisite.xml.dist
-.phpcs.xml
-phpcs.xml
-.phpcs.xml.dist
-phpcs.xml.dist
-README.md
-webpack.config.js
-wp-cli.local.yml
-yarn.lock
-tests
-vendor
-node_modules
-*.sql
-*.tar.gz
-*.zip
-.wp-env.json
-.wp-env.test.json
diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml
index 1af561e..173e1c5 100644
--- a/.github/workflows/testing.yml
+++ b/.github/workflows/testing.yml
@@ -13,26 +13,10 @@ jobs:
- name: Check out source code
uses: actions/checkout@v4
- - name: Setup PHP
- uses: shivammathur/setup-php@v2
- with:
- php-version: latest
- coverage: none
- tools: wp-cli
-
- - name: Install latest version of dist-archive-command
- run: wp package install wp-cli/dist-archive-command:v3.1.0
-
- - name: Build plugin
- run: |
- wp dist-archive . ./rsscloud.zip --plugin-dirname=rsscloud
- mkdir tmp-build
- unzip rsscloud.zip -d tmp-build
-
- name: Run plugin check
uses: wordpress/plugin-check-action@v1
with:
- build-dir: "./tmp-build/rsscloud"
+ build-dir: "./rsscloud"
phpunit:
name: Run tests
diff --git a/.phpcs.xml.dist b/.phpcs.xml.dist
index df58068..cefeb80 100644
--- a/.phpcs.xml.dist
+++ b/.phpcs.xml.dist
@@ -3,9 +3,7 @@
Generally-applicable sniffs for WordPress plugins.
- .
- /vendor/
- /node_modules/
+ ./rsscloud
diff --git a/.wp-env.json b/.wp-env.json
index 925a5b9..fce073a 100644
--- a/.wp-env.json
+++ b/.wp-env.json
@@ -2,7 +2,10 @@
"$schema": "https://schemas.wp.org/trunk/wp-env.json",
"testsEnvironment": false,
"core": "WordPress/WordPress#6.3",
- "plugins": ["."],
+ "plugins": ["./rsscloud"],
"phpVersion": "7.4",
- "phpmyadminPort": 9000
+ "phpmyadminPort": 9000,
+ "mappings": {
+ "wp-content/plugins/rsscloud-dev": "."
+ }
}
diff --git a/.wp-env.test.json b/.wp-env.test.json
index d502163..d71f7d1 100644
--- a/.wp-env.test.json
+++ b/.wp-env.test.json
@@ -3,9 +3,12 @@
"testsEnvironment": false,
"port": 8889,
"core": "WordPress/WordPress#6.3",
- "plugins": ["."],
+ "plugins": ["./rsscloud"],
"config": {
"WP_DEBUG": false,
"SCRIPT_DEBUG": false
+ },
+ "mappings": {
+ "wp-content/plugins/rsscloud-dev": "."
}
}
diff --git a/package.json b/package.json
index b284433..d7a8527 100644
--- a/package.json
+++ b/package.json
@@ -15,18 +15,18 @@
"scripts": {
"lint:php:setup": "wp-env start",
"preformat:php": "npm-run-all lint:php:setup other:update-packages:php",
- "format:php": "wp-env run --env-cwd='wp-content/plugins/rsscloud' cli composer run-script format",
+ "format:php": "wp-env run --env-cwd='wp-content/plugins/rsscloud-dev' cli composer run-script format",
"prelint:php": "npm-run-all lint:php:setup other:update-packages:php",
- "lint:php": "wp-env run --env-cwd='wp-content/plugins/rsscloud' cli composer run-script lint",
- "other:update-packages:php": "wp-env run --env-cwd='wp-content/plugins/rsscloud' cli composer update --no-interaction",
+ "lint:php": "wp-env run --env-cwd='wp-content/plugins/rsscloud-dev' cli composer run-script lint",
+ "other:update-packages:php": "wp-env run --env-cwd='wp-content/plugins/rsscloud-dev' cli composer update --no-interaction",
"test:php": "npm-run-all lint:php test:unit:php",
"test:unit:php:setup": "wp-env --config .wp-env.test.json start",
"test:unit:php:setup:debug": "wp-env --config .wp-env.test.json start --xdebug",
- "test:unit:php:base": "wp-env --config .wp-env.test.json run --env-cwd='wp-content/plugins/rsscloud' wordpress vendor/bin/phpunit -c phpunit.xml.dist --verbose --testdox",
+ "test:unit:php:base": "wp-env --config .wp-env.test.json run --env-cwd='wp-content/plugins/rsscloud-dev' wordpress vendor/bin/phpunit -c phpunit.xml.dist --verbose --testdox",
"test:unit:php": "npm-run-all test:unit:php:setup test:unit:php:base",
"test:unit:php:debug": "npm-run-all test:unit:php:setup:debug test:unit:php:base",
"test:unit:php:setup:coverage": "wp-env --config .wp-env.test.json start --xdebug=coverage",
- "test:unit:php:coverage:base": "wp-env --config .wp-env.test.json run --env-cwd='wp-content/plugins/rsscloud' wordpress vendor/bin/phpunit -c phpunit.xml.dist --verbose --coverage-html coverage --coverage-clover coverage/clover.xml",
+ "test:unit:php:coverage:base": "wp-env --config .wp-env.test.json run --env-cwd='wp-content/plugins/rsscloud-dev' wordpress vendor/bin/phpunit -c phpunit.xml.dist --verbose --coverage-html coverage --coverage-clover coverage/clover.xml",
"test:unit:php:coverage": "npm-run-all test:unit:php:setup:coverage test:unit:php:coverage:base"
}
}
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
index 4f1d0e5..1f1ceaf 100644
--- a/phpcs.xml.dist
+++ b/phpcs.xml.dist
@@ -3,15 +3,11 @@
Generally-applicable sniffs for WordPress plugins
-
- .
+ ./rsscloud
-
- */node_modules/*
- */vendor/*
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index b4f05d5..29165d0 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -16,12 +16,7 @@
- .
+ ./rsscloud
-
- ./tests
- ./vendor
- ./node_modules
-
diff --git a/data-storage.php b/rsscloud/data-storage.php
similarity index 100%
rename from data-storage.php
rename to rsscloud/data-storage.php
diff --git a/notification-request.php b/rsscloud/notification-request.php
similarity index 100%
rename from notification-request.php
rename to rsscloud/notification-request.php
diff --git a/readme.txt b/rsscloud/readme.txt
similarity index 100%
rename from readme.txt
rename to rsscloud/readme.txt
diff --git a/rsscloud.php b/rsscloud/rsscloud.php
similarity index 100%
rename from rsscloud.php
rename to rsscloud/rsscloud.php
diff --git a/schedule-post-notifications.php b/rsscloud/schedule-post-notifications.php
similarity index 100%
rename from schedule-post-notifications.php
rename to rsscloud/schedule-post-notifications.php
diff --git a/send-post-notifications.php b/rsscloud/send-post-notifications.php
similarity index 100%
rename from send-post-notifications.php
rename to rsscloud/send-post-notifications.php
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index 341813e..92e296d 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -29,7 +29,7 @@
* Manually load the plugin being tested.
*/
function _manually_load_plugin() {
- require dirname( __DIR__, 1 ) . '/rsscloud.php';
+ require dirname( __DIR__, 1 ) . '/rsscloud/rsscloud.php';
}
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );