Skip to content

Commit d466934

Browse files
authored
Laravel Sail (pterodactyl#4508)
1 parent 846ff76 commit d466934

File tree

7 files changed

+116
-54
lines changed

7 files changed

+116
-54
lines changed

.env.ci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ APP_ENVIRONMENT_ONLY=true
88

99
DB_CONNECTION=mysql
1010
DB_HOST=127.0.0.1
11-
DB_DATABASE=panel_test
11+
DB_DATABASE=testing
1212
DB_USERNAME=root
1313
DB_PASSWORD=
1414

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
image: ${{ matrix.database }}
2525
env:
2626
MYSQL_ALLOW_EMPTY_PASSWORD: yes
27-
MYSQL_DATABASE: panel_test
27+
MYSQL_DATABASE: testing
2828
ports:
2929
- 3306
3030
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

bootstrap/cache/.gitignore

100755100644
File mode changed.

bootstrap/tests.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
22

3+
use Illuminate\Support\Str;
34
use NunoMaduro\Collision\Provider;
45
use Illuminate\Contracts\Console\Kernel;
56
use Symfony\Component\Console\Output\ConsoleOutput;
@@ -23,7 +24,7 @@
2324
$output = new ConsoleOutput();
2425

2526
$prefix = 'database.connections.' . config('database.default');
26-
if (config("$prefix.database") !== 'panel_test') {
27+
if (!Str::contains(config("$prefix.database"), 'test')) {
2728
$output->writeln(PHP_EOL . '<error>Cannot run test process against non-testing database.</error>');
2829
$output->writeln(PHP_EOL . '<error>Environment is currently pointed at: "' . config("$prefix.database") . '".</error>');
2930
exit(1);

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
}
1818
],
1919
"require": {
20-
"php": "^8.0.2 || ^8.1",
20+
"php": "^8.0.2 || ^8.1 || ^8.2",
2121
"ext-json": "*",
2222
"ext-mbstring": "*",
2323
"ext-pdo": "*",
@@ -58,6 +58,7 @@
5858
"fakerphp/faker": "~1.20",
5959
"friendsofphp/php-cs-fixer": "~3.11",
6060
"itsgoingd/clockwork": "~5.1",
61+
"laravel/sail": "~1.16",
6162
"mockery/mockery": "~1.5",
6263
"nunomaduro/collision": "~6.3",
6364
"php-mock/php-mock-phpunit": "~2.6",

0 commit comments

Comments
 (0)