1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 15:54:03 +00:00

First try at Laravel 8 (#491)

This commit is contained in:
Andre Sayej 2020-09-08 22:11:56 +03:00 committed by GitHub
parent 375380cc7e
commit 36aabb7883
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 9 deletions

View file

@ -17,7 +17,8 @@ jobs:
matrix: matrix:
laravel: [ laravel: [
"^6.0", "^6.0",
"^7.0" "^7.0",
"^8.0"
] ]
steps: steps:

View file

@ -11,16 +11,16 @@
], ],
"require": { "require": {
"ext-json": "*", "ext-json": "*",
"illuminate/support": "^6.0|^7.0", "illuminate/support": "^6.0|^7.0|^8.0",
"facade/ignition-contracts": "^1.0", "facade/ignition-contracts": "^1.0",
"ramsey/uuid": "^3.7|^4.0", "ramsey/uuid": "^3.7|^4.0",
"stancl/jobpipeline": "^1.0", "stancl/jobpipeline": "^1.0",
"stancl/virtualcolumn": "^1.0" "stancl/virtualcolumn": "^1.0"
}, },
"require-dev": { "require-dev": {
"vlucas/phpdotenv": "^3.3|^4.0", "vlucas/phpdotenv": "^3.3|^4.0|^5.0",
"laravel/framework": "^6.0|^7.0", "laravel/framework": "^6.0|^7.0|^8.0",
"orchestra/testbench-browser-kit": "^4.0|^5.0", "orchestra/testbench-browser-kit": "^4.0|^5.0|^6.0",
"league/flysystem-aws-s3-v3": "~1.0", "league/flysystem-aws-s3-v3": "~1.0",
"doctrine/dbal": "^2.10", "doctrine/dbal": "^2.10",
"spatie/valuestore": "^1.2" "spatie/valuestore": "^1.2"

View file

@ -4,6 +4,7 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Commands; namespace Stancl\Tenancy\Commands;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Database\Console\Migrations\MigrateCommand; use Illuminate\Database\Console\Migrations\MigrateCommand;
use Illuminate\Database\Migrations\Migrator; use Illuminate\Database\Migrations\Migrator;
use Stancl\Tenancy\Concerns\DealsWithMigrations; use Stancl\Tenancy\Concerns\DealsWithMigrations;
@ -25,11 +26,12 @@ class Migrate extends MigrateCommand
/** /**
* Create a new command instance. * Create a new command instance.
* *
* @return void * @param Migrator $migrator
* @param Dispatcher $dispatcher
*/ */
public function __construct(Migrator $migrator) public function __construct(Migrator $migrator, Dispatcher $dispatcher)
{ {
parent::__construct($migrator); parent::__construct($migrator, $dispatcher);
$this->setName('tenants:migrate'); $this->setName('tenants:migrate');
$this->specifyParameters(); $this->specifyParameters();

View file

@ -57,7 +57,7 @@ class TenancyServiceProvider extends ServiceProvider
$this->app->bind(Contracts\UniqueIdentifierGenerator::class, $this->app['config']['tenancy.id_generator']); $this->app->bind(Contracts\UniqueIdentifierGenerator::class, $this->app['config']['tenancy.id_generator']);
$this->app->singleton(Commands\Migrate::class, function ($app) { $this->app->singleton(Commands\Migrate::class, function ($app) {
return new Commands\Migrate($app['migrator']); return new Commands\Migrate($app['migrator'], $app['events']);
}); });
$this->app->singleton(Commands\Rollback::class, function ($app) { $this->app->singleton(Commands\Rollback::class, function ($app) {
return new Commands\Rollback($app['migrator']); return new Commands\Rollback($app['migrator']);