Bump php to ^8.0, add tooling, linting, fixes

This commit is contained in:
Ismo Vuorinen
2024-12-11 12:58:22 +02:00
parent e12085be2c
commit aec5ec026a
30 changed files with 4467 additions and 2018 deletions

View File

@@ -7,25 +7,30 @@ use Illuminate\Support\Facades\Schema;
class TestCase extends \Orchestra\Testbench\TestCase
{
protected function getEnvironmentSetUp($app)
/** @psalm-suppress PropertyNotSetInConstructor */
public string $testDataPath;
protected function getEnvironmentSetUp($app): void
{
$app['config']->set('database.default', 'testdb');
$app['config']->set('database.connections.testdb', [
'driver' => 'sqlite',
'driver' => 'sqlite',
'database' => ':memory:',
]);
$this->testDataPath = __DIR__.'/test-data';
}
protected function setUp(): void
{
parent::setUp();
Schema::create('supervisors', function (Blueprint $table) {
Schema::create('supervisors', static function (Blueprint $table): void {
$table->increments('id');
$table->string('name');
});
Schema::create('roles', function (Blueprint $table) {
Schema::create('roles', static function (Blueprint $table): void {
$table->increments('id');
$table->string('slug');
$table->unsignedInteger('supervisor_id')->nullable();