Skip to content
This repository was archived by the owner on Dec 3, 2019. It is now read-only.
Open
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
43 changes: 36 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,52 @@
language: php

sudo: false

cache:
directories:
- $HOME/.composer/cache

php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm

env:
global:
- TEST_COMMAND="phpunit"
matrix:
- SYMFONY_VERSION=2.8.*

matrix:
allow_failures:
- php: hhvm
fast_finish: true
allow_failures:
- php: hhvm

before_script:
- composer self-update
- composer install --dev --prefer-source
include:
- php: 5.3
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_VERSION=2.3.* COVERAGE=true TEST_COMMAND="phpunit --coverage-text --coverage-clover=build/coverage.xml"
- php: 5.6
env: SYMFONY_VERSION=2.3.*
- php: 5.6
env: SYMFONY_VERSION=2.7.*
- php: 5.6
env: SYMFONY_VERSION=3.0.*

before_install:
- travis_retry composer self-update
- if [[ ! $PHP = hhvm* ]]; then INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; else INI_FILE=/etc/hhvm/php.ini; fi
- if [[ ! $PHP = hhvm* ]]; then echo memory_limit = -1 >> $INI_FILE; fi

install:
- composer require symfony/symfony:${SYMFONY_VERSION} --no-update
- composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction

script:
- phpunit --coverage-text --coverage-clover=coverage.clover --colors --verbose
- $TEST_COMMAND

after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover

5 changes: 3 additions & 2 deletions Tests/BrowscapTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Browscap\BrowscapBundle\Tests;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
Expand Down Expand Up @@ -59,14 +60,14 @@ public function getBrowsers() {
'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/24.0',
array(
'Parent' => 'Firefox 24.0',
'Platform' => 'Linux',
'Platform' => 'Ubuntu',
'CssVersion' => 3,
),
),
array(
'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)',
array(
'Parent' => 'IE 10.0',
'Parent' => 'IE 10.0 for Desktop',
'Platform' => 'Win7',
'CssVersion' => 3,
),
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"homepage": "https://github.com/browscap/BrowscapBundle",
"type": "symfony-bundle",
"require": {
"php": ">=5.3.3",
"browscap/browscap-php": "*@dev"
"php": "^5.3.3 || ^7.0",
"symfony/framework-bundle": "^2.3 || ^3.0",
"browscap/browscap-php": "^2.0"
},
"require-dev": {
"symfony/symfony": ">=2.1,<=2.5"
"symfony/symfony": "^2.3 || ^3.0"
},
"license": "MIT",
"minimum-stability": "dev",
"authors": [
{
"name": "Joshua Estes",
Expand All @@ -26,7 +26,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
"dev-master": "1.1.x-dev"
}
},
"autoload": {
Expand Down
Loading