Page MenuHomePhorge

D3173.id.diff
No OneTemporary

D3173.id.diff

diff --git a/src/app/Tenant.php b/src/app/Tenant.php
--- a/src/app/Tenant.php
+++ b/src/app/Tenant.php
@@ -20,7 +20,6 @@
'title',
];
- protected $keyType = 'bigint';
/**
* Utility method to get tenant-specific system setting.
diff --git a/src/app/Traits/UuidIntKeyTrait.php b/src/app/Traits/UuidIntKeyTrait.php
--- a/src/app/Traits/UuidIntKeyTrait.php
+++ b/src/app/Traits/UuidIntKeyTrait.php
@@ -38,14 +38,4 @@
{
return false;
}
-
- /**
- * Get the key type.
- *
- * @return string
- */
- public function getKeyType()
- {
- return 'bigint';
- }
}
diff --git a/src/resources/js/locale.js b/src/resources/js/locale.js
--- a/src/resources/js/locale.js
+++ b/src/resources/js/locale.js
@@ -30,7 +30,7 @@
// Save the selected language in a cookie, so it can be used server-side
// after page reload. Make the cookie valid for 10 years
const age = 10 * 60 * 60 * 24 * 365
- document.cookie = 'language=' + lang + '; max-age=' + age
+ document.cookie = 'language=' + lang + '; max-age=' + age + '; path=/; secure'
return lang
}
diff --git a/src/tests/Feature/Console/Wallet/ChargeTest.php b/src/tests/Feature/Console/Wallet/ChargeTest.php
--- a/src/tests/Feature/Console/Wallet/ChargeTest.php
+++ b/src/tests/Feature/Console/Wallet/ChargeTest.php
@@ -69,7 +69,7 @@
Queue::fake();
// The wallet has entitlements to charge, and negative balance
- $sku = \App\Sku::where('title', 'mailbox')->first();
+ $sku = \App\Sku::withObjectTenantContext($user)->where('title', 'mailbox')->first();
$entitlement = \App\Entitlement::create([
'wallet_id' => $wallet->id,
'sku_id' => $sku->id,
@@ -78,12 +78,12 @@
'entitleable_type' => \App\User::class,
]);
\App\Entitlement::where('id', $entitlement->id)->update([
- 'created_at' => \Carbon\Carbon::now()->subMonths(1),
- 'updated_at' => \Carbon\Carbon::now()->subMonths(1),
+ 'created_at' => \Carbon\Carbon::now()->subMonthsNoOverflow(1),
+ 'updated_at' => \Carbon\Carbon::now()->subMonthsNoOverflow(1),
]);
\App\User::where('id', $user->id)->update([
- 'created_at' => \Carbon\Carbon::now()->subMonths(1),
- 'updated_at' => \Carbon\Carbon::now()->subMonths(1),
+ 'created_at' => \Carbon\Carbon::now()->subMonthsNoOverflow(1),
+ 'updated_at' => \Carbon\Carbon::now()->subMonthsNoOverflow(1),
]);
$this->assertSame(100, $wallet->fresh()->chargeEntitlements(false));

File Metadata

Mime Type
text/plain
Expires
Mon, Oct 28, 1:40 PM (21 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
10048635
Default Alt Text
D3173.id.diff (2 KB)

Event Timeline