Skip to content

Commit

Permalink
Added PHP 7.3, 7.4 and nightly to CI matrix
Browse files Browse the repository at this point in the history
- added PHP 7.3, 7.4 and nightly to CI matrix
- updated phpunit config
- use null coalescing operator in `OAuthPlugin::initToken` in order to avoid precedence issues on PHP 7.4
  • Loading branch information
vimishor committed Jun 23, 2020
1 parent 3945f48 commit 67a0362
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
17 changes: 13 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
language: php
dist: trusty
sudo: false
php:
- 7.1
- 7.2

matrix:
include:
- php: '7.1'
- php: '7.2'
- php: '7.3'
- php: '7.4'
- php: nightly
env:
- COMPOSER_ARGS="--no-suggest --ignore-platform-reqs"
allow_failures:
- php: nightly

before_script:
- travis_retry composer self-update
- composer --version
- travis_retry composer install --no-interaction --prefer-source
- travis_retry composer install --no-interaction --prefer-source $COMPOSER_ARGS

script:
- mkdir -p ./build/logs
Expand Down
4 changes: 1 addition & 3 deletions lib/Bitbucket/API/Http/Plugin/OAuthPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,7 @@ protected function getSigner()
*/
protected function initToken($token)
{
return (!is_null($token)) ?
$token :
empty($this->config['oauth_token']) ?
return $token ?? empty($this->config['oauth_token']) ?
new OAuth1\Token\NullToken() :
new OAuth1\Token\Token($this->config['oauth_token'], $this->config['oauth_token_secret'])
;
Expand Down
3 changes: 1 addition & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
>
<testsuites>
<testsuite name="bitbucket-api Test Suite">
Expand All @@ -24,7 +23,7 @@
<logging>
<log type="tap" target="build/report.tap"/>
<log type="junit" target="build/report.junit.xml"/>
<log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
<log type="coverage-html" target="build/coverage"/>
<log type="coverage-text" target="build/coverage.txt"/>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>
Expand Down

0 comments on commit 67a0362

Please sign in to comment.