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

Bump minimum PHP requirement from 5.6 to 7.1 #7

Merged
merged 5 commits into from
Mar 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
language: php
php:
- '7.4'
- '7.3'
- '7.2'
- '7.1'
- '7.0'
- '5.6'
- nightly

install: make travis-install

script: make travis-test

jobs:
allow_failures:
- php: nightly
include:
- stage: "Follow Up"
name: "Test Coverage"
php: '7.1'
script: travis_retry make travis-coverage
- name: "Code Style"
php: '7.1'
script: make travis-phpcs
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ vendor: composer.lock
${MAKE} install

test: vendor
${DRUN} php:5.6 ${PHPUNIT}
${DRUN} php:7.0 ${PHPUNIT}
${DRUN} php:7.1 ${PHPUNIT}
${DRUN} php:7.2 ${PHPUNIT}
${DRUN} php:7.3 ${PHPUNIT}
${DRUN} php:7.4 ${PHPUNIT}
${DRUN} php:7 ${PHPUNIT}

test-fast: vendor
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ echo WP_DEBUG_DISPLAY;

Just run `make` to do everything

We use PHPUnit 5 because it has compatibility for PHP 5.6
We use PHPUnit 7 because it has compatibility for PHP 7.1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We use PHPUnit 7 because it has compatibility for PHP 7.1
We use PHPUnit

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we explain/warn developers about why we not using the latest versions of PHPUnit?


[PHPUnit Docs](https://phpunit.de/manual/5.7/en/index.html)
[PHPUnit Docs](https://phpunit.readthedocs.io/en/7.5/)

There are 3 test commands

- `make test` run the full test suite from php 5.6 to 7.x
- `make test` run the full test suite from php to 7.1 to 7.4
- `make test-fast` run php 7 tests
- `make test-coverage` generate an html test coverage report in `./coverage`
13 changes: 4 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,12 @@
}
},
"require": {
"php": ">=5.6"
"php": ">=7.1"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.3",
"squizlabs/php_codesniffer": "^3.5",
"roave/security-advisories": "dev-master",
"phpunit/phpunit": "^5.7",
"php-coveralls/php-coveralls": "^2.1"
},
"config": {
"platform": {
"php": "5.6"
}
"phpunit/phpunit": "^7.5",
"php-coveralls/php-coveralls": "^2.2"
}
}
3 changes: 2 additions & 1 deletion tests/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

namespace Roots\WPConfig;

use PHPUnit\Framework\TestCase;
use Roots\WPConfig\Exceptions\ConstantAlreadyDefinedException;
use Roots\WPConfig\Exceptions\UndefinedConfigKeyException;

/**
* @runTestsInSeparateProcesses
*/
class ConfigTest extends \PHPUnit_Framework_TestCase
class ConfigTest extends TestCase
{

public function testDefineHappy() {
Expand Down