Skip to content

Commit dac5ea8

Browse files
committed
fix(travis): Update PHPUnit test for PHP 7.2
refactor(tests): Added compatibility for PHPUnit 7 feat(composer): Updated dependencies in composer.json fix(travis.yml): Download new PHPUnit after updating json, download PHPUnit before running tests. Signed-off-by: Gaurav Mishra <[email protected]>
1 parent f4955d4 commit dac5ea8

File tree

79 files changed

+1547
-953
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+1547
-953
lines changed

.travis.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ install:
3333
liblocal-lib-perl libspreadsheet-writeexcel-perl libdbd-sqlite3-perl
3434
- sudo apt-get install -q -y --allow-unauthenticated $CXX $CC || sudo apt-get install -q -y --allow-unauthenticated $CC
3535
- sudo apt-get install -q -y cppcheck
36+
- composer self-update
3637
- ( cd src && composer install --dev )
3738
- install/scripts/install-spdx-tools.sh
3839
- install/scripts/install-ninka.sh
@@ -58,10 +59,14 @@ script:
5859
- set -e
5960
- src/testing/syntax/syntaxtest.sh
6061
- if [[ ! -z "$CHECKBEFORE" ]]; then $CHECKBEFORE; fi
62+
- cd src
63+
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.6" ]]; then composer require --no-update phpunit/phpunit ^5 --ignore-platform-reqs; fi
64+
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then composer require --dev --no-update phpunit/phpunit ^6 --ignore-platform-reqs; fi
65+
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then composer require --dev --no-update phpunit/phpunit ^7 --ignore-platform-reqs; fi
66+
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.2" ]]; then composer require --dev --no-update phpunit/phpunit ^7 --ignore-platform-reqs; fi
67+
- composer update --ignore-platform-reqs
68+
- cd ..
6169
- if [[ ! -z "$MAKETARGETS" ]]; then make $MAKETARGETS; fi
62-
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.6" ]]; then composer require --no-update phpunit/phpunit ^5; fi
63-
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then composer require --dev --no-update phpunit/phpunit ^6; fi
64-
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then composer require --dev --no-update phpunit/phpunit ^7; fi
6570
- if [[ ! -z "$PHPTESTSUITE" ]]; then src/vendor/bin/phpunit -csrc/phpunit.xml --testsuite="$PHPTESTSUITE"; fi
6671
- set +e
6772

@@ -195,7 +200,8 @@ matrix:
195200
PHPTESTSUITE='Fossology PhpUnit Test Suite'
196201
CHECKBEFORE=''
197202
MAKETARGETS='build-lib VERSIONFILE build-cli'
198-
###### PHP 7.2
203+
################################################################################
204+
#### with PHP 7.2
199205
- php: 7.2
200206
env: CC=gcc CXX=g++
201207
after_script:

src/composer.json

Lines changed: 48 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,62 @@
11
{
2-
"name": "fossology/fossology",
3-
"description": "FOSSology is a open source license compliance software system and toolkit.",
4-
"_readme": [
2+
"name" : "fossology/fossology",
3+
"description" : "FOSSology is a open source license compliance software system and toolkit.",
4+
"_readme" : [
55
"Copyright Siemens AG 2014-2016",
66
"",
77
"Copying and distribution of this file, with or without modification,",
88
"are permitted in any medium without royalty provided the copyright",
99
"notice and this notice are preserved. This file is offered as-is,",
1010
"without any warranty."
1111
],
12-
"require": {
13-
"monolog/monolog": "1.10.*",
14-
"symfony/config": "2.6.*",
15-
"symfony/http-foundation": "2.6.*",
16-
"symfony/dependency-injection": "2.6.*",
17-
"twig/twig": "1.*",
18-
"twig/extensions": "1.*",
19-
"easyrdf/easyrdf": "0.9.*",
20-
"phpoffice/phpword": "v0.13.*"
12+
"require" : {
13+
"monolog/monolog" : "1.23.*",
14+
"symfony/config" : "^3.4",
15+
"symfony/http-foundation" : "^3.4",
16+
"symfony/dependency-injection" : "^3.4",
17+
"twig/twig" : "1.*",
18+
"twig/extensions" : "1.*",
19+
"easyrdf/easyrdf" : "0.9.*",
20+
"phpoffice/phpword" : "v0.14.*"
2121
},
22-
23-
"require-dev": {
24-
"mockery/mockery": ">=0.9.1",
25-
"hamcrest/hamcrest-php": "1.1.*",
26-
"squizlabs/php_codesniffer": "1.*",
27-
"sebastian/phpcpd": "2.*",
28-
"satooshi/php-coveralls": "1.0.*",
29-
"phpunit/phpunit": "~5"
22+
"require-dev" : {
23+
"mockery/mockery" : ">=0.9.1",
24+
"hamcrest/hamcrest-php" : "^2.0",
25+
"squizlabs/php_codesniffer" : "3.*",
26+
"sebastian/phpcpd" : "2.*",
27+
"php-coveralls/php-coveralls" : "^2.0",
28+
"phpunit/phpunit" : "~5"
3029
},
31-
32-
"autoload": {
33-
"psr-4": {
34-
"Fossology\\Lib\\": "lib/php",
35-
"Fossology\\Agent\\Copyright\\UI\\": "copyright/ui",
36-
"Fossology\\DeciderJob\\UI\\": "deciderjob/ui",
37-
"Fossology\\Decider\\UI\\": "decider/ui",
38-
"Fossology\\DelAgent\\UI\\": "delagent/ui",
39-
"Fossology\\UI\\Page\\": "www/ui/page"
30+
"autoload" : {
31+
"psr-4" : {
32+
"Fossology\\Lib\\" : "lib/php",
33+
"Fossology\\Agent\\Copyright\\UI\\" : "copyright/ui",
34+
"Fossology\\DeciderJob\\UI\\" : "deciderjob/ui",
35+
"Fossology\\Decider\\UI\\" : "decider/ui",
36+
"Fossology\\DelAgent\\UI\\" : "delagent/ui",
37+
"Fossology\\UI\\Page\\" : "www/ui/page"
4038
}
4139
},
42-
43-
"config": {
44-
"platform": {
45-
"php": "5.6"
40+
"config" : {
41+
"platform" : {
42+
"php" : "5.6"
4643
}
47-
}
44+
},
45+
"homepage" : "https://www.fossology.org/",
46+
"license" : [
47+
"GPL-2.0-only",
48+
"LGPL-2.1-only"
49+
],
50+
"support" : {
51+
"email" : "[email protected]",
52+
"issues" : "https://github.com/fossology/fossology/issues",
53+
"wiki" : "https://github.com/fossology/fossology/wiki",
54+
"source" : "https://github.com/fossology/fossology/"
55+
},
56+
"keywords" : [
57+
"fossology",
58+
"spdx",
59+
"license-management",
60+
"license"
61+
]
4862
}

0 commit comments

Comments
 (0)