File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -91,3 +91,44 @@ Your code on 4.x:
9191 return $this->price;
9292 }
9393```
94+
95+ ## 4.0.x → 5.0.x
96+
97+ > By updating the library from 4.x to 5.x you lose strong typing.
98+ > This solution was necessary to support APM (Arbitrary Precision Mathematics).
99+
100+ In your goods:
101+
102+ Your code on 4.x:
103+ ``` php
104+ public function getAmountProduct(Customer $customer): int { ... }
105+
106+ public function getFeePercent(): float { ... }
107+
108+ public function getMinimalFee(): int { ... }
109+ ```
110+
111+ Your code on 5.x:
112+ ``` php
113+ public function getAmountProduct(Customer $customer) { ... }
114+
115+ public function getFeePercent() { ... }
116+
117+ public function getMinimalFee() { ... }
118+ ```
119+
120+ In the exchange rate processing service:
121+
122+ Your code on 4.x:
123+ ``` php
124+ protected function rate(Wallet $wallet): float { ... }
125+
126+ public function convertTo(Wallet $wallet): float { ... }
127+ ```
128+
129+ Your code on 5.x:
130+ ``` php
131+ protected function rate(Wallet $wallet) { ... }
132+
133+ public function convertTo(Wallet $wallet) { ... }
134+ ```
You can’t perform that action at this time.
0 commit comments