Skip to content
This repository was archived by the owner on Dec 3, 2019. It is now read-only.

Commit a1f7853

Browse files
committed
support for symfony >= 2.3 & 3.0
1 parent 58e71da commit a1f7853

4 files changed

Lines changed: 587 additions & 228 deletions

File tree

.travis.yml

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,52 @@
11
language: php
22

3+
sudo: false
4+
5+
cache:
6+
directories:
7+
- $HOME/.composer/cache
8+
39
php:
10+
- 5.3
411
- 5.4
512
- 5.5
613
- 5.6
14+
- 7.0
715
- hhvm
816

17+
env:
18+
global:
19+
- TEST_COMMAND="phpunit"
20+
matrix:
21+
- SYMFONY_VERSION=2.8.*
22+
923
matrix:
10-
allow_failures:
11-
- php: hhvm
24+
fast_finish: true
25+
allow_failures:
26+
- php: hhvm
1227

13-
before_script:
14-
- composer self-update
15-
- composer install --dev --prefer-source
28+
include:
29+
- php: 5.3
30+
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_VERSION=2.3.* COVERAGE=true TEST_COMMAND="phpunit --coverage-text --coverage-clover=build/coverage.xml"
31+
- php: 5.6
32+
env: SYMFONY_VERSION=2.3.*
33+
- php: 5.6
34+
env: SYMFONY_VERSION=2.7.*
35+
- php: 5.6
36+
env: SYMFONY_VERSION=3.0.*
37+
38+
before_install:
39+
- travis_retry composer self-update
40+
- if [[ ! $PHP = hhvm* ]]; then INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; else INI_FILE=/etc/hhvm/php.ini; fi
41+
- echo memory_limit = -1 >> $INI_FILE
42+
43+
install:
44+
- composer require symfony/symfony:${SYMFONY_VERSION} --no-update
45+
- composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction
1646

1747
script:
18-
- phpunit --coverage-text --coverage-clover=coverage.clover --colors --verbose
48+
- $TEST_COMMAND
1949

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

Tests/BrowscapTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
namespace Browscap\BrowscapBundle\Tests;
34

45
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
@@ -59,14 +60,14 @@ public function getBrowsers() {
5960
'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/24.0',
6061
array(
6162
'Parent' => 'Firefox 24.0',
62-
'Platform' => 'Linux',
63+
'Platform' => 'Ubuntu',
6364
'CssVersion' => 3,
6465
),
6566
),
6667
array(
6768
'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)',
6869
array(
69-
'Parent' => 'IE 10.0',
70+
'Parent' => 'IE 10.0 for Desktop',
7071
'Platform' => 'Win7',
7172
'CssVersion' => 3,
7273
),

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
"homepage": "https://github.com/browscap/BrowscapBundle",
66
"type": "symfony-bundle",
77
"require": {
8-
"php": ">=5.3.3",
9-
"browscap/browscap-php": "*@dev"
8+
"php": "^5.3.3 || ^7.0",
9+
"symfony/framework-bundle": "^2.3 || ^3.0",
10+
"browscap/browscap-php": "^2.0"
1011
},
1112
"require-dev": {
12-
"symfony/symfony": ">=2.1,<=2.5"
13+
"symfony/symfony": "^2.3 || ^3.0"
1314
},
1415
"license": "MIT",
15-
"minimum-stability": "dev",
1616
"authors": [
1717
{
1818
"name": "Joshua Estes",
@@ -26,7 +26,7 @@
2626
},
2727
"extra": {
2828
"branch-alias": {
29-
"dev-master": "1.0.x-dev"
29+
"dev-master": "1.1.x-dev"
3030
}
3131
},
3232
"autoload": {

0 commit comments

Comments
 (0)