Skip to content

Commit

Permalink
Add PHP 8 support (#51)
Browse files Browse the repository at this point in the history
* Add PHP 8 support
  • Loading branch information
antonkomarev authored Jan 1, 2021
1 parent 8da8b8e commit d373586
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 69 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
/tests export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php_cs export-ignore
/.styleci.yml export-ignore
/.travis.yml export-ignore
/CODE_OF_CONDUCT.md export-ignore
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/extras/
/vendor/
.php_cs.cache
.phpunit.result.cache
composer.lock
composer.phar
Expand Down
64 changes: 0 additions & 64 deletions .php_cs

This file was deleted.

1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ php:
- 7.2
- 7.3
- 7.4
- 8.0

env:
global:
Expand Down
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to `cybercog/youtrack-rest-php` will be documented in this f

## [Unreleased]

## [6.3.0] - 2021-01-01

### Added

- ([#51]) Added PHP 8.x support

## [6.2.2] - 2020-07-19

### Fixed
Expand Down Expand Up @@ -116,7 +122,8 @@ All notable changes to `cybercog/youtrack-rest-php` will be documented in this f

- Initial release.

[Unreleased]: https://github.com/cybercog/youtrack-rest-php/compare/6.2.2...master
[Unreleased]: https://github.com/cybercog/youtrack-rest-php/compare/6.3.0...master
[6.3.0]: https://github.com/cybercog/youtrack-rest-php/compare/6.2.2...6.3.0
[6.2.2]: https://github.com/cybercog/youtrack-rest-php/compare/6.2.1...6.2.2
[6.2.1]: https://github.com/cybercog/youtrack-rest-php/compare/6.2.0...6.2.1
[6.2.0]: https://github.com/cybercog/youtrack-rest-php/compare/6.1.0...6.2.0
Expand All @@ -130,6 +137,7 @@ All notable changes to `cybercog/youtrack-rest-php` will be documented in this f
[3.0.0]: https://github.com/cybercog/youtrack-rest-php/compare/2.0.1...3.0.0
[2.0.1]: https://github.com/cybercog/youtrack-rest-php/compare/1.0.0...2.0.1

[#51]: https://github.com/cybercog/youtrack-rest-php/pull/51
[#49]: https://github.com/cybercog/youtrack-rest-php/pull/49
[#48]: https://github.com/cybercog/youtrack-rest-php/pull/48
[#43]: https://github.com/cybercog/youtrack-rest-php/pull/43
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"docs": "https://github.com/cybercog/youtrack-rest-php/wiki"
},
"require": {
"php": "^7.1",
"php": "^7.1|^8.0",
"ext-json": "*",
"guzzlehttp/guzzle": "^6.2",
"phpstan/phpstan": "^0.12.32"
Expand Down
5 changes: 4 additions & 1 deletion src/HttpClient/GuzzleHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ private function appendUserAgent(array $options): array
{
$defaultAgent = 'GuzzleHttp/' . Client::VERSION;
if (extension_loaded('curl') && function_exists('curl_version')) {
$defaultAgent .= ' curl/' . \curl_version()['version'];
$curlVersion = \curl_version();
if (\is_array($curlVersion)) {
$defaultAgent .= ' curl/' . $curlVersion['version'];
}
}
$defaultAgent .= ' PHP/' . PHP_VERSION;

Expand Down

0 comments on commit d373586

Please sign in to comment.