Update minimum PHP version to 7.2, bump version number
This commit is contained in:
parent
a2cb95aa5b
commit
4034b8b2c0
@ -4,7 +4,6 @@ install:
|
|||||||
- composer install
|
- composer install
|
||||||
|
|
||||||
php:
|
php:
|
||||||
- 7.1
|
|
||||||
- 7.2
|
- 7.2
|
||||||
- 7.3
|
- 7.3
|
||||||
- 7.4
|
- 7.4
|
||||||
@ -15,7 +14,7 @@ script:
|
|||||||
- vendor/bin/phpunit -c build
|
- vendor/bin/phpunit -c build
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- redis
|
- redis-server
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
allow_failures:
|
allow_failures:
|
||||||
|
28
Jenkinsfile
vendored
28
Jenkinsfile
vendored
@ -1,34 +1,6 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent none
|
agent none
|
||||||
stages {
|
stages {
|
||||||
stage('PHP 7.0') {
|
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
image 'php:7-alpine'
|
|
||||||
args '-u root --privileged'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
sh 'apk add --no-cache php7-phpdbg'
|
|
||||||
sh 'curl -sS https://getcomposer.org/installer | php'
|
|
||||||
sh 'php composer.phar install --ignore-platform-reqs'
|
|
||||||
sh 'php composer.phar run-script coverage -- --coverage-text --colors=never'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('PHP 7.1') {
|
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
image 'php:7.1-alpine'
|
|
||||||
args '-u root --privileged'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
sh 'apk add --no-cache php7-phpdbg'
|
|
||||||
sh 'curl -sS https://getcomposer.org/installer | php'
|
|
||||||
sh 'php composer.phar install --ignore-platform-reqs'
|
|
||||||
sh 'php composer.phar run-script coverage -- --coverage-text --colors=never'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('PHP 7.2') {
|
stage('PHP 7.2') {
|
||||||
agent {
|
agent {
|
||||||
docker {
|
docker {
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
*
|
*
|
||||||
* Building blocks for web development
|
* Building blocks for web development
|
||||||
*
|
*
|
||||||
* PHP version 7.1
|
* PHP version 7.2
|
||||||
*
|
*
|
||||||
* @package Ion
|
* @package Ion
|
||||||
* @author Timothy J. Warren <tim@timshomepage.net>
|
* @author Timothy J. Warren <tim@timshomepage.net>
|
||||||
* @copyright 2015 - 2019 Timothy J. Warren
|
* @copyright 2015 - 2019 Timothy J. Warren
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||||
* @version 2.4.1
|
* @version 3.0.0
|
||||||
* @link https://git.timshomepage.net/timw4mail/ion
|
* @link https://git.timshomepage.net/aviat/ion
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
"aura/html": "2.*",
|
"aura/html": "2.*",
|
||||||
"danielstjules/stringy": "^3.0.0",
|
"danielstjules/stringy": "^3.0.0",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
|
"php": "^7.2",
|
||||||
"psr/http-message": "~1.0",
|
"psr/http-message": "~1.0",
|
||||||
"psr/log": "~1.0",
|
"psr/log": "~1.0",
|
||||||
"zendframework/zend-diactoros": "^2.0.0",
|
"zendframework/zend-diactoros": "^2.0.0",
|
||||||
|
@ -20,7 +20,10 @@ use Aviat\Ion\Config;
|
|||||||
|
|
||||||
class ConfigTest extends Ion_TestCase {
|
class ConfigTest extends Ion_TestCase {
|
||||||
|
|
||||||
public function setUp(): void {
|
protected $config;
|
||||||
|
|
||||||
|
public function setUp(): void
|
||||||
|
{
|
||||||
$this->config = new Config([
|
$this->config = new Config([
|
||||||
'foo' => 'bar',
|
'foo' => 'bar',
|
||||||
'asset_path' => '/assets',
|
'asset_path' => '/assets',
|
||||||
@ -33,7 +36,7 @@ class ConfigTest extends Ion_TestCase {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testConfigHas()
|
public function testConfigHas(): void
|
||||||
{
|
{
|
||||||
$this->assertTrue($this->config->has('foo'));
|
$this->assertTrue($this->config->has('foo'));
|
||||||
$this->assertTrue($this->config->has(['a', 'b', 'c']));
|
$this->assertTrue($this->config->has(['a', 'b', 'c']));
|
||||||
@ -42,7 +45,7 @@ class ConfigTest extends Ion_TestCase {
|
|||||||
$this->assertFalse($this->config->has(['c', 'b', 'a']));
|
$this->assertFalse($this->config->has(['c', 'b', 'a']));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testConfigGet()
|
public function testConfigGet(): void
|
||||||
{
|
{
|
||||||
$this->assertEquals('bar', $this->config->get('foo'));
|
$this->assertEquals('bar', $this->config->get('foo'));
|
||||||
$this->assertEquals('baz', $this->config->get('bar'));
|
$this->assertEquals('baz', $this->config->get('bar'));
|
||||||
@ -50,26 +53,26 @@ class ConfigTest extends Ion_TestCase {
|
|||||||
$this->assertNull($this->config->get(['apple', 'sauce', 'is']));
|
$this->assertNull($this->config->get(['apple', 'sauce', 'is']));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testConfigSet()
|
public function testConfigSet(): void
|
||||||
{
|
{
|
||||||
$ret = $this->config->set('foo', 'foobar');
|
$ret = $this->config->set('foo', 'foobar');
|
||||||
$this->assertInstanceOf('Aviat\Ion\Config', $ret);
|
$this->assertInstanceOf(Config::class, $ret);
|
||||||
$this->assertEquals('foobar', $this->config->get('foo'));
|
$this->assertEquals('foobar', $this->config->get('foo'));
|
||||||
|
|
||||||
$this->config->set(['apple', 'sauce', 'is'], 'great');
|
$this->config->set(['apple', 'sauce', 'is'], 'great');
|
||||||
$apple = $this->config->get('apple');
|
$apple = $this->config->get('apple');
|
||||||
$this->assertEquals('great', $apple['sauce']['is'], "Config value not set correctly");
|
$this->assertEquals('great', $apple['sauce']['is'], 'Config value not set correctly');
|
||||||
|
|
||||||
$this->assertEquals('great', $this->config->get(['apple', 'sauce', 'is']), "Array argument get for config failed.");
|
$this->assertEquals('great', $this->config->get(['apple', 'sauce', 'is']), "Array argument get for config failed.");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testConfigBadSet()
|
public function testConfigBadSet(): void
|
||||||
{
|
{
|
||||||
$this->expectException('InvalidArgumentException');
|
$this->expectException('InvalidArgumentException');
|
||||||
$this->config->set(NULL, FALSE);
|
$this->config->set(NULL, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function dataConfigDelete()
|
public function dataConfigDelete(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'top level delete' => [
|
'top level delete' => [
|
||||||
@ -129,7 +132,7 @@ class ConfigTest extends Ion_TestCase {
|
|||||||
/**
|
/**
|
||||||
* @dataProvider dataConfigDelete
|
* @dataProvider dataConfigDelete
|
||||||
*/
|
*/
|
||||||
public function testConfigDelete($key, $assertKeys)
|
public function testConfigDelete($key, array $assertKeys): void
|
||||||
{
|
{
|
||||||
$config = new Config([]);
|
$config = new Config([]);
|
||||||
$config->set(['apple', 'sauce', 'is'], 'great');
|
$config->set(['apple', 'sauce', 'is'], 'great');
|
||||||
@ -141,7 +144,7 @@ class ConfigTest extends Ion_TestCase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetNonExistentConfigItem()
|
public function testGetNonExistentConfigItem(): void
|
||||||
{
|
{
|
||||||
$this->assertNull($this->config->get('foobar'));
|
$this->assertNull($this->config->get('foobar'));
|
||||||
}
|
}
|
||||||
|
@ -33,12 +33,13 @@ class ContainerAwareTest extends Ion_TestCase {
|
|||||||
|
|
||||||
protected $aware;
|
protected $aware;
|
||||||
|
|
||||||
public function setUp(): void {
|
public function setUp(): void
|
||||||
|
{
|
||||||
$this->container = new Container();
|
$this->container = new Container();
|
||||||
$this->aware = new Aware($this->container);
|
$this->aware = new Aware($this->container);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testContainerAwareTrait()
|
public function testContainerAwareTrait(): void
|
||||||
{
|
{
|
||||||
// The container was set in setup
|
// The container was set in setup
|
||||||
// check that the get method returns the same
|
// check that the get method returns the same
|
||||||
|
Loading…
Reference in New Issue
Block a user