Skip to content

Commit d027070

Browse files
author
Harry Bragg
authored
Support PHP5.5 (#3)
* php5.5 * force UTF8 on tests that use UTF8 * allow nightly builds to fail
1 parent a7a6d48 commit d027070

4 files changed

Lines changed: 17 additions & 4 deletions

File tree

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ cache:
88
- $HOME/.composer/cache/files
99

1010
php:
11+
- 5.5
1112
- 5.6
1213
- 7.0
1314
- 7.1
@@ -18,6 +19,10 @@ env:
1819
- PREFER_LOWEST=--prefer-lowest
1920
- PREFER_LOWEST=
2021

22+
matrix:
23+
allow_failures:
24+
- php: nightly
25+
2126
before_script:
2227
- travis_retry composer update --no-interaction --prefer-dist $PREFER_LOWEST
2328

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ DOCKER_RUN := docker-compose run --rm test
88
PREFER_LOWEST ?=
99

1010
.PHONY: install composer clean help run
11-
.PHONY: test lint lint-fix test-unit test-integration test-matrix test-coverage test-coverage-html test-coverage-clover
11+
.PHONY: lint lint-fix
12+
.PHONY: test test-unit test-example test-lowest test-matrix test-coverage test-coverage-html test-coverage-clover
1213

1314
.SILENT: help
1415

@@ -39,16 +40,22 @@ lint-fix: ## Run phpcsf and fix possible lint errors.
3940
${DOCKER_RUN} vendor/bin/phpcbf -p src/ tests/
4041

4142
test-unit: ## Run the unit testsuite.
42-
${DOCKER_RUN} vendor/bin/phpunit --colors=always --testsuite unit
43+
${DOCKER_RUN} vendor/bin/phpunit --testsuite unit
4344

4445
test-example: ## Run the example application
4546
${DOCKER_RUN} php tests/example/app.php
4647

48+
test-lowest: ## Test using the lowest possible versions of the dependencies
49+
test-lowest: PREFER_LOWEST=--prefer-lowest
50+
test-lowest: build-update test
51+
4752
test-matrix: ## Run the unit tests against multiple targets.
53+
${MAKE} DOCKER_RUN="${DOCKER_RUN_BASE} php:5.5-alpine" PREFER_LOWEST=--prefer-lowest build-update test
4854
${MAKE} DOCKER_RUN="${DOCKER_RUN_BASE} php:5.6-alpine" PREFER_LOWEST=--prefer-lowest build-update test
4955
${MAKE} DOCKER_RUN="${DOCKER_RUN_BASE} php:7.0-alpine" PREFER_LOWEST=--prefer-lowest build-update test
5056
${MAKE} DOCKER_RUN="${DOCKER_RUN_BASE} php:7.1-alpine" PREFER_LOWEST=--prefer-lowest build-update test
5157
${MAKE} DOCKER_RUN="${DOCKER_RUN_BASE} hhvm/hhvm:latest" PREFER_LOWEST=--prefer-lowest build-update test
58+
${MAKE} DOCKER_RUN="${DOCKER_RUN_BASE} php:5.5-alpine" build-update test
5259
${MAKE} DOCKER_RUN="${DOCKER_RUN_BASE} php:5.6-alpine" build-update test
5360
${MAKE} DOCKER_RUN="${DOCKER_RUN_BASE} php:7.0-alpine" build-update test
5461
${MAKE} DOCKER_RUN="${DOCKER_RUN_BASE} php:7.1-alpine" build-update test

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
}
2222
],
2323
"require": {
24-
"php": "^5.6 | ^7.0",
24+
"php": "^5.5 | ^7.0",
2525
"symfony/process": "^2.8 | ^3.2",
2626
"graze/data-structure": "^2.0"
2727
},
2828
"require-dev": {
29-
"phpunit/phpunit": "^5.0",
29+
"phpunit/phpunit": "^4.2 | ^5.2",
3030
"squizlabs/php_codesniffer": "^2.9",
3131
"graze/standards": "^1.0",
3232
"symfony/console": "^3.1",

tests/unit/TableTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class TableTest extends TestCase
2323

2424
public function setUp()
2525
{
26+
mb_internal_encoding("UTF-8");
2627
$this->output = new BufferDiffOutput();
2728
$this->pool = Mockery::mock(Pool::class)->makePartial();
2829
$this->table = new Table($this->output, $this->pool);

0 commit comments

Comments
 (0)