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

Require PHP 5.6+, Upgrade PHPUnit #255

Merged
merged 3 commits into from
Jan 7, 2019
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
1 change: 1 addition & 0 deletions .stickler.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
linters:
phpcs:
standard: PSR2
exclude: 'Squiz.Classes.ValidClassName,PSR1.Classes.ClassDeclaration'
csslint:
ignore: 'ids,known-properties'
files:
Expand Down
13 changes: 7 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
language: php

php:
- 5.5
- 5.6
- 7.2
- 7.1
- 7.0
- 5.6

matrix:
include:
- php: 5.5
- php: 7.2
env: COVERAGE=1

services:
- mongodb

before_script:
- bash .travis/install.sh
install:
- .travis/install.sh

script:
- bash .travis/run.sh
- .travis/run.sh
17 changes: 11 additions & 6 deletions .travis/install.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#!/bin/bash
pecl install mongodb || true
echo "extension = mongodb.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
#!/bin/bash -e

if [[ "$TRAVIS_PHP_VERSION" == "7.2" ]]; then
# installed, but not enabled?
echo "extension = mongodb.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
else
pecl install mongodb || true
fi

git clone https://github.com/tideways/php-profiler-extension.git
cd php-profiler-extension

if [[ "$TRAVIS_PHP_VERSION" == "5.5" ]] || [[ "$TRAVIS_PHP_VERSION" == "5.6" ]]; then
if [[ "$TRAVIS_PHP_VERSION" == "5.6" ]]; then
git checkout 4.x
echo "extension=tideways.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
echo "tideways.auto_prepend_library=0" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
Expand All @@ -15,7 +20,7 @@ else
fi

phpize && ./configure && make && make install && cd ..

phpenv rehash
composer install --prefer-dist --dev

composer install --prefer-dist
chmod -R 0777 cache/
2 changes: 1 addition & 1 deletion .travis/run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -e
if [[ "$COVERAGE" == "1" ]]; then
echo;
echo "Running unit tests with code-coverage";
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ System Requirements

XHGui has the following requirements:

* PHP version 5.5 or later.
* PHP version 5.6 or later.
* [MongoDB Extension](http://pecl.php.net/package/mongodb) MongoDB PHP driver.
XHGui requires verison 1.3.0 or later.
* [MongoDB](http://www.mongodb.org/) MongoDB Itself. XHGui requires version 2.2.0 or later.
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
}
},
"require": {
"php": ">=5.5.0",
"php": ">=5.6.0",
"slim/slim": "^2.6.3",
"slim/views": "^0.1.0",
"twig/twig": "~1.17",
"pimple/pimple": "^1.0.2",
"perftools/xhgui-collector": "^1.4.0"
},
"require-dev": {
"alcaeus/mongo-php-adapter": "^1.0",
"phpunit/phpunit": "4.*|5.*",
"alcaeus/mongo-php-adapter": "^1.1",
"phpunit/phpunit": "^5.7.27 | ^6.5.13",
"ext-dom": "*"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion tests/ConfigTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

class ConfigTest extends PHPUnit_Framework_TestCase
class ConfigTest extends PHPUnit\Framework\TestCase
{
public function setUp()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Controller/ImportTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
use Slim\Environment;

class Controller_ImportTest extends PHPUnit_Framework_TestCase
class Controller_ImportTest extends PHPUnit\Framework\TestCase
{
public function setUp()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Controller/RunTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
use Slim\Environment;

class Controller_RunTest extends PHPUnit_Framework_TestCase
class Controller_RunTest extends PHPUnit\Framework\TestCase
{
public function setUp()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Controller/WatchTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
use Slim\Environment;

class Controller_WatchTest extends PHPUnit_Framework_TestCase
class Controller_WatchTest extends PHPUnit\Framework\TestCase
{
public function setUp()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Db/MapperTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

class Db_MapperTest extends PHPUnit_Framework_TestCase
class Db_MapperTest extends PHPUnit\Framework\TestCase
{
public function setUp()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/ProfileTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

class ProfileTest extends PHPUnit_Framework_TestCase
class ProfileTest extends PHPUnit\Framework\TestCase
{
public function setUp()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/ProfilesTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
class ProfilesTest extends PHPUnit_Framework_TestCase
class ProfilesTest extends PHPUnit\Framework\TestCase
{
public function setUp()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Saver/FileTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

class Saver_FileTest extends PHPUnit_Framework_TestCase
class Saver_FileTest extends PHPUnit\Framework\TestCase
{
public function testSave()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Saver/MongoTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

class Saver_MongoTest extends PHPunit_Framework_TestCase
class Saver_MongoTest extends PHPUnit\Framework\TestCase
{
public function testSave()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Twig/ExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use Slim\Slim;
use Slim\Environment;

class Xhgui_Twig_ExtensionTest extends PHPUnit_Framework_TestCase
class Xhgui_Twig_ExtensionTest extends PHPUnit\Framework\TestCase
{
public function setUp()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/WatchFunctionsTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
class WatchFunctionsTest extends PHPUnit_Framework_TestCase
class WatchFunctionsTest extends PHPUnit\Framework\TestCase
{
public function setUp()
{
Expand Down