Skip to content

Commit

Permalink
Refactor the remaining modules (#59)
Browse files Browse the repository at this point in the history
* Refactor custom status to be static
* migrate the workflow class
* Refactor the remaining modules
* Fix missing imports
* Fix the settings not showing up
* Fix return type
* Fix the default options not being set, the settings menu ordering, double status creations and the lack of settings updated message
* Add a new way to reset options after each test, and utilize it in tests
* Update the min php and wp versions
* Move the core hacks to their own file, re-enable the notifications tests, and shift away another helper method that's shared
* Fix the cs problems
* Up the WP version
* Set the php version correctly
* Add the missing =
* More missing ==
* Up the workflow version of the plugin
* Up the package version info
* Re-order the taxonomy registration process
* Redo the way default options are handled
* Remove the taxonomy registration priority and add an optimized version of the editorial metadata lookup
* Change all tests to extend WP_UnitTestCase, use built-in factory methods, remove unnecessary per-test cleanup

---------

Co-authored-by: Alec Geatches <[email protected]>
  • Loading branch information
ingeniumed and alecgeatches authored Oct 9, 2024
1 parent b231828 commit 4d5852a
Show file tree
Hide file tree
Showing 37 changed files with 1,225 additions and 1,729 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/php-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
matrix:
include:
# Check lowest supported WP version, with the lowest supported PHP.
- php: '8.0'
wp: '6.2'
- php: '8.1'
wp: '6.4'
allowed_failure: false
# Check latest WP with the lowest supported PHP.
- php: '8.0'
- php: '8.1'
wp: 'master'
allowed_failure: false
# Check latest WP with the highest supported PHP.
Expand Down
327 changes: 0 additions & 327 deletions class-workflow.php

This file was deleted.

7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
},
"require": {
"composer/installers": "~1.0",
"php": ">=8.0"
"php": ">=8.1"
},
"require-dev": {
"phpcompatibility/phpcompatibility-wp": "2.1.4",
"phpunit/phpunit": "9.6.13",
"yoast/phpunit-polyfills": "2.0.0",
"yoast/phpunit-polyfills": "^3.0",
"automattic/vipwpcs": "^3.0",
"sirbrillig/phpcs-variable-analysis": "^2.11"
"sirbrillig/phpcs-variable-analysis": "^2.11",
"wp-phpunit/wp-phpunit": "^6.6"
},
"scripts": {
"cs": "@php ./vendor/bin/phpcs -p -s -v -n . --standard=\"phpcs.xml.dist\" --extensions=php --ignore=\"/vendor/*,/node_modules/*\"",
Expand Down
Loading

0 comments on commit 4d5852a

Please sign in to comment.