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

Testing for PHP 7 on Drupal 8 #12

Open
agentrickard opened this issue Apr 16, 2018 · 2 comments
Open

Testing for PHP 7 on Drupal 8 #12

agentrickard opened this issue Apr 16, 2018 · 2 comments

Comments

@agentrickard
Copy link

The current example tests for PHP 5 versions. However, Drupal 8.6 now requires PHPUnit 6, which is not compatible with PHP 5.x.

See https://www.drupal.org/node/2957906

Running tests on Travis returns the error:

ERROR: PHPUnit testing framework version 6 or greater is required when running on PHP 7.0 or greater. Run the command 'composer run-script drupal-phpunit-upgrade' in order to fix this.

Can you update this example to show how we can run different versions of PHPUnit based on the PHP ENV variable in the matrix?

For example:

    - env: DRUPAL=8.6.x
      php: 7.1
    - env: DRUPAL=8.6.x
      php: 7.0
    - env: DRUPAL=8.6.x
      php: 5.6
    - env: DRUPAL=8.6.x
      php: 5.5
@agentrickard
Copy link
Author

This seems to fix the issue:


  # Other setup tasks
  # Drupal installation

  # Update PHPUnit.
  - composer run-script drupal-phpunit-upgrade

@sonnym
Copy link
Owner

sonnym commented May 29, 2018

That makes sense! If you would like to create a pull request to include that in the example here, I would greatly appreciate that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants