Skip to content

Commit

Permalink
Add deprecation messages for next major releases 4 and 5
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelcom committed Feb 5, 2021
1 parent 9ea1e6b commit 5e5dc23
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

## 3.0.2 - 2021-02-05
- Add deprecation messages for next major releases 4 and 5

## 3.0.1 - 2021-01-28
- Update Travis CI badge and settings

Expand Down
4 changes: 4 additions & 0 deletions src/AbstractStructBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public static function __set_state(array $array): StructInterface
*/
public function _set(string $name, $value): self
{
@trigger_error(sprintf('%s() will be renamed to setPropertyValue in WsdlToPhp/PackageBase 4.0.', __METHOD__), E_USER_DEPRECATED);

$setMethod = 'set' . ucfirst($name);
if (method_exists($this, $setMethod)) {
$this->$setMethod($value);
Expand All @@ -62,6 +64,8 @@ public function _set(string $name, $value): self
*/
public function _get(string $name)
{
@trigger_error(sprintf('%s() will be renamed to getPropertyValue in WsdlToPhp/PackageBase 4.0.', __METHOD__), E_USER_DEPRECATED);

$getMethod = 'get' . ucfirst($name);
if (method_exists($this, $getMethod)) {
return $this->$getMethod();
Expand Down

0 comments on commit 5e5dc23

Please sign in to comment.