Skip to content

Commit f251670

Browse files
authored
Merge pull request #53 from SuperDJ/2.22.x-math
Remove abandoned Laminas Math package
2 parents 7d36a88 + 381d026 commit f251670

File tree

4 files changed

+67
-76
lines changed

4 files changed

+67
-76
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
"require": {
3030
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
3131
"ext-simplexml": "*",
32+
"brick/math": "^0.13.1",
3233
"laminas/laminas-code": "^4.4",
3334
"laminas/laminas-http": "^2.15",
34-
"laminas/laminas-math": "^3.4.0",
3535
"laminas/laminas-server": "^2.11",
3636
"laminas/laminas-stdlib": "^3.10.1",
3737
"laminas/laminas-xml": "^1.4.0"

composer.lock

Lines changed: 61 additions & 69 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Value/BigInteger.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Laminas\XmlRpc\Value;
44

5-
use Laminas\Math\BigInteger\BigInteger as BigIntegerMath;
5+
use Brick\Math\BigInteger as BigIntegerMath;
66

77
class BigInteger extends Integer
88
{
@@ -11,7 +11,7 @@ class BigInteger extends Integer
1111
*/
1212
public function __construct($value)
1313
{
14-
$this->value = BigIntegerMath::factory()->init($value, 10);
14+
$this->value = (string) BigIntegerMath::of($value);
1515
$this->type = self::XMLRPC_TYPE_I8;
1616
}
1717

test/BigIntegerValueTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44

55
namespace LaminasTest\XmlRpc;
66

7-
use Laminas\Math\BigInteger\BigInteger as MathBigInteger;
7+
use Brick\Math\BigInteger as MathBigInteger;
88
use Laminas\XmlRpc\AbstractValue;
99
use Laminas\XmlRpc\Generator\GeneratorInterface as Generator;
1010
use Laminas\XmlRpc\Value\BigInteger;
11-
use LaminasTest\XmlRpc\AbstractTestProvider;
1211
use PHPUnit\Framework\Attributes\DataProviderExternal;
1312
use PHPUnit\Framework\Attributes\Group;
1413
use PHPUnit\Framework\TestCase;
@@ -34,8 +33,8 @@ protected function setUp(): void
3433

3534
$this->useBigIntForI8Flag = AbstractValue::$USE_BIGINT_FOR_I8;
3635
AbstractValue::$USE_BIGINT_FOR_I8 = true;
37-
$this->bigIntValue = MathBigInteger::factory()
38-
->add((string) PHP_INT_MAX, '42');
36+
$this->bigIntValue = (string) MathBigInteger::of((string) PHP_INT_MAX)
37+
->plus('42');
3938
}
4039

4140
protected function tearDown(): void

0 commit comments

Comments
 (0)