Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel 5.8 Compatibility #731

Merged
merged 9 commits into from
Feb 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@
"phpseclib/phpseclib": "~2.0",
"doctrine/dbal": "~2.5",
"ramsey/uuid": "^3.5",
"laravel/framework": "5.7.*"
"laravel/framework": "5.8.*"
},
"require-dev": {
"phpunit/phpunit": "~7.0",
"symfony/dom-crawler": "~3.1",
"laravel/laravel": "5.7.*",
"laravel/laravel": "5.8.*",
"mockery/mockery": "^0.9.9",
"fzaninotto/faker": "^1.8"
"fzaninotto/faker": "^1.8",
"laravel/helpers": "^1.0"
},
"autoload": {
"psr-4": {
Expand Down
5 changes: 2 additions & 3 deletions src/Providers/Tenants/HostnameProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@
use Hyn\Tenancy\Environment;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Support\ServiceProvider;
use Illuminate\Contracts\Support\DeferrableProvider;

class HostnameProvider extends ServiceProvider
class HostnameProvider extends ServiceProvider implements DeferrableProvider
{
public $defer = true;

public function provides()
{
return [
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/DispatchesEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ trait DispatchesEvents
*/
public function emitEvent(AbstractEvent $event, array $payload = [])
{
return app(Dispatcher::class)->fire($event, $payload);
return app(Dispatcher::class)->dispatch($event, $payload);
}
}
4 changes: 2 additions & 2 deletions tests/Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function createApplication()
return $app;
}

protected function setUp()
protected function setUp() : void
{
parent::setUp();

Expand Down Expand Up @@ -127,7 +127,7 @@ protected function pathIdentified(string $path)
// ..
}

protected function tearDown()
protected function tearDown() : void
{
Queue::createPayloadUsing(null);
$this->cleanupTenancy();
Expand Down
3 changes: 2 additions & 1 deletion tests/traits/InteractsWithTenancy.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use Hyn\Tenancy\Models\Hostname;
use Hyn\Tenancy\Models\Website;
use Hyn\Tenancy\Traits\DispatchesEvents;
use Illuminate\Support\Arr;

trait InteractsWithTenancy
{
Expand Down Expand Up @@ -93,7 +94,7 @@ protected function handleTenantDestruction()
}
});
Website::deleted(function (Website $website) {
array_forget($this->tenants, $website->uuid);
Arr::forget($this->tenants, $website->uuid);
});
}

Expand Down
2 changes: 1 addition & 1 deletion tests/unit-tests/Providers/RouteProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ protected function overrideGlobalRoute()
$this->assertEquals('tenant', $route->getName());
}

protected function tearDown()
protected function tearDown() : void
{
unlink(base_path('routes/tenants.php'));

Expand Down