Skip to content

Commit ecbea3a

Browse files
committed
added PHP 7.3 to Travis matrix, added PHP 5.3 back as allowed failure, dropped HHVM as PHPUnit no longer works on it, added Makefile with multiple PHP version composer update and phpunit commands, added docker-compose with from PHP 5.4 up to 7.3 (5.4 from custom Dockerfile, 5.3 is not available due to lack of the mbstring extension), added hirak/prestissimo for faster dependency installation, fixed phpunit.xml issues reported with the latest version, resolved the issue with expectException() on PHP 7.3
1 parent 0386f10 commit ecbea3a

File tree

5 files changed

+37
-1
lines changed

5 files changed

+37
-1
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
language: php
22

33
php:
4+
- 5.3
45
- 5.4
56
- 5.5
67
- 5.6
78
- 7.0
89
- 7.1
910
- 7.2
11+
- 7.3
1012
- hhvm
1113
- nightly
1214

@@ -24,5 +26,7 @@ after_script:
2426

2527
matrix:
2628
allow_failures:
29+
- php: 5.3
30+
- php: hhvm
2731
- php: nightly
2832
- php: hhvm

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
PHP ?= 7.2
2+
3+
composer-update:
4+
docker-compose run --rm composer composer config platform.php ${PHP}
5+
docker-compose run --rm composer composer update
6+
docker-compose run --rm composer composer config --unset platform
7+
8+
test:
9+
docker-compose run --rm php-${PHP} php -v
10+
docker-compose run --rm php-${PHP} php /app/vendor/bin/phpunit -c /app/phpunit.xml.dist

docker-compose.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: '3'
2+
3+
services:
4+
5+
composer:
6+
image: 'composer:1.6'
7+
volumes: ['.:/app']
8+
9+
# FIXME: PHP 5.3 contains neither mbstring extension nor docker-php-ext-install script
10+
# Original Dockerfile can be found here https://github.com/docker-library/php/pull/20/files
11+
# Unfortunately it fails to build now because GPG signatures do not exist anymore
12+
# php-5.3: { build: 'docker/php-5.3', volumes: ['.:/app'] }
13+
php-5.4: { build: 'docker/php-5.4', volumes: ['.:/app'] }
14+
php-5.5: { image: 'php:5.5', volumes: ['.:/app'] }
15+
php-5.6: { image: 'php:5.6', volumes: ['.:/app'] }
16+
php-7.0: { image: 'php:7.0', volumes: ['.:/app'] }
17+
php-7.1: { image: 'php:7.1', volumes: ['.:/app'] }
18+
php-7.2: { image: 'php:7.2', volumes: ['.:/app'] }
19+
php-7.3: { image: 'php:7.3', volumes: ['.:/app'] }

docker/php-5.4/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM php:5.4
2+
3+
RUN docker-php-ext-install mbstring

src/Shortcode/Shortcode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ final class Shortcode extends AbstractShortcode implements ShortcodeInterface
88
{
99
public function __construct($name, array $parameters, $content, $bbCode = null)
1010
{
11-
if(false === is_string($name) || (is_string($name) && !mb_strlen($name))) {
11+
if(false === is_string($name) || (is_string($name) && !\mb_strlen($name))) {
1212
throw new \InvalidArgumentException('Shortcode name must be a non-empty string!');
1313
}
1414

0 commit comments

Comments
 (0)