Skip to content

Commit

Permalink
Merge pull request #1 from paytic/master
Browse files Browse the repository at this point in the history
Update to php8.0 and allow guzzlehttp 7.0
  • Loading branch information
stevro authored Mar 31, 2024
2 parents ddd86bb + b2f42e0 commit ab40bf5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.idea
.phpunit.result.cache

vendor
composer.lock
13 changes: 7 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,18 @@
"prefer-stable": true,
"require": {
"ext-json": "*",
"jms/serializer": "^1.14",
"guzzlehttp/guzzle": "^6.5",
"alcohol/iso4217": "^3.1",
"league/iso3166": "^2.1"
"jms/serializer": "^3.29",
"guzzlehttp/guzzle": "^6.5|^7.0",
"alcohol/iso4217": "^4.1",
"league/iso3166": "^4.1"
},
"config": {
"platform": {
"php": "5.6"
"php": "8.0"
}
},
"require-dev": {
"phpunit/phpunit": "^5.7"
"phpunit/phpunit": "^7.0|^8.0|^9.0",
"doctrine/annotations": "^2.0"
}
}
7 changes: 5 additions & 2 deletions src/Requests/BaseRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

class BaseRequest
{
public const BASE_URL_PROD = 'https://ecclients.btrl.ro';

public const BASE_URL_TEST = 'https://ecclients-sandbox.btrl.ro';

/**
* @var Client
Expand All @@ -24,7 +27,7 @@ class BaseRequest
*/
protected $serializer;

protected $baseUrl = 'https://ecclients.btrl.ro';
protected $baseUrl = self::BASE_URL_PROD;

/**
* Register constructor.
Expand All @@ -38,7 +41,7 @@ protected function init($isTest = true)
{
$this->client = new Client(
[
'base_uri' => ($isTest === true ? $this->baseUrl.':5443' : $this->baseUrl),
'base_uri' => ($isTest === true ? self::BASE_URL_TEST : self::BASE_URL_PROD),
'verify' => !$isTest,
]
);
Expand Down

0 comments on commit ab40bf5

Please sign in to comment.