From 22128d360c42c0073e8582652bd6d073a3a32aab Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Mon, 30 Dec 2019 17:04:19 +0800 Subject: [PATCH] Remove deprecated `player_name` attribute on player instance --- app/Models/Player.php | 11 ----------- tests/ModelsTest/PlayerTest.php | 6 ------ 2 files changed, 17 deletions(-) diff --git a/app/Models/Player.php b/app/Models/Player.php index 4376d0a1..8e880d92 100644 --- a/app/Models/Player.php +++ b/app/Models/Player.php @@ -97,15 +97,4 @@ class Player extends Model return json_encode($json, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); } - - /** - * TODO: This is only for compatibility of 3rd plugins. - * Remove this in next major version. - * - * @deprecated - */ - public function getPlayerNameAttribute() - { - return $this->name; - } } diff --git a/tests/ModelsTest/PlayerTest.php b/tests/ModelsTest/PlayerTest.php index 050a744c..a38f6cb2 100644 --- a/tests/ModelsTest/PlayerTest.php +++ b/tests/ModelsTest/PlayerTest.php @@ -27,10 +27,4 @@ class PlayerTest extends TestCase $this->expectException(\InvalidArgumentException::class); $this->assertNull($player->getJsonProfile(-1)); } - - public function testGetPlayerName() - { - $player = factory(Player::class)->make(); - $this->assertEquals($player->name, $player->player_name); - } }