File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55* Removed support for calling ` Statement::addNewReference() ` and ` StatementList ` constructor with a
66 single array argument, which was deprecated in ` Version 9.6.0 (2021-03-31) ` . These should now be
77 called with a variadic argument list.
8- * Added ` __serialize() ` and ` __unserialize() ` methods to the ` EntityId ` interface,
9- and deprecated the ` serialize() ` and ` unserialize() ` methods.
8+ * Added ` __serialize() ` and ` __unserialize() ` methods to the ` EntityId ` interface.
109* Added native type hints to the ` Statement ` and ` StatementList ` classes
1110* Added ` strict_types=1 ` to ` Statement.php ` , ` StatementList.php ` , and related test files
1211* Removed support for repository names in entity IDs (e.g. ` foo:Q1234 ` )
Original file line number Diff line number Diff line change @@ -71,7 +71,6 @@ public function __serialize(): array {
7171 * @return string
7272 */
7373 public function serialize () {
74- wfDeprecated ( __METHOD__ , '1.41 ' );
7574 return $ this ->serialization ;
7675 }
7776
@@ -85,7 +84,6 @@ public function __unserialize( array $data ): void {
8584 * @param string $serialized
8685 */
8786 public function unserialize ( $ serialized ) {
88- wfDeprecated ( __METHOD__ , '1.41 ' );
8987 $ array = json_decode ( $ serialized );
9088 $ this ->serialization = is_array ( $ array ) ? $ array [1 ] : $ serialized ;
9189 $ this ->serialization = $ this ->serialization ?? '' ;
Original file line number Diff line number Diff line change @@ -65,7 +65,6 @@ public function __serialize(): array {
6565 * @return string
6666 */
6767 public function serialize () {
68- wfDeprecated ( __METHOD__ , '1.41 ' );
6968 return $ this ->serialization ;
7069 }
7170
@@ -79,7 +78,6 @@ public function __unserialize( array $data ): void {
7978 * @param string $serialized
8079 */
8180 public function unserialize ( $ serialized ) {
82- wfDeprecated ( __METHOD__ , '1.41 ' );
8381 $ array = json_decode ( $ serialized );
8482 $ this ->serialization = is_array ( $ array ) ? $ array [1 ] : $ serialized ;
8583 $ this ->serialization = $ this ->serialization ?? '' ;
Original file line number Diff line number Diff line change 33namespace Wikibase \DataModel \Tests \Entity ;
44
55use InvalidArgumentException ;
6- use MediaWikiUnitTestCase ;
76use ReflectionClass ;
87use Wikibase \DataModel \Entity \EntityId ;
98use Wikibase \DataModel \Entity \ItemId ;
2221 * @author Jeroen De Dauw < jeroendedauw@gmail.com >
2322 * @author John Erling Blad < jeblad@gmail.com >
2423 */
25- class EntityIdTest extends MediaWikiUnitTestCase {
24+ class EntityIdTest extends \ PHPUnit \ Framework \TestCase {
2625
2726 public static function instanceProvider () {
2827 $ ids = [];
@@ -74,9 +73,6 @@ public static function deserializationCompatibilityProvider(): array {
7473 * @dataProvider deserializationCompatibilityProvider
7574 */
7675 public function testDeserializationCompatibility ( $ expected , $ serialization ) {
77- if ( str_starts_with ( $ serialization , 'C: ' ) ) {
78- $ this ->expectDeprecationAndContinue ( '/::unserialize/ ' );
79- }
8076 $ this ->assertEquals (
8177 $ expected ,
8278 unserialize ( $ serialization )
Original file line number Diff line number Diff line change 33namespace Wikibase \DataModel \Tests \Entity ;
44
55use DataValues \IllegalValueException ;
6- use MediaWikiUnitTestCase ;
76use Wikibase \DataModel \Entity \EntityId ;
87use Wikibase \DataModel \Entity \EntityIdValue ;
98use Wikibase \DataModel \Entity \ItemId ;
2120 * @author Thiemo Kreuz
2221 * @author Daniel Kinzler
2322 */
24- class EntityIdValueTest extends MediaWikiUnitTestCase {
23+ class EntityIdValueTest extends \ PHPUnit \ Framework \TestCase {
2524
2625 public function testCanConstruct () {
2726 $ entityId = new ItemId ( 'Q123 ' );
@@ -161,9 +160,6 @@ public static function provideDeserializationCompatibility() {
161160 * @param EntityIdValue $expected
162161 */
163162 public function testDeserializationCompatibility ( $ serialized , EntityIdValue $ expected ) {
164- if ( str_contains ( $ serialized , 'C:32:"Wikibase\DataModel\Entity\ItemId" ' ) ) {
165- $ this ->expectDeprecationAndContinue ( '/::unserialize/ ' );
166- }
167163 $ id = unserialize ( $ serialized );
168164
169165 $ this ->assertEquals ( $ expected , $ id );
Original file line number Diff line number Diff line change 33namespace Wikibase \DataModel \Tests \Entity ;
44
55use InvalidArgumentException ;
6- use MediaWikiUnitTestCase ;
76use Wikibase \DataModel \Entity \ItemId ;
87
98/**
1514 * @license GPL-2.0-or-later
1615 * @author Jeroen De Dauw < jeroendedauw@gmail.com >
1716 */
18- class ItemIdTest extends MediaWikiUnitTestCase {
17+ class ItemIdTest extends \ PHPUnit \ Framework \TestCase {
1918
2019 /**
2120 * @dataProvider idSerializationProvider
@@ -87,7 +86,6 @@ public function testGetEntityType() {
8786
8887 public function testSerialize () {
8988 $ id = new ItemId ( 'Q1 ' );
90- $ this ->expectDeprecationAndContinue ( '/ItemId::serialize/ ' );
9189 $ this ->assertSame ( 'Q1 ' , $ id ->serialize () );
9290 }
9391
@@ -96,7 +94,6 @@ public function testSerialize() {
9694 */
9795 public function testUnserialize ( $ json , $ expected ) {
9896 $ id = new ItemId ( 'Q1 ' );
99- $ this ->expectDeprecationAndContinue ( '/ItemId::unserialize/ ' );
10097 $ id ->unserialize ( $ json );
10198 $ this ->assertSame ( $ expected , $ id ->getSerialization () );
10299 }
Original file line number Diff line number Diff line change 33namespace Wikibase \DataModel \Tests \Entity ;
44
55use InvalidArgumentException ;
6- use MediaWikiUnitTestCase ;
76use Wikibase \DataModel \Entity \NumericPropertyId ;
87
98/**
1413 *
1514 * @license GPL-2.0-or-later
1615 */
17- class NumericPropertyIdTest extends MediaWikiUnitTestCase {
16+ class NumericPropertyIdTest extends \ PHPUnit \ Framework \TestCase {
1817
1918 /**
2019 * @dataProvider idSerializationProvider
@@ -86,7 +85,6 @@ public function testGetEntityType() {
8685
8786 public function testSerialize () {
8887 $ id = new NumericPropertyId ( 'P1 ' );
89- $ this ->expectDeprecationAndContinue ( '/NumericPropertyId::serialize/ ' );
9088 $ this ->assertSame ( 'P1 ' , $ id ->serialize () );
9189 }
9290
@@ -95,7 +93,6 @@ public function testSerialize() {
9593 */
9694 public function testUnserialize ( $ json , $ expected ) {
9795 $ id = new NumericPropertyId ( 'P1 ' );
98- $ this ->expectDeprecationAndContinue ( '/NumericPropertyId::unserialize/ ' );
9996 $ id ->unserialize ( $ json );
10097 $ this ->assertSame ( $ expected , $ id ->getSerialization () );
10198 }
You can’t perform that action at this time.
0 commit comments