Skip to content

Commit ccd964d

Browse files
committed
Remove ids entirely since they're unused and causing issues
Release 0.8.0
1 parent e174354 commit ccd964d

File tree

6 files changed

+7
-31
lines changed

6 files changed

+7
-31
lines changed

src/Resources/Build.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
class Build
66
{
7-
public ?string $id = null;
87
public string $minecraft;
98
public ?string $java = null;
109
public ?int $memory = 0;
@@ -16,10 +15,6 @@ class Build
1615

1716
public function __construct($properties)
1817
{
19-
if (array_key_exists('id', $properties)) {
20-
$this->id = $properties['id'];
21-
}
22-
2318
$this->minecraft = $properties['minecraft'];
2419

2520
if (array_key_exists('java', $properties)) {

src/Resources/Mod.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
class Mod
66
{
7-
public ?string $id = null;
87
public string $name = "";
98
public ?string $version = null;
109
public string $md5 = "";

src/Resources/Modpack.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
class Modpack
66
{
7-
public ?string $id = null;
87
public string $name = "";
98
public string $display_name = "";
109
public ?string $url = null;

src/SolderClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class SolderClient
2020
public string $key;
2121
private Client $client;
2222

23-
const VERSION = '0.7.6';
23+
const VERSION = '0.8.0';
2424

2525
public static function factory($url, $key, $headers = [], $handler = null, $timeout = 3): SolderClient
2626
{

tests/ClientTest.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ public function testGetBuild()
292292
$this->assertCount(1, $build->mods);
293293

294294
$mod = $build->mods[0];
295-
$this->assertSame('30', $mod->id);
296295
$this->assertSame('armorbar', $mod->name);
297296
$this->assertSame('v0.7.1', $mod->version);
298297
$this->assertSame('f323a8d582302ea0abd615a223f8a68b', $mod->md5);
@@ -314,20 +313,4 @@ public function testBadPack()
314313
$this->expectException(ConnectionException::class);
315314
SolderClient::factory('https://solder.example.net/api/', '', [], []);
316315
}
317-
318-
public function testBuildUuid()
319-
{
320-
$props = [
321-
'id' => '9e002c63-a8e5-47fa-b9a2-369f7ab9fe5d',
322-
'minecraft' => '1.0',
323-
];
324-
325-
$build = new Build($props);
326-
327-
$this->assertObjectHasProperty('id', $build);
328-
$this->assertObjectHasProperty('minecraft', $build);
329-
330-
$this->assertSame('9e002c63-a8e5-47fa-b9a2-369f7ab9fe5d', $build->id);
331-
$this->assertSame('1.0', $build->minecraft);
332-
}
333316
}

tests/DynamicPropertiesTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,30 @@ class DynamicPropertiesTest extends TestCase
1212
public function testMod()
1313
{
1414
$props = [
15-
'id' => 1,
15+
'name' => 'foo',
1616
'extra' => 'stuff',
1717
];
1818

1919
$mod = new Mod($props);
2020

21-
$this->assertTrue(property_exists($mod, 'id'));
21+
$this->assertTrue(property_exists($mod, 'name'));
2222
$this->assertFalse(property_exists($mod, 'extra'));
2323

24-
$this->assertSame('1', $mod->id);
24+
$this->assertSame('foo', $mod->name);
2525
}
2626

2727
public function testModpack()
2828
{
2929
$props = [
30-
'id' => 1,
30+
'name' => 'foo',
3131
'extra' => 'stuff',
3232
];
3333

3434
$modpack = new Modpack($props);
3535

36-
$this->assertTrue(property_exists($modpack, 'id'));
36+
$this->assertTrue(property_exists($modpack, 'name'));
3737
$this->assertFalse(property_exists($modpack, 'extra'));
3838

39-
$this->assertSame('1', $modpack->id);
39+
$this->assertSame('foo', $modpack->name);
4040
}
4141
}

0 commit comments

Comments
 (0)