-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add database tables #259
Add database tables #259
Conversation
use filter to get source class, if not default class then apply a filter to verify migrationThis comment was generated by todo based on a
|
The planned date for updating WP to PHP 5.6 minimum is April - https://make.wordpress.org/core/2018/12/08/updating-the-minimum-php-version/ . Rather than make the DB tables data store compatible with PHP 5.3, having a 5.6 dependency on enabling it would be better. |
5e207b3
to
888f373
Compare
e54817e
to
da0130d
Compare
@JPry Have you encountered the error in https://travis-ci.org/Prospress/action-scheduler/jobs/507947421 ? These tests run successfully locally so I'm wondering if this is a phpunit version issue? |
@rrennick I haven't seen that particular error before. However, I can see that an older version of PHPUnit is being run: version |
@JPry Thanks, that worked. The second issue is that the https://travis-ci.org/Prospress/action-scheduler/jobs/508379185#L139 Could that be related to the version of the WP tests lib? |
@rrennick It looks like that particular error is triggered on PHP 5.3 when using the short array syntax. I also see that the group on that file is |
Both groups are excluded. I verified that the phpunit command in my previous comment does exclude that test in my local environment. |
Perhaps it still has to parse the file in order to determine if it's part of the group, and it's the parsing that is triggering the error. I think any files that require a certain PHP version need to be included in a separate test suite with a version dependency. This is described here: https://phpunit.readthedocs.io/en/8.0/configuration.html#test-suites |
That sounds like the ticket. |
2f4be55
to
e75b63a
Compare
This one is ready for review. If we could get this into the 3.0.0 branch then we could look at merging master into the branch, addressing conflicts with other PRs, get some testing going & fix any follow up issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @rrennick I have left some initial comments, I will take a look again once the conflicts are solved because I saw some pieces of code in this PR that are already in master
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good @rrennick! I've left some feedback & requested changes.
I've just added a couple of Tests Scenarios to the main description on this PR. |
…uler into add/custom-tables
- rename WP CLI command to `migrate` - move CLI command to common register block - split ActionScheduler_Data into data controller and migration controller - move dependencies & migration complete to data controller - rename migration hook group - fix help on CLI run command - move free_memory to data controller - use free_memory() in stop_the_insanity - add free on and pause parameters on CLI commands - check for object cache object - other suggested fixes
@rcstr @thenbrent Thanks so much for the recommendations. I've updated the PR with
The failed unit test is the one fixed in #300. Some of the unit tests should probably be moved to a new file for the data controller but that can be done in a follow up PR. |
Thank you @rrennick - I will look into the changes early next week 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @rrennick - thanks for applying the requested changes, I have requested a few minor changes.
I still have a few files left to review, then I will proceed with QA, do you have a recommendation for what would be the best way to test? I was thinking of setting up a gimme site or one of them to test this
What I do is make a backup of my DB so I can restore to re-run the migration as many times as needed. Then
|
@thenbrent @rcstr This has had the merge conflicts fixed & unit tests updated to work with merged changes. |
Merging this one. Nick work @rrennick! Thanks for the reviews @rcstr! 🎉 I gave all files a final review today, comparing all files to their original in the Custom Tables plugin and reviewing carefully all newly introduced code. I have a number of outstanding items I'd like addressed, but there was only one bug, the rest are just refactoring or tweaks, which we can submit in separate PRs rather than blocking this one (which has merge conflicts with other open PRs and is generally an enormous diff to keep coming back to for small changes).
@rcstr given the large number of other PRs open for 3.0.0, instead of spending QA time on this, I recommend from here, we focus on QA of the first beta, as it will help test other important changes too, like the async runner, and potentially refactor of recurring schedules #333. |
Fixes #77
Implements woocommerce/action-scheduler-custom-tables#48 .
As of 97337a8 the PR works with PHP 7.3.
Outstanding items
PHP 5.3 compatibilityMigration & custom tables are disabled in PHP versions <5.6.Tests Scenarios