Skip to content
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

chore: add php 7.2 and 7.3 support for unit test with travis #3794

Closed
3 tasks done
mehul0810 opened this issue Oct 23, 2018 · 10 comments
Closed
3 tasks done

chore: add php 7.2 and 7.3 support for unit test with travis #3794

mehul0810 opened this issue Oct 23, 2018 · 10 comments
Labels
needs: triage An issue needs reprioritized or closed

Comments

@mehul0810
Copy link
Contributor

mehul0810 commented Oct 23, 2018

Feature Request

User Story

As a user, I want to see Give works properly with PHP 7.2 and 7.3 so that there are no errors.

Note: We can work on this issue in mid-December this year as PHP 7.3 is scheduled to release in December 2018, so that we can add support for both PHP versions at the same time without wasting any additional time.

Visuals

PHP Versions supported with Travis currently
image

Acceptance Criteria

  • Drop PHP 5.3 test.
  • Add PHP 7.2 support to Travis with and without multisite
  • Add PHP 7.3 support to Travis with and without multisite
@DevinWalker
Copy link
Member

DevinWalker commented Jan 28, 2019

I added 7.2 and 7.3 testing but now we're running into some PHPunit compatibility issues:

2019-01-28_13-54-59.png2019-01-28_13-59-03.png

PHPUnit compatibility page: https://phpunit.de/supported-versions.html

@DevinWalker
Copy link
Member

I did some research and it looks like this is a WP Core PHPUnit testing issue that is set to be resolve in release 5.1: https://core.trac.wordpress.org/ticket/43218

I'm going to remove the code to test PHP 7.2 and 7.3 in place for now unit WP Core 5.1 version is released: https://core.trac.wordpress.org/query?status=reopened&status=assigned&status=reviewing&status=new&status=accepted&group=status&milestone=5.1

DevinWalker added a commit that referenced this issue Jan 29, 2019
* release/2.4.1: (35 commits)
  refactor: remove old donation form exporter code
  chore: removed unnecessary code causing PHP warning and function cleanup
  fix: resolved make user actual logged out when click log out link
  chore: add method description
  fix: allow json uploads for settings import screen only on WP 5.0+ #3907
  fix: resolved php notice when donor address update
  chore: comment out PHPUnit testing code #3794
  chore: update plugin version to 2.4.1
  chore: add PHP 7.2 + 7.3 to travis tests
  fix: resolved log count is not correct when search for API log related to specific WP User
  fix: improve logic for cc field server side validations
  fix: company_name and name tag description changed as per requested
  fix: prevent error when exporting CSV between two dates
  fix: email tag description changed as per suggestion
  fix: allowed admin to update blank value for address input
  fix: improve conditional logic to work for stripe checkout as well
  fix: snippet added for make compatible X theme and Cornerstone plugin
  fix: add support for empty validation check to cc fields
  fix: php ruleset added for check give text domain
  chore: run npm update and test tasks to ensure compatibility
  ...
DevinWalker added a commit that referenced this issue Jan 29, 2019
* release/2.4.1: (39 commits)
  refactor: remove old donation form exporter code
  chore: removed unnecessary code causing PHP warning and function cleanup
  fix: resolved make user actual logged out when click log out link
  chore: add method description
  fix: allow json uploads for settings import screen only on WP 5.0+ #3907
  fix: resolved php notice when donor address update
  chore: comment out PHPUnit testing code #3794
  chore: update plugin version to 2.4.1
  chore: add PHP 7.2 + 7.3 to travis tests
  fix: resolved log count is not correct when search for API log related to specific WP User
  fix: improve logic for cc field server side validations
  fix: company_name and name tag description changed as per requested
  fix: prevent error when exporting CSV between two dates
  fix: email tag description changed as per suggestion
  fix: allowed admin to update blank value for address input
  fix: improve conditional logic to work for stripe checkout as well
  fix: snippet added for make compatible X theme and Cornerstone plugin
  fix: add support for empty validation check to cc fields
  fix: php ruleset added for check give text domain
  chore: run npm update and test tasks to ensure compatibility
  ...
DevinWalker added a commit that referenced this issue Feb 1, 2019
* release/2.4.1: (25 commits)
  fix: covert microtime to string
  chore: fix typo
  fix: param typo
  Revert "fix: ensure donor mailing addresses match when exporting to csv"
  fix: resolved donor export not correct when export donor.
  refactor: remove old donation form exporter code
  chore: removed unnecessary code causing PHP warning and function cleanup
  fix: resolved make user actual logged out when click log out link
  chore: add method description
  fix: allow json uploads for settings import screen only on WP 5.0+ #3907
  fix: resolved php notice when donor address update
  chore: comment out PHPUnit testing code #3794
  chore: update plugin version to 2.4.1
  chore: add PHP 7.2 + 7.3 to travis tests
  fix: resolved log count is not correct when search for API log related to specific WP User
  fix: improve logic for cc field server side validations
  fix: company_name and name tag description changed as per requested
  fix: prevent error when exporting CSV between two dates
  fix: email tag description changed as per suggestion
  fix: allowed admin to update blank value for address input
  ...
@koconder
Copy link

koconder commented Feb 1, 2019

@DevinWalker have a look at my repo: https://github.com/koconder/wordpress-test-template and a plugin you can see the Travis CI setup on: https://github.com/koconder/wordpress-test-template

Shout if you need me to jump in and build out a PR for your issue or help test your Travis CI configuration.

@koconder
Copy link

koconder commented Feb 1, 2019

It's https://github.com/impress-org/give/blob/release/2.4.1/tests/bin/install.sh that is majorly outdated, I have in the test plugin a reference to the main repo where I maintain the Travis CI setup and .sh install scripts.

@DevinWalker
Copy link
Member

Now that WP supports PHPUnit 7.x we now have a new release of PHPUnit 8.x which WP does not support. This results in the following issue now with my recent changes:

2019-04-03_01-17-37

@DevinWalker DevinWalker removed this from the Sprint: 2019/03/27 - 2019/04/09 milestone Apr 16, 2019
@DevinWalker DevinWalker removed their assignment Apr 16, 2019
@koconder
Copy link

@DevinWalker as per my last messages. You can see an example here from my boilerplate repo https://github.com/koconder/wordpress-test-template

Test results: https://travis-ci.org/koconder/wordpress-test-template/builds/547591604
Working across all key PHP versions with PHP 7.x, with PHPUnit tests across WP 5.0, 5.1, and 5.2 on low and high PHP versions. Btw WP latest can fail as the development branch is not always passing tests.

Screenshot 2019-06-19 18 07 49

@DevinWalker @mehul0810 @kevinwhoffman - I'm happy to jump in and resolve

@DevinWalker
Copy link
Member

@koconder that looks passing for sure. I wasn't able to achieve that but it's been a few months since I tried. If you would like to contribute towards getting this issue resolved we'd love to have a PR! Thanks for the follow up.

@koconder
Copy link

@DevinWalker i'll give it a go for you guys!

@mikejhale
Copy link
Contributor

@koconder If you're still interested in giving another look at this one it would be appreciated.

@kevinwhoffman kevinwhoffman added the needs: triage An issue needs reprioritized or closed label Jul 20, 2020
@JasonTheAdams
Copy link
Contributor

We no longer use Travis and are testing for these versions upon release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: triage An issue needs reprioritized or closed
Projects
None yet
Development

No branches or pull requests

6 participants