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

Add PHP 8.0 to build matrix #139

Merged
merged 3 commits into from
Dec 30, 2021
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
4 changes: 2 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
# TODO Add 8.0 and 8.1 versions as well
php-versions: ['5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
# TODO Add 8.1 version as well
php-versions: ['5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
steps:
- uses: actions/checkout@v2
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
"php": ">=5.5.9"
},
"require-dev": {
"phpunit/phpunit": "~4.8.36 || ~5.7 || ~6.5 || ~7.5",
"phpunit/phpunit": "~4.8.36 || ~5.7 || ~6.5 || ~7.5 || ~8.5",
"scrutinizer/ocular": "~1.1",
"squizlabs/php_codesniffer": "~2.2",
"symfony/yaml": "~3.4"
"symfony/yaml": "~3.4",
"yoast/phpunit-polyfills": "^1.0"
},
"suggest": {
"symfony/yaml": "~3.4"
Expand Down
13 changes: 2 additions & 11 deletions tests/AbstractConfigTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Noodlehaus;

use PHPUnit\Framework\TestCase;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;
use Noodlehaus\Test\Fixture\SimpleConfig;

/**
Expand All @@ -18,8 +18,7 @@ class AbstractConfigTest extends TestCase
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
{
protected function set_up() {
$this->config = new SimpleConfig(
[
'host' => 'localhost',
Expand All @@ -39,14 +38,6 @@ protected function setUp()
);
}

/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}

/**
* @covers Noodlehaus\AbstractConfig::__construct()
* @covers Noodlehaus\AbstractConfig::getDefaults()
Expand Down
16 changes: 0 additions & 16 deletions tests/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,6 @@ class ConfigTest extends TestCase
*/
protected $config;

/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
{
}

/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}

/**
* @covers Noodlehaus\Config::load()
* @covers Noodlehaus\Config::loadFromFile()
Expand Down
12 changes: 2 additions & 10 deletions tests/Parser/IniTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Noodlehaus\Parser\Test;

use PHPUnit\Framework\TestCase;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;
use Noodlehaus\Parser\Ini;

/**
Expand All @@ -18,19 +18,11 @@ class IniTest extends TestCase
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
protected function set_up()
{
$this->ini = new Ini();
}

/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}

/**
* @covers Noodlehaus\Parser\Ini::getSupportedExtensions()
*/
Expand Down
12 changes: 2 additions & 10 deletions tests/Parser/JsonTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Noodlehaus\Parser\Test;

use PHPUnit\Framework\TestCase;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;
use Noodlehaus\Parser\Json;

/**
Expand All @@ -18,19 +18,11 @@ class JsonTest extends TestCase
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
protected function set_up()
{
$this->json = new Json();
}

/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}

/**
* @covers Noodlehaus\Parser\Json::getSupportedExtensions()
*/
Expand Down
12 changes: 2 additions & 10 deletions tests/Parser/PhpTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Noodlehaus\Parser\Test;

use PHPUnit\Framework\TestCase;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;
use Noodlehaus\Parser\Php;

/**
Expand All @@ -18,19 +18,11 @@ class PhpTest extends TestCase
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
protected function set_up()
{
$this->php = new Php();
}

/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}

/**
* @covers Noodlehaus\Parser\Php::getSupportedExtensions()
*/
Expand Down
12 changes: 2 additions & 10 deletions tests/Parser/PropertiesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Noodlehaus\Parser\Test;

use Noodlehaus\Parser\Properties;
use PHPUnit\Framework\TestCase;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;

class PropertiesTest extends TestCase
{
Expand All @@ -16,19 +16,11 @@ class PropertiesTest extends TestCase
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
protected function set_up()
{
$this->properties = new Properties();
}

/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}

/**
* @covers Noodlehaus\Parser\Properties::getSupportedExtensions()
*/
Expand Down
12 changes: 2 additions & 10 deletions tests/Parser/SerializeTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Noodlehaus\Parser\Test;

use PHPUnit\Framework\TestCase;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;
use Noodlehaus\Parser\Serialize;

/**
Expand All @@ -18,19 +18,11 @@ class SerializeTest extends TestCase
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
protected function set_up()
{
$this->serialize = new Serialize();
}

/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}

/**
* @covers Noodlehaus\Parser\Serialize::getSupportedExtensions()
*/
Expand Down
12 changes: 2 additions & 10 deletions tests/Parser/XmlTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Noodlehaus\Parser\Test;

use PHPUnit\Framework\TestCase;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;
use Noodlehaus\Parser\Xml;

/**
Expand All @@ -18,19 +18,11 @@ class XmlTest extends TestCase
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
protected function set_up()
{
$this->xml = new Xml();
}

/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}

/**
* @covers Noodlehaus\Parser\Xml::getSupportedExtensions()
*/
Expand Down
12 changes: 2 additions & 10 deletions tests/Parser/YamlTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Noodlehaus\Parser\Test;

use PHPUnit\Framework\TestCase;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;
use Noodlehaus\Parser\Yaml;

/**
Expand All @@ -18,19 +18,11 @@ class YamlTest extends TestCase
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
protected function set_up()
{
$this->yaml = new Yaml();
}

/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}

/**
* @covers Noodlehaus\Parser\Yaml::getSupportedExtensions()
*/
Expand Down
6 changes: 3 additions & 3 deletions tests/Writer/IniTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Noodlehaus\Writer\Test;

use Noodlehaus\Writer\Ini;
use PHPUnit\Framework\TestCase;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;

class IniTest extends TestCase
{
Expand All @@ -26,7 +26,7 @@ class IniTest extends TestCase
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
protected function set_up()
{
$this->writer = new Ini();
$this->temp_file = tempnam(sys_get_temp_dir(), 'config.ini');
Expand All @@ -46,7 +46,7 @@ protected function setUp()
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
protected function tear_down()
{
unlink($this->temp_file);
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Writer/JsonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Noodlehaus\Writer\Test;

use Noodlehaus\Writer\Json;
use PHPUnit\Framework\TestCase;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;

class JsonTest extends TestCase
{
Expand All @@ -26,7 +26,7 @@ class JsonTest extends TestCase
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
protected function set_up()
{
$this->writer = new Json();
$this->temp_file = tempnam(sys_get_temp_dir(), 'config.json');
Expand All @@ -49,7 +49,7 @@ protected function setUp()
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
protected function tear_down()
{
unlink($this->temp_file);
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Writer/PropertiesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Noodlehaus\Writer\Test;

use Noodlehaus\Writer\Properties;
use PHPUnit\Framework\TestCase;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;

class PropertiesTest extends TestCase
{
Expand All @@ -26,7 +26,7 @@ class PropertiesTest extends TestCase
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
protected function set_up()
{
$this->writer = new Properties();
$this->temp_file = tempnam(sys_get_temp_dir(), 'config.properties');
Expand All @@ -45,7 +45,7 @@ protected function setUp()
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
protected function tear_down()
{
unlink($this->temp_file);
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Writer/SerializeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Noodlehaus\Writer\Test;

use Noodlehaus\Writer\Serialize;
use PHPUnit\Framework\TestCase;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;

class SerializeTest extends TestCase
{
Expand All @@ -26,7 +26,7 @@ class SerializeTest extends TestCase
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp()
protected function set_up()
{
$this->writer = new Serialize();
$this->temp_file = tempnam(sys_get_temp_dir(), 'config.txt');
Expand All @@ -49,7 +49,7 @@ protected function setUp()
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
protected function tear_down()
{
unlink($this->temp_file);
}
Expand Down
Loading