diff --git a/.github/workflows/lint-plugin.yml b/.github/workflows/lint-plugin.yml index c3a57123c..95389c329 100644 --- a/.github/workflows/lint-plugin.yml +++ b/.github/workflows/lint-plugin.yml @@ -11,8 +11,8 @@ jobs: with: php-version: '7.3' - name: Install Dependencies - working-directory: plugins/wpe-headless + working-directory: plugins/faustwp run: composer install - name: Run Lint - working-directory: plugins/wpe-headless + working-directory: plugins/faustwp run: composer lint diff --git a/.github/workflows/test-plugin.yml b/.github/workflows/test-plugin.yml index 4dc6cdc14..a2419afb1 100644 --- a/.github/workflows/test-plugin.yml +++ b/.github/workflows/test-plugin.yml @@ -7,13 +7,13 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Create Docker Containers - working-directory: ./plugins/wpe-headless + working-directory: ./plugins/faustwp run: docker-compose up -d - name: Sleep 15 seconds run: sleep 15 - name: Setup testing framework - working-directory: ./plugins/wpe-headless + working-directory: ./plugins/faustwp run: docker exec $(docker-compose ps -q wordpress) init-testing-environment.sh - name: Run unit tests - working-directory: ./plugins/wpe-headless - run: docker exec -w /var/www/html/wp-content/plugins/wpe-headless $(docker-compose ps -q wordpress) composer test + working-directory: ./plugins/faustwp + run: docker exec -w /var/www/html/wp-content/plugins/faustwp $(docker-compose ps -q wordpress) composer test diff --git a/.wp-env.json b/.wp-env.json deleted file mode 100644 index 9d1a7873a..000000000 --- a/.wp-env.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "core": "WordPress/WordPress#5.6", - "phpVersion": "7.4", - "plugins": [ - "https://downloads.wordpress.org/plugin/wp-graphql.1.1.3.zip", - "./plugins/wpe-headless" - ] -} \ No newline at end of file diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 7795f18a2..30bc060c6 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -30,19 +30,19 @@ As this is a monorepo, you will not be able to check out this repository into `w Instead, you can create symlinks to the themes/plugins in this repository. Best of all, this will also sync your work across multiple local sites! -#### WPE Headless Plugin +#### FaustWP Plugin **Setup** -To begin working with the WPE Headless WordPress plugin, you will need to symlink the plugin from the monorepo to your WordPress plugin development directory. +To begin working with the FaustWP WordPress plugin, you will need to symlink the plugin from the monorepo to your WordPress plugin development directory. ``` -ln -s /path/to/faustjs/plugins/wpe-headless /path/to/wordpress/wp-content/plugins/wpe-headless +ln -s /path/to/faustjs/plugins/faustwp /path/to/wordpress/wp-content/plugins/faustwp ``` **PHP Code Sniffer** [PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer) is configured for the [WordPress code standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/). -Install the composer packages from within `wpe-headless` directory if you haven't already. +Install the composer packages from within `faustwp` directory if you haven't already. ``` composer install @@ -62,7 +62,7 @@ composer phpcs:fix **WordPress Unit Tests** -To run WordPress unit tests, first create the Docker containers from the `plugins/wpe-headless` directory: +To run WordPress unit tests, first create the Docker containers from the `plugins/faustwp` directory: ``` docker-compose up -d @@ -77,7 +77,7 @@ docker-compose exec wordpress init-testing-environment.sh Run the unit tests: ``` -docker-compose exec -w /var/www/html/wp-content/plugins/wpe-headless wordpress composer test +docker-compose exec -w /var/www/html/wp-content/plugins/faustwp wordpress composer test ``` Finally, to remove the containers: @@ -119,12 +119,12 @@ WP_HEADLESS_SECRET=00000000-0000-0000-0000-000000000001 ### 3. WordPress Setup 1. Leave the node server running and open a new shell. -1. Move into the WPE Headless plugin directory `plugins/wpe-headless`. +1. Move into the FaustWP plugin directory `plugins/faustwp`. 1. Run `composer install` if you haven't already. 1. Prepare a test WordPress site. 1. Run `docker-compose up -d --build`. If building for the first time, it could take some time to download and build the images. - 1. Run `docker-compose exec --workdir=/var/www/html/wp-content/plugins/wpe-headless --user=www-data wordpress wp plugin install wp-graphql --activate` - 1. Run `docker-compose exec --workdir=/var/www/html/wp-content/plugins/wpe-headless --user=www-data wordpress wp db export tests/_data/dump.sql` + 1. Run `docker-compose exec --workdir=/var/www/html/wp-content/plugins/faustwp --user=www-data wordpress wp plugin install wp-graphql --activate` + 1. Run `docker-compose exec --workdir=/var/www/html/wp-content/plugins/faustwp --user=www-data wordpress wp db export tests/_data/dump.sql` 1. Copy `.env.testing.example` to `.env.testing`. 1. Run `vendor/bin/codecept run acceptance` to start the end-2-end tests. @@ -139,12 +139,12 @@ WP_HEADLESS_SECRET=00000000-0000-0000-0000-000000000001 Developers with full GitHub repository access can create public releases: -### Release the wpe-headless plugin +### Release the FaustWP plugin -1. Update the `Version` in the file header at `plugins/wpe-headless/wpe-headless.php`. -2. Update the changelog and 'stable tag' in `plugins/wpe-headless/readme.txt`. +1. Update the `Version` in the file header at `plugins/faustwp/faustwp.php`. +2. Update the changelog and 'stable tag' in `plugins/faustwp/readme.txt`. 3. Commit and push your changes for review **(DO NOT MERGE YET)**. -4. Tag the approved commit with `plugin/wpe-headless/[version]`, for example: `git tag plugin/wpe-headless/0.3.5` and push the tag (`git push --tags`). Or use GitHub to [create a new release](https://github.com/wpengine/faustjs/releases/new) with that tag. This must be done prior to merging changes into the `canary` branch. +4. Tag the approved commit with `plugin/faustwp/[version]`, for example: `git tag plugin/faustwp/0.3.5` and push the tag (`git push --tags`). Or use GitHub to [create a new release](https://github.com/wpengine/faustjs/releases/new) with that tag. This must be done prior to merging changes into the `canary` branch. 5. Merge your changes into the `canary` branch CircleCI will build and deploy the plugin zip. The latest version will be available here: diff --git a/plugins/wpe-headless/.docker/Dockerfile b/plugins/faustwp/.docker/Dockerfile similarity index 100% rename from plugins/wpe-headless/.docker/Dockerfile rename to plugins/faustwp/.docker/Dockerfile diff --git a/plugins/faustwp/.docker/mysql/dump.sql.gz b/plugins/faustwp/.docker/mysql/dump.sql.gz new file mode 100644 index 000000000..c87cd78f3 Binary files /dev/null and b/plugins/faustwp/.docker/mysql/dump.sql.gz differ diff --git a/plugins/wpe-headless/.docker/scripts/init-testing-environment.sh b/plugins/faustwp/.docker/scripts/init-testing-environment.sh similarity index 100% rename from plugins/wpe-headless/.docker/scripts/init-testing-environment.sh rename to plugins/faustwp/.docker/scripts/init-testing-environment.sh diff --git a/plugins/wpe-headless/.docker/wp-cli/wp-cli.sh b/plugins/faustwp/.docker/wp-cli/wp-cli.sh similarity index 100% rename from plugins/wpe-headless/.docker/wp-cli/wp-cli.sh rename to plugins/faustwp/.docker/wp-cli/wp-cli.sh diff --git a/plugins/wpe-headless/.editorconfig b/plugins/faustwp/.editorconfig similarity index 100% rename from plugins/wpe-headless/.editorconfig rename to plugins/faustwp/.editorconfig diff --git a/plugins/wpe-headless/.env.testing.example b/plugins/faustwp/.env.testing.example similarity index 100% rename from plugins/wpe-headless/.env.testing.example rename to plugins/faustwp/.env.testing.example diff --git a/plugins/faustwp/.gitignore b/plugins/faustwp/.gitignore new file mode 100644 index 000000000..f2166ae65 --- /dev/null +++ b/plugins/faustwp/.gitignore @@ -0,0 +1,6 @@ +.DS_Store +Thumbs.db +/vendor/ + +.env.testing +!.env.testing.example diff --git a/plugins/wpe-headless/.phpcs.xml.dist b/plugins/faustwp/.phpcs.xml.dist similarity index 100% rename from plugins/wpe-headless/.phpcs.xml.dist rename to plugins/faustwp/.phpcs.xml.dist diff --git a/plugins/wpe-headless/.zipignore b/plugins/faustwp/.zipignore similarity index 100% rename from plugins/wpe-headless/.zipignore rename to plugins/faustwp/.zipignore diff --git a/plugins/wpe-headless/LICENSE b/plugins/faustwp/LICENSE similarity index 100% rename from plugins/wpe-headless/LICENSE rename to plugins/faustwp/LICENSE diff --git a/plugins/wpe-headless/bin/install-wp-tests.sh b/plugins/faustwp/bin/install-wp-tests.sh similarity index 100% rename from plugins/wpe-headless/bin/install-wp-tests.sh rename to plugins/faustwp/bin/install-wp-tests.sh diff --git a/plugins/wpe-headless/codeception.dist.yml b/plugins/faustwp/codeception.dist.yml similarity index 100% rename from plugins/wpe-headless/codeception.dist.yml rename to plugins/faustwp/codeception.dist.yml diff --git a/plugins/wpe-headless/composer.json b/plugins/faustwp/composer.json similarity index 100% rename from plugins/wpe-headless/composer.json rename to plugins/faustwp/composer.json diff --git a/plugins/wpe-headless/composer.lock b/plugins/faustwp/composer.lock similarity index 100% rename from plugins/wpe-headless/composer.lock rename to plugins/faustwp/composer.lock diff --git a/plugins/wpe-headless/docker-compose.yml b/plugins/faustwp/docker-compose.yml similarity index 88% rename from plugins/wpe-headless/docker-compose.yml rename to plugins/faustwp/docker-compose.yml index f6f5e11a4..7d9c427e4 100644 --- a/plugins/wpe-headless/docker-compose.yml +++ b/plugins/faustwp/docker-compose.yml @@ -15,10 +15,10 @@ services: WORDPRESS_DB_USER: root WORDPRESS_DB_PASSWORD: wordpress WP_TESTS_DB_NAME: wordpress_unit_test - WP_PLUGIN_FOLDER: wpe-headless + WP_PLUGIN_FOLDER: faustwp volumes: - wordpress:/var/www/html - - ./:/var/www/html/wp-content/plugins/wpe-headless + - ./:/var/www/html/wp-content/plugins/faustwp db: image: mysql:5.7 diff --git a/plugins/wpe-headless/wpe-headless.php b/plugins/faustwp/faustwp.php similarity index 100% rename from plugins/wpe-headless/wpe-headless.php rename to plugins/faustwp/faustwp.php diff --git a/plugins/wpe-headless/includes/admin-menus/callbacks.php b/plugins/faustwp/includes/admin-menus/callbacks.php similarity index 100% rename from plugins/wpe-headless/includes/admin-menus/callbacks.php rename to plugins/faustwp/includes/admin-menus/callbacks.php diff --git a/plugins/wpe-headless/includes/auth/callbacks.php b/plugins/faustwp/includes/auth/callbacks.php similarity index 100% rename from plugins/wpe-headless/includes/auth/callbacks.php rename to plugins/faustwp/includes/auth/callbacks.php diff --git a/plugins/wpe-headless/includes/auth/functions.php b/plugins/faustwp/includes/auth/functions.php similarity index 100% rename from plugins/wpe-headless/includes/auth/functions.php rename to plugins/faustwp/includes/auth/functions.php diff --git a/plugins/wpe-headless/includes/deny-public-access/callbacks.php b/plugins/faustwp/includes/deny-public-access/callbacks.php similarity index 100% rename from plugins/wpe-headless/includes/deny-public-access/callbacks.php rename to plugins/faustwp/includes/deny-public-access/callbacks.php diff --git a/plugins/wpe-headless/includes/events/callbacks.php b/plugins/faustwp/includes/events/callbacks.php similarity index 100% rename from plugins/wpe-headless/includes/events/callbacks.php rename to plugins/faustwp/includes/events/callbacks.php diff --git a/plugins/wpe-headless/includes/graphql/callbacks.php b/plugins/faustwp/includes/graphql/callbacks.php similarity index 100% rename from plugins/wpe-headless/includes/graphql/callbacks.php rename to plugins/faustwp/includes/graphql/callbacks.php diff --git a/plugins/wpe-headless/includes/graphql/functions.php b/plugins/faustwp/includes/graphql/functions.php similarity index 100% rename from plugins/wpe-headless/includes/graphql/functions.php rename to plugins/faustwp/includes/graphql/functions.php diff --git a/plugins/wpe-headless/includes/menus/callbacks.php b/plugins/faustwp/includes/menus/callbacks.php similarity index 100% rename from plugins/wpe-headless/includes/menus/callbacks.php rename to plugins/faustwp/includes/menus/callbacks.php diff --git a/plugins/wpe-headless/includes/replacement/callbacks.php b/plugins/faustwp/includes/replacement/callbacks.php similarity index 100% rename from plugins/wpe-headless/includes/replacement/callbacks.php rename to plugins/faustwp/includes/replacement/callbacks.php diff --git a/plugins/wpe-headless/includes/replacement/functions.php b/plugins/faustwp/includes/replacement/functions.php similarity index 100% rename from plugins/wpe-headless/includes/replacement/functions.php rename to plugins/faustwp/includes/replacement/functions.php diff --git a/plugins/wpe-headless/includes/replacement/graphql-callbacks.php b/plugins/faustwp/includes/replacement/graphql-callbacks.php similarity index 100% rename from plugins/wpe-headless/includes/replacement/graphql-callbacks.php rename to plugins/faustwp/includes/replacement/graphql-callbacks.php diff --git a/plugins/wpe-headless/includes/replacement/previewlinks.js b/plugins/faustwp/includes/replacement/previewlinks.js similarity index 100% rename from plugins/wpe-headless/includes/replacement/previewlinks.js rename to plugins/faustwp/includes/replacement/previewlinks.js diff --git a/plugins/wpe-headless/includes/rest/callbacks.php b/plugins/faustwp/includes/rest/callbacks.php similarity index 100% rename from plugins/wpe-headless/includes/rest/callbacks.php rename to plugins/faustwp/includes/rest/callbacks.php diff --git a/plugins/wpe-headless/includes/settings/assets/icons/doc.svg b/plugins/faustwp/includes/settings/assets/icons/doc.svg similarity index 100% rename from plugins/wpe-headless/includes/settings/assets/icons/doc.svg rename to plugins/faustwp/includes/settings/assets/icons/doc.svg diff --git a/plugins/wpe-headless/includes/settings/assets/js/wpgraphql-install.js b/plugins/faustwp/includes/settings/assets/js/wpgraphql-install.js similarity index 100% rename from plugins/wpe-headless/includes/settings/assets/js/wpgraphql-install.js rename to plugins/faustwp/includes/settings/assets/js/wpgraphql-install.js diff --git a/plugins/wpe-headless/includes/settings/assets/style.css b/plugins/faustwp/includes/settings/assets/style.css similarity index 100% rename from plugins/wpe-headless/includes/settings/assets/style.css rename to plugins/faustwp/includes/settings/assets/style.css diff --git a/plugins/wpe-headless/includes/settings/callbacks.php b/plugins/faustwp/includes/settings/callbacks.php similarity index 100% rename from plugins/wpe-headless/includes/settings/callbacks.php rename to plugins/faustwp/includes/settings/callbacks.php diff --git a/plugins/wpe-headless/includes/settings/functions.php b/plugins/faustwp/includes/settings/functions.php similarity index 100% rename from plugins/wpe-headless/includes/settings/functions.php rename to plugins/faustwp/includes/settings/functions.php diff --git a/plugins/wpe-headless/includes/settings/views/headless-settings.php b/plugins/faustwp/includes/settings/views/headless-settings.php similarity index 100% rename from plugins/wpe-headless/includes/settings/views/headless-settings.php rename to plugins/faustwp/includes/settings/views/headless-settings.php diff --git a/plugins/wpe-headless/includes/updates/callbacks.php b/plugins/faustwp/includes/updates/callbacks.php similarity index 96% rename from plugins/wpe-headless/includes/updates/callbacks.php rename to plugins/faustwp/includes/updates/callbacks.php index 76b6e8ae3..45c152fc1 100644 --- a/plugins/wpe-headless/includes/updates/callbacks.php +++ b/plugins/faustwp/includes/updates/callbacks.php @@ -113,7 +113,7 @@ function display_plugin_row_notice( $plugin_file, $plugin_data ) { $error = get_plugin_api_error(); ?> - +

diff --git a/plugins/wpe-headless/includes/updates/functions.php b/plugins/faustwp/includes/updates/functions.php similarity index 100% rename from plugins/wpe-headless/includes/updates/functions.php rename to plugins/faustwp/includes/updates/functions.php diff --git a/plugins/wpe-headless/includes/utilities/callbacks.php b/plugins/faustwp/includes/utilities/callbacks.php similarity index 100% rename from plugins/wpe-headless/includes/utilities/callbacks.php rename to plugins/faustwp/includes/utilities/callbacks.php diff --git a/plugins/wpe-headless/includes/utilities/functions.php b/plugins/faustwp/includes/utilities/functions.php similarity index 100% rename from plugins/wpe-headless/includes/utilities/functions.php rename to plugins/faustwp/includes/utilities/functions.php diff --git a/plugins/wpe-headless/phpunit.xml.dist b/plugins/faustwp/phpunit.xml.dist similarity index 100% rename from plugins/wpe-headless/phpunit.xml.dist rename to plugins/faustwp/phpunit.xml.dist diff --git a/plugins/wpe-headless/readme.txt b/plugins/faustwp/readme.txt similarity index 100% rename from plugins/wpe-headless/readme.txt rename to plugins/faustwp/readme.txt diff --git a/plugins/wpe-headless/tests/_data/.gitignore b/plugins/faustwp/tests/_data/.gitignore similarity index 100% rename from plugins/wpe-headless/tests/_data/.gitignore rename to plugins/faustwp/tests/_data/.gitignore diff --git a/plugins/wpe-headless/tests/_output/.gitignore b/plugins/faustwp/tests/_output/.gitignore similarity index 100% rename from plugins/wpe-headless/tests/_output/.gitignore rename to plugins/faustwp/tests/_output/.gitignore diff --git a/plugins/wpe-headless/tests/_support/AcceptanceTester.php b/plugins/faustwp/tests/_support/AcceptanceTester.php similarity index 97% rename from plugins/wpe-headless/tests/_support/AcceptanceTester.php rename to plugins/faustwp/tests/_support/AcceptanceTester.php index ab47ab815..e596348ef 100644 --- a/plugins/wpe-headless/tests/_support/AcceptanceTester.php +++ b/plugins/faustwp/tests/_support/AcceptanceTester.php @@ -39,7 +39,7 @@ public function amOnHeadlessSite($path = '') } /** - * Visit the WPE Headless settings page. + * Visit the FaustWP settings page. */ public function amOnFaustWPSettingsPage() { diff --git a/plugins/wpe-headless/tests/_support/Helper/Acceptance.php b/plugins/faustwp/tests/_support/Helper/Acceptance.php similarity index 100% rename from plugins/wpe-headless/tests/_support/Helper/Acceptance.php rename to plugins/faustwp/tests/_support/Helper/Acceptance.php diff --git a/plugins/wpe-headless/tests/_support/_generated/.gitignore b/plugins/faustwp/tests/_support/_generated/.gitignore similarity index 100% rename from plugins/wpe-headless/tests/_support/_generated/.gitignore rename to plugins/faustwp/tests/_support/_generated/.gitignore diff --git a/plugins/wpe-headless/tests/acceptance.suite.yml b/plugins/faustwp/tests/acceptance.suite.yml similarity index 100% rename from plugins/wpe-headless/tests/acceptance.suite.yml rename to plugins/faustwp/tests/acceptance.suite.yml diff --git a/plugins/wpe-headless/tests/acceptance/PostPreviewCest.php b/plugins/faustwp/tests/acceptance/PostPreviewCest.php similarity index 100% rename from plugins/wpe-headless/tests/acceptance/PostPreviewCest.php rename to plugins/faustwp/tests/acceptance/PostPreviewCest.php diff --git a/plugins/wpe-headless/tests/acceptance/SettingsCest.php b/plugins/faustwp/tests/acceptance/SettingsCest.php similarity index 100% rename from plugins/wpe-headless/tests/acceptance/SettingsCest.php rename to plugins/faustwp/tests/acceptance/SettingsCest.php diff --git a/plugins/wpe-headless/tests/bootstrap.php b/plugins/faustwp/tests/bootstrap.php similarity index 92% rename from plugins/wpe-headless/tests/bootstrap.php rename to plugins/faustwp/tests/bootstrap.php index 566c08bcf..51aa4d668 100644 --- a/plugins/wpe-headless/tests/bootstrap.php +++ b/plugins/faustwp/tests/bootstrap.php @@ -27,7 +27,7 @@ * @return void */ function _manually_load_plugin() { - require dirname( dirname( __FILE__ ) ) . '/wpe-headless.php'; + require dirname( dirname( __FILE__ ) ) . '/faustwp.php'; } require $_tests_dir . '/includes/bootstrap.php'; diff --git a/plugins/wpe-headless/tests/integration/replacement/test-replacement-callbacks.php b/plugins/faustwp/tests/integration/replacement/test-replacement-callbacks.php similarity index 100% rename from plugins/wpe-headless/tests/integration/replacement/test-replacement-callbacks.php rename to plugins/faustwp/tests/integration/replacement/test-replacement-callbacks.php diff --git a/plugins/wpe-headless/tests/integration/replacement/test-replacement-functions.php b/plugins/faustwp/tests/integration/replacement/test-replacement-functions.php similarity index 100% rename from plugins/wpe-headless/tests/integration/replacement/test-replacement-functions.php rename to plugins/faustwp/tests/integration/replacement/test-replacement-functions.php diff --git a/plugins/wpe-headless/tests/integration/settings/test-functions.php b/plugins/faustwp/tests/integration/settings/test-functions.php similarity index 100% rename from plugins/wpe-headless/tests/integration/settings/test-functions.php rename to plugins/faustwp/tests/integration/settings/test-functions.php diff --git a/plugins/wpe-headless/tests/integration/test-sample.php b/plugins/faustwp/tests/integration/test-sample.php similarity index 100% rename from plugins/wpe-headless/tests/integration/test-sample.php rename to plugins/faustwp/tests/integration/test-sample.php diff --git a/plugins/wpe-headless/.docker/mysql/dump.sql.gz b/plugins/wpe-headless/.docker/mysql/dump.sql.gz deleted file mode 100644 index 61f9c7dc6..000000000 Binary files a/plugins/wpe-headless/.docker/mysql/dump.sql.gz and /dev/null differ diff --git a/plugins/wpe-headless/.gitignore b/plugins/wpe-headless/.gitignore deleted file mode 100644 index 3274d90d2..000000000 --- a/plugins/wpe-headless/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -.DS_Store -Thumbs.db -/vendor/ - -.env.testing \ No newline at end of file