Skip to content

Commit

Permalink
adding PHPUnit 7 support, bumping minimum php version (due to return …
Browse files Browse the repository at this point in the history
…hint additions)
  • Loading branch information
jaydiablo committed Mar 5, 2019
1 parent 2dbd951 commit d8f11fe
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 17 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ cache:

env:
global:
- COMPOSER_ARGS="" TMPDIR=/tmp USE_XDEBUG=false
- COMPOSER_ARGS=""
- TMPDIR=/tmp
- USE_XDEBUG=false
- COMPOSER_DISCARD_CHANGES=1

branches:
only:
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=7.0.0",
"php": ">=7.1.0",
"diablomedia/zendframework1-exception": "^1.0.0",
"diablomedia/zendframework1-loader": "^1.0.0",
"diablomedia/zendframework1-registry": "^1.0.0",
Expand All @@ -22,8 +22,8 @@
"diablomedia/zendframework1-filter": "^1.0.0",
"diablomedia/zendframework1-layout": "^1.0.0",
"diablomedia/zendframework1-session": "^1.0.0",
"phpunit/phpunit": "^6.0",
"phpunit/dbunit": "^3.0.2",
"phpunit/phpunit": "^6.0|^7.0",
"phpunit/dbunit": "^3.0.2|^4.0",
"sebastian/comparator": "^2.1"
},
"autoload": {
Expand All @@ -42,7 +42,7 @@
"diablomedia/zendframework1-controller-action-helper-json": "*",
"friendsofphp/php-cs-fixer": "^2.11",
"maglnet/composer-require-checker": "^1.1.0",
"phpro/grumphp": "^0.14.0"
"phpro/grumphp": "^0.15.0"
},
"archive": {
"exclude": ["/tests"]
Expand Down
4 changes: 2 additions & 2 deletions src/Zend/Test/PHPUnit/Constraint/DomQuery41.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public function evaluate($content, $assertType = '', $match = false)
* NOTE 2:
* Interface changed again in PHPUnit 4.1.0 because of refactoring to SebastianBergmann\Comparator
*/
public function fail($other, $description, \SebastianBergmann\Comparator\ComparisonFailure $cannot_be_used = null)
public function fail($other, $description, \SebastianBergmann\Comparator\ComparisonFailure $cannot_be_used = null): void
{
switch ($this->_assertType) {
case self::ASSERT_CONTENT_CONTAINS:
Expand Down Expand Up @@ -271,7 +271,7 @@ public function fail($other, $description, \SebastianBergmann\Comparator\Compari
*
* @return string
*/
public function toString()
public function toString(): string
{
return '';
}
Expand Down
4 changes: 2 additions & 2 deletions src/Zend/Test/PHPUnit/Constraint/Redirect41.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public function evaluate($other, $assertType = null, $variable = false)
* NOTE 2:
* Interface changed again in PHPUnit 4.1.0 because of refactoring to SebastianBergmann\Comparator
*/
public function fail($other, $description, \SebastianBergmann\Comparator\ComparisonFailure $cannot_be_used = null)
public function fail($other, $description, \SebastianBergmann\Comparator\ComparisonFailure $cannot_be_used = null): void
{
switch ($this->_assertType) {
case self::ASSERT_REDIRECT_TO:
Expand Down Expand Up @@ -221,7 +221,7 @@ public function fail($other, $description, \SebastianBergmann\Comparator\Compari
*
* @return string
*/
public function toString()
public function toString(): string
{
return '';
}
Expand Down
4 changes: 2 additions & 2 deletions src/Zend/Test/PHPUnit/Constraint/ResponseHeader41.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public function evaluate($response, $assertType = '', $variable = false)
* NOTE 2:
* Interface changed again in PHPUnit 4.1.0 because of refactoring to SebastianBergmann\Comparator
*/
public function fail($other, $description, \SebastianBergmann\Comparator\ComparisonFailure $cannot_be_used = null)
public function fail($other, $description, \SebastianBergmann\Comparator\ComparisonFailure $cannot_be_used = null): void
{
switch ($this->_assertType) {
case self::ASSERT_RESPONSE_CODE:
Expand Down Expand Up @@ -246,7 +246,7 @@ public function fail($other, $description, \SebastianBergmann\Comparator\Compari
*
* @return string
*/
public function toString()
public function toString(): string
{
return '';
}
Expand Down
2 changes: 1 addition & 1 deletion src/Zend/Test/PHPUnit/Db/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function __construct(Zend_Db_Adapter_Abstract $db, $schema)
*
* @return void
*/
public function close()
public function close(): void
{
$this->_connection->closeConnection();
}
Expand Down
4 changes: 2 additions & 2 deletions src/Zend/Test/PHPUnit/Db/DataSet/DbTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function __construct(Zend_Db_Table_Abstract $table, $where = null, $order
*
* @return void
*/
protected function loadData()
protected function loadData(): void
{
if ($this->data === null) {
$this->data = $this->_table->fetchAll(
Expand All @@ -108,7 +108,7 @@ protected function loadData()
/**
* Create Table Metadata object
*/
protected function createTableMetaData()
protected function createTableMetaData(): void
{
if ($this->tableMetaData === null) {
$this->loadData();
Expand Down
2 changes: 1 addition & 1 deletion src/Zend/Test/PHPUnit/Db/DataSet/QueryDataSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function __construct(PHPUnit\DbUnit\Database\Connection $databaseConnecti
* @param string $tableName
* @param string|Zend_Db_Select $query
*/
public function addTable($tableName, $query = null)
public function addTable($tableName, $query = null): void
{
if ($query === null) {
$query = $this->databaseConnection->getConnection()->select();
Expand Down
4 changes: 2 additions & 2 deletions src/Zend/Test/PHPUnit/Db/DataSet/QueryTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function __construct($tableName, $query, PHPUnit\DbUnit\Database\Connecti
*
* @return void
*/
protected function loadData()
protected function loadData(): void
{
if ($this->data === null) {
$stmt = $this->databaseConnection->getConnection()->query($this->query);
Expand All @@ -64,7 +64,7 @@ protected function loadData()
/**
* Create Table Metadata
*/
protected function createTableMetaData()
protected function createTableMetaData(): void
{
if ($this->tableMetaData === null) {
$this->loadData();
Expand Down

0 comments on commit d8f11fe

Please sign in to comment.