Skip to content

Commit da0f152

Browse files
committed
Updates dependencies and refactors URL handling
#61 Upgrades PHP requirement to ^8.1 and updates multiple package dependencies for improved compatibility and functionality. Refactors URL encoding logic by introducing the `Functions` class to streamline operations and enhance code maintainability.
1 parent 1938f73 commit da0f152

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

composer.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
"FinTech"
1616
],
1717
"require": {
18+
"php": "^8.1",
1819
"ext-json": "*",
1920
"ext-curl": "*",
2021
"ext-gettext": "*",
21-
"vitexsoftware/ease-core": "^1.45"
22+
"vitexsoftware/ease-core": "^1.48"
2223
},
2324
"autoload": {
2425
"psr-4": {
@@ -38,9 +39,9 @@
3839
"roave/security-advisories": "dev-latest",
3940
"phpunit/phpunit": "*",
4041
"phpstan/phpstan": "*",
41-
"friendsofphp/php-cs-fixer": "^3.61",
42-
"ergebnis/composer-normalize": "^2.43",
43-
"ergebnis/php-cs-fixer-config": "^6.34"
42+
"friendsofphp/php-cs-fixer": "^3.75",
43+
"ergebnis/composer-normalize": "^2.47",
44+
"ergebnis/php-cs-fixer-config": "^6.46"
4445
},
4546
"scripts": {
4647
"post-install-cmd": [

src/AbraFlexi/RO.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
namespace AbraFlexi;
1616

17+
use AbraFlexi\Functions;
18+
1719
/**
1820
* Základní třída pro čtení z AbraFlexi.
1921
*
@@ -931,7 +933,7 @@ public function updateApiURL(): void
931933
}
932934

933935
if (!empty($rowIdentifier)) {
934-
$this->apiURL .= '/'.self::urlEncode((string) $rowIdentifier);
936+
$this->apiURL .= '/'. Functions::urlEncode((string) $rowIdentifier);
935937
}
936938

937939
$this->apiURL .= '.'.$this->format;
@@ -1550,7 +1552,7 @@ public function loadFromAbraFlexi($id = null)
15501552
$id = $this->getMyKey();
15511553
}
15521554

1553-
$flexidata = $this->getFlexiData($this->getEvidenceUrl().'/'.(\is_array($id) ? '' : self::urlizeId($id)), \is_array($id) ? $id : '');
1555+
$flexidata = $this->getFlexiData($this->getEvidenceUrl().'/'.(\is_array($id) ? '' : Functions::urlizeId($id)), \is_array($id) ? $id : '');
15541556

15551557
if ($this->lastResponseCode === 200) {
15561558
$this->apiURL = $this->curlInfo['url'];
@@ -1921,7 +1923,7 @@ public function getRecordID()
19211923
*/
19221924
public function getRecordCode()
19231925
{
1924-
return empty($this->getDataValue('kod')) ? null : self::code($this->getDataValue('kod'));
1926+
return empty($this->getDataValue('kod')) ? null : Functions::code($this->getDataValue('kod'));
19251927
}
19261928

19271929
/**

0 commit comments

Comments
 (0)