Skip to content

Commit 681d2c1

Browse files
committed
Merge pull request #492 from wmde/undeprecate-term-setters
Undeprecate term setters in Item and Property
2 parents 491e81f + a59a1c7 commit 681d2c1

3 files changed

Lines changed: 65 additions & 0 deletions

File tree

RELEASE-NOTES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ Other breaking changes:
5757
* Renamed `Claim\ClaimGuidParsingException` to `Statement\StatementGuidParsingException`, leaving a b/c alias in place
5858
* Renamed `StatementListProvider` to `Statement\StatementListProvider`, leaving a b/c alias in place
5959

60+
#### Other changes
61+
62+
* `Item::setLabel`, `Item::setDescription` and `Item::setAliases` are no longer deprecated
63+
* `Property::setLabel`, `Property::setDescription` and `Property::setAliases` are no longer deprecated
64+
6065
## Version 2.6.1 (2015-04-25)
6166

6267
* Allow installation together with Diff 2.x.

src/Entity/Item.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,36 @@ public function setId( $id ) {
7676
}
7777
}
7878

79+
/**
80+
* @param string $languageCode
81+
* @param string $value
82+
*
83+
* @throws InvalidArgumentException
84+
*/
85+
public function setLabel( $languageCode, $value ) {
86+
$this->fingerprint->setLabel( $languageCode, $value );
87+
}
88+
89+
/**
90+
* @param string $languageCode
91+
* @param string $value
92+
*
93+
* @throws InvalidArgumentException
94+
*/
95+
public function setDescription( $languageCode, $value ) {
96+
$this->fingerprint->setDescription( $languageCode, $value );
97+
}
98+
99+
/**
100+
* @param string $languageCode
101+
* @param string[] $aliases
102+
*
103+
* @throws InvalidArgumentException
104+
*/
105+
public function setAliases( $languageCode, array $aliases ) {
106+
$this->fingerprint->setAliasGroup( $languageCode, $aliases );
107+
}
108+
79109
/**
80110
* @since 0.1 return type changed in 0.3
81111
*

src/Entity/Property.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,36 @@ public function setId( $id ) {
7373
}
7474
}
7575

76+
/**
77+
* @param string $languageCode
78+
* @param string $value
79+
*
80+
* @throws InvalidArgumentException
81+
*/
82+
public function setLabel( $languageCode, $value ) {
83+
$this->fingerprint->setLabel( $languageCode, $value );
84+
}
85+
86+
/**
87+
* @param string $languageCode
88+
* @param string $value
89+
*
90+
* @throws InvalidArgumentException
91+
*/
92+
public function setDescription( $languageCode, $value ) {
93+
$this->fingerprint->setDescription( $languageCode, $value );
94+
}
95+
96+
/**
97+
* @param string $languageCode
98+
* @param string[] $aliases
99+
*
100+
* @throws InvalidArgumentException
101+
*/
102+
public function setAliases( $languageCode, array $aliases ) {
103+
$this->fingerprint->setAliasGroup( $languageCode, $aliases );
104+
}
105+
76106
/**
77107
* @since 0.1 return type changed in 0.3
78108
*

0 commit comments

Comments
 (0)