Skip to content

Commit 9d3dca8

Browse files
committed
Begin moving packs to new service mechanisms, refactor exceptions for services
1 parent 46cb71e commit 9d3dca8

File tree

62 files changed

+492
-303
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+492
-303
lines changed

.dev/vagrant/motd.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ Default panel users:
1313

1414
MySQL is accessible using root/pterodactyl or pterodactyl/pterodactyl
1515

16-
Services for pteroq and mailhog are running
16+
Service for pteroq and mailhog are running
1717
#####################################################

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ dist: trusty
33
php:
44
- '7.0'
55
- '7.1'
6+
- '7.2'
67
sudo: false
78
cache:
89
directories:

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ spatie/laravel-fractal (4.0.0 => 4.0.1)
245245
* New theme applied to Admin CP. Many graphical changes were made, some data was moved around and some display data changed. Too much was changed to feasibly log it all in here. Major breaking changes or notable new features will be logged.
246246
* New server creation page now makes significantly less AJAX calls and is much quicker to respond.
247247
* Server and Node view pages wee modified to split tabs into individual pages to make re-themeing and modifications significantly easier, and reduce MySQL query loads on page.
248-
* `[pre.4]`Services and Pack magement overhauled to be faster, cleaner, and more extensible in the future.
248+
* `[pre.4]`Service and Pack magement overhauled to be faster, cleaner, and more extensible in the future.
249249
* Most of the backend `UnhandledException` display errors now include a clearer error that directs admins to the program's logs.
250250
* Table seeders for services now can be run during upgrades and will attempt to locate and update, or create new if not found in the database.
251251
* Many structural changes to the database and `Pterodactyl\Models` classes that would flood this changelog if they were all included. All required migrations included to handle database changes.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
/*
3+
* Pterodactyl - Panel
4+
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
25+
namespace Pterodactyl\Contracts\Repository;
26+
27+
use Pterodactyl\Contracts\Repository\Attributes\SearchableInterface;
28+
29+
interface PackRepositoryInterface extends RepositoryInterface, SearchableInterface
30+
{
31+
/**
32+
* Return all of the file archives for a given pack.
33+
*
34+
* @param int $id
35+
* @param bool $collection
36+
* @return object|\Illuminate\Support\Collection
37+
*/
38+
public function getFileArchives($id, $collection = false);
39+
}

app/Exceptions/Services/HasActiveServersException.php renamed to app/Exceptions/Service/HasActiveServersException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* SOFTWARE.
2323
*/
2424

25-
namespace Pterodactyl\Exceptions\Services;
25+
namespace Pterodactyl\Exceptions\Service;
2626

2727
class HasActiveServersException extends \Exception
2828
{
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
/*
3+
* Pterodactyl - Panel
4+
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
25+
namespace Pterodactyl\Exceptions\Service\Pack;
26+
27+
class InvalidFileMimeTypeException extends \Exception
28+
{
29+
//
30+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
/*
3+
* Pterodactyl - Panel
4+
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
25+
namespace Pterodactyl\Exceptions\Service\Pack;
26+
27+
class InvalidFileUploadException extends \Exception
28+
{
29+
//
30+
}

app/Exceptions/Services/Server/RequiredVariableMissingException.php renamed to app/Exceptions/Service/Server/RequiredVariableMissingException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* SOFTWARE.
2323
*/
2424

25-
namespace Pterodactyl\Exceptions\Services\Server;
25+
namespace Pterodactyl\Exceptions\Service\Server;
2626

2727
use Exception;
2828

app/Exceptions/Services/ServiceOption/InvalidCopyFromException.php renamed to app/Exceptions/Service/ServiceOption/InvalidCopyFromException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* SOFTWARE.
2323
*/
2424

25-
namespace Pterodactyl\Exceptions\Services\ServiceOption;
25+
namespace Pterodactyl\Exceptions\Service\ServiceOption;
2626

2727
class InvalidCopyFromException extends \Exception
2828
{

app/Exceptions/Services/ServiceOption/NoParentConfigurationFoundException.php renamed to app/Exceptions/Service/ServiceOption/NoParentConfigurationFoundException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* SOFTWARE.
2323
*/
2424

25-
namespace Pterodactyl\Exceptions\Services\ServiceOption;
25+
namespace Pterodactyl\Exceptions\Service\ServiceOption;
2626

2727
class NoParentConfigurationFoundException extends \Exception
2828
{

0 commit comments

Comments
 (0)