Skip to content

Commit

Permalink
PHP Compat Revamp (#307)
Browse files Browse the repository at this point in the history
* Ignore vscode logs

* Composer allow plugins

* Composer update lockfile

* Drop Node to 14

* package-lock.json

* Test exclude plugin

* Function to get list of plugins with slugs

* Deprecation notices

* Apply filters on plugins

* Compact output for plugins

* Function to get list of themes

* Remove deprecated function related to directories

* Rename functions

* Remove deprecated function

* Minor formatting and text updates

* Remove loadtextdomain

* Conditional check for empty plugins list

* Fix legacy tests

* Docblocks

* sanitize

* AJAX queue with debug output

* Enqueue new JS file

* Comments

* Minor formatting and text updates

* Move phpcompat_excluded_plugins filter into main function

Co-authored-by: Darin Kotter <[email protected]>

* Add phpcompat_excluded_themes filter

Co-authored-by: Darin Kotter <[email protected]>

* Advanced console output

* Fix formatting

* Remove exclude_plugin method and tests

* Rename activeOnly variable

* Refactor JS sources and build scripts

* Watch make command

* Render

* Remove PHP Versions select

* Remove old assets

* Handle unknown errors

* Truncate queue on init

* Cleanup and comments

* Avoid long if/else

* Remove todo 'indicate in progress'

* Todo change staging endpoint

* JS Code formatting, remove debug console output

* Add translations to JS, change the makepot command

* Remove gulp config

* Change admin page slug and remove version constant

* Change textdomain

* Remove gulp deps

* Update limitations text, fix textdomain

* Add escaping to translations

* Abort process on change of active/all target

* Display PHPCS-like details, add 'view results as raw text' checkbox

* Download button

* Download section styles, clear results

* Handle plugins outside of WP repository

* Change 'test this site' link to LocalWP

* Remove unused code

* Use is_wpe()

* Clean legacy data during activate and uninstall

* Cleanup during plugin upgrade

* Code styles

* Aside styles

* Update codeable form with scan report

* Lint

* Remove code comments

* migration improvements

* Minor formatting and text updates

* Disable scan button during the scan

* lint

* Ignore wp-env local config

* Unified error reporting

* Extended error reporting

* Close report clicking on the version or link

* Update title and clean up

* Add all PHP versions to the raw report

* Add errors to raw report

* Remove string that was left behind

* Change how we sanitize slugs to ensure they have no spaces

* Fix mixing full report with single version report

* lint

* shortcut runButton

* If we get a success response back from the Tide API but that response does not contain the report data, handle that error state and return early

* Update src/js/include/render.js

Co-authored-by: Max Lyuchin <[email protected]>

* Version bump and plugin header

* Fix

* Reset to normal state when results are cleared

* Add Start Scan link

* fix

* add back missing readme.txt file

pulled directly from https://github.com/wpengine/phpcompat/blob/bad35e118fd9b4c8915f438ecb695da6ba954a1d/readme.txt

* formatting updates to readme.txt

* cleanup plugin header fields

* updated readme.txt content for 1.6.0 version

* Text update

* update LocalWP and PHP 7 text references

* Avoid a fatal error if the plugin isn't built properly

* Ensure we only load our assets on the scan page

* If connection is lost during the middle of the scan, show proper error message

* If on multisite, make sure we include network active plugins in our list of active plugins

* Add RTL styling

* Add a progress indicator at the top of the scan page to make it easier to see progress

Co-authored-by: Max Lyuchin <[email protected]>
Co-authored-by: Max Lyuchin <[email protected]>
Co-authored-by: Jeffrey Paul <[email protected]>
Co-authored-by: Jeffrey Paul <[email protected]>
  • Loading branch information
5 people authored Sep 7, 2022
1 parent 75279b9 commit 994e15a
Show file tree
Hide file tree
Showing 24 changed files with 7,341 additions and 2,983 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ assets/js/*.js
assets/js/*.map
coverage.clover
/plugin/scripts/*-min.js
/plugin/build/
wpe-php-compat.zip
.phpunit.result.cache

Expand All @@ -222,3 +223,7 @@ Docker/debug
# Build files
/build/
clover.xml

.vscode/*.log

.wp-env.override.json
1 change: 1 addition & 0 deletions .jshintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
gulpfile.js
**/*-min.js
plugin/build/
wordpress/
node_modules/
vendor/
2 changes: 1 addition & 1 deletion Docker/Dockerfile-node
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:lts
FROM node:14
ARG UID=1000
ARG GID=1000

Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ END_HIGHLIGHT :=\033[0m # No Color
build: build-docker build-assets

.PHONY: build-assets
build-assets: | build-docker-node install-npm
build-assets: | build-docker-node install-npm install-composer
@echo "Building plugin assets"
rm -f plugin/languages/*.pot plugin/scripts/*-min.js
$(DOCKER_RUN) $(NODE_IMAGE) ./node_modules/gulp-cli/bin/gulp.js
$(DOCKER_RUN) $(NODE_IMAGE) npm run build
$(DOCKER_RUN) $(COMPOSER_BASE_CONTAINER) run-script makepot

.PHONY: build-docker
build-docker: build-docker-node build-docker-php
Expand Down Expand Up @@ -160,6 +161,10 @@ update-composer: lando-stop
update-npm: | build-docker-node
$(DOCKER_RUN) $(NODE_IMAGE) npm update

.PHONY: watch
watch: | build-docker-node install-npm
$(DOCKER_RUN) $(NODE_IMAGE) npm run start

wpe-php-compat.zip:
@echo "Building release file: wpe-php-compat.zip"
rm -f wpe-php-compat.zip
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ __URL:__ _http://localhost:8888/wp-admin_

__Admin User:__ _admin_

__Admin Password:__ _password

After you have logged in, go to http://localhost:8888/wp-admin/admin.php?page=fakerpress and generate some dummy content for the block to render.
__Admin Password:__ _password_

If anything goes wrong and you suspect your local is frozen, you can always `make choose-violence` to rebuild the local environment and containers. Hopefully you never have to choose violence. :)

Expand Down
10 changes: 10 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,17 @@
"phpunit/phpunit": "^9.5.4",
"brain/monkey": "^2.6.0",
"dealerdirect/phpcodesniffer-composer-installer": "^v0.7.1",
"wp-cli/wp-cli-bundle": "*",
"wpengine/wpengine-coding-standards": "^1.0.0",
"johnpbloch/wordpress": "*"
},
"config": {
"allow-plugins": {
"johnpbloch/wordpress-core-installer": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"scripts": {
"makepot": "./vendor/bin/wp i18n make-pot plugin --slug=wpe-php-compat"
}
}
Loading

0 comments on commit 994e15a

Please sign in to comment.