Skip to content

Commit 92c4abb

Browse files
committed
add upgrade information
1 parent ef5ce77 commit 92c4abb

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

UPGRADE-2.0.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# UPGRADE FROM 1.0 to 2.0
2+
3+
The main change is that the property `$soapclient` in the abstract class `AbstractSoapClientBase` is no more static.
4+
5+
**Previously**:
6+
```php
7+
class MyService extends AbstractSoapClientBase
8+
{
9+
try {
10+
$this->setResult(self::getSoapClient()->CreateQueue($body));
11+
return $this->getResult();
12+
} catch (\SoapFault $soapFault) {
13+
$this->saveLastError(__METHOD__, $soapFault);
14+
return false;
15+
}
16+
}
17+
```
18+
19+
`self::getSoapClient()` was used to access the SoapClient instance.
20+
21+
**Now**:
22+
```php
23+
class MyService extends AbstractSoapClientBase
24+
{
25+
try {
26+
$this->setResult($this->getSoapClient()->CreateQueue($body));
27+
return $this->getResult();
28+
} catch (\SoapFault $soapFault) {
29+
$this->saveLastError(__METHOD__, $soapFault);
30+
return false;
31+
}
32+
}
33+
```
34+
35+
`$this->getSoapClient()` is now used to access the SoapClient instance.

0 commit comments

Comments
 (0)