diff --git a/VERSION.txt b/VERSION.txt index 9ee40d95609a..d7896a867fc8 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.1.30 \ No newline at end of file +5.1.31 \ No newline at end of file diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 61c3f3f7ece4..0c908d25a7ee 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -44,7 +44,7 @@ class Kernel extends ConsoleKernel protected function schedule(Schedule $schedule) { - $schedule->job(new VersionCheck)->daily()->withoutOverlapping(); + $schedule->job(new VersionCheck)->daily(); $schedule->command('ninja:check-data')->daily()->withoutOverlapping(); diff --git a/app/Http/Controllers/ConnectedAccountController.php b/app/Http/Controllers/ConnectedAccountController.php index e6ec51c383ac..d74e8c43b0e5 100644 --- a/app/Http/Controllers/ConnectedAccountController.php +++ b/app/Http/Controllers/ConnectedAccountController.php @@ -115,7 +115,6 @@ class ConnectedAccountController extends BaseController $timeout = auth()->user()->company()->default_password_timeout; Cache::put(auth()->user()->hashed_id.'_logged_in', Str::random(64), $timeout); - return $this->itemResponse(auth()->user()); } @@ -126,6 +125,8 @@ class ConnectedAccountController extends BaseController ->header('X-Api-Version', config('ninja.minimum_client_version')); } + + public function handleGmailOauth(Request $request) { @@ -162,6 +163,8 @@ class ConnectedAccountController extends BaseController auth()->user()->email_verified_at = now(); auth()->user()->save(); + $this->activateGmail(auth()->user()); + return $this->itemResponse(auth()->user()); } @@ -172,4 +175,19 @@ class ConnectedAccountController extends BaseController ->header('X-Api-Version', config('ninja.minimum_client_version')); } + + private function activateGmail(User $user) + { + $company = $user->company(); + $settings = $company->settings; + + if($settings->email_sending_method == 'default') + { + $settings->email_sending_method = 'gmail'; + $settings->gmail_sending_user_id = (string)$user->hashed_id; + + $company->settings = $settings; + $company->save(); + } + } } diff --git a/app/Http/Controllers/SubdomainController.php b/app/Http/Controllers/SubdomainController.php new file mode 100644 index 000000000000..73733e382c7c --- /dev/null +++ b/app/Http/Controllers/SubdomainController.php @@ -0,0 +1,39 @@ +input('subdomain')); + + if($subdomain_exists) + return response()->json(['message' => 'Domain not available'] , 401); + + return response()->json(['message' => 'Domain available'], 200); + } + +} diff --git a/app/Http/Livewire/BillingPortalPurchase.php b/app/Http/Livewire/BillingPortalPurchase.php index e8ae73290987..7632e28f9dd9 100644 --- a/app/Http/Livewire/BillingPortalPurchase.php +++ b/app/Http/Livewire/BillingPortalPurchase.php @@ -283,13 +283,16 @@ class BillingPortalPurchase extends Component ->createInvoice($data) ->service() ->markSent() + ->fillDefaults() ->save(); Cache::put($this->hash, [ 'billing_subscription_id' => $this->billing_subscription->id, 'email' => $this->email ?? $this->contact->email, 'client_id' => $this->contact->client->id, - 'invoice_id' => $this->invoice->id], + 'invoice_id' => $this->invoice->id, + 'quantity' => $this->quantity, + 'subscription_id' => $this->billing_subscription->id, now()->addMinutes(60) ); diff --git a/app/Jobs/RecurringInvoice/SendRecurring.php b/app/Jobs/RecurringInvoice/SendRecurring.php index 843c722d1d6c..8dac7d6cfc5f 100644 --- a/app/Jobs/RecurringInvoice/SendRecurring.php +++ b/app/Jobs/RecurringInvoice/SendRecurring.php @@ -63,6 +63,7 @@ class SendRecurring implements ShouldQueue ->markSent() ->applyNumber() ->createInvitations() + ->fillDefaults() ->save(); nlog("Invoice {$invoice->number} created"); diff --git a/app/Jobs/Util/Import.php b/app/Jobs/Util/Import.php index b60c210d6c66..6a06eac4446a 100644 --- a/app/Jobs/Util/Import.php +++ b/app/Jobs/Util/Import.php @@ -424,7 +424,10 @@ class Import implements ShouldQueue unset($modified['password']); //cant import passwords. $user = $user_repository->save($modified, $this->fetchUser($resource['email']), true, true); - + $user->email_verified_at = now(); + $user->confirmation_code = ''; + $user->save(); + $user_agent = array_key_exists('token_name', $resource) ?: request()->server('HTTP_USER_AGENT'); CreateCompanyToken::dispatchNow($this->company, $user, $user_agent); diff --git a/app/Mail/Engine/QuoteEmailEngine.php b/app/Mail/Engine/QuoteEmailEngine.php index 9d85d8b68dc3..548728bb124b 100644 --- a/app/Mail/Engine/QuoteEmailEngine.php +++ b/app/Mail/Engine/QuoteEmailEngine.php @@ -11,6 +11,7 @@ namespace App\Mail\Engine; +use App\Models\Account; use App\Utils\HtmlEngine; use App\Utils\Number; diff --git a/app/Services/BillingSubscription/BillingSubscriptionService.php b/app/Services/BillingSubscription/BillingSubscriptionService.php index c030678d381c..9cf918d99dc2 100644 --- a/app/Services/BillingSubscription/BillingSubscriptionService.php +++ b/app/Services/BillingSubscription/BillingSubscriptionService.php @@ -13,23 +13,29 @@ namespace App\Services\BillingSubscription; use App\DataMapper\InvoiceItem; use App\Factory\InvoiceFactory; +use App\Factory\InvoiceToRecurringInvoiceFactory; use App\Jobs\Util\SystemLogger; use App\Models\BillingSubscription; +use App\Models\ClientContact; use App\Models\ClientSubscription; +use App\Models\Invoice; use App\Models\PaymentHash; use App\Models\Product; use App\Models\SystemLog; use App\Repositories\InvoiceRepository; +use App\Utils\Traits\CleanLineItems; use App\Utils\Traits\MakesHash; use GuzzleHttp\RequestOptions; class BillingSubscriptionService { use MakesHash; + use CleanLineItems; - /** @var BillingSubscription */ + /** @var billing_subscription */ private $billing_subscription; + /** @var client_subscription */ private $client_subscription; public function __construct(BillingSubscription $billing_subscription) @@ -41,7 +47,7 @@ class BillingSubscriptionService { if (!property_exists($payment_hash, 'billing_context')) { - return; + throw new \Exception("Illegal entrypoint into method, payload must contain billing context"); } // At this point we have some state carried from the billing page @@ -55,32 +61,46 @@ class BillingSubscriptionService } + /** + 'email' => $this->email ?? $this->contact->email, + 'quantity' => $this->quantity, + 'contact_id' => $this->contact->id, + */ public function startTrial(array $data) { // Redirects from here work just fine. Livewire will respect it. - // Some magic here.. + if(!$this->billing_subscription->trial_enabled) + return new \Exception("Trials are disabled for this product"); - return redirect('/trial-started'); + $contact = ClientContact::with('client')->find($data['contact_id']); + + $cs = new ClientSubscription(); + $cs->subscription_id = $this->billing_subscription->id; + $cs->company_id = $this->billing_subscription->company_id; + $cs->trial_started = time(); + $cs->trial_duration = time() + $this->billing_subscription->trial_duration; + $cs->quantity = $data['quantity']; + $cs->client_id = $contact->client->id; + $cs->save(); + + $this->client_subscription = $cs; + + //execute any webhooks + $this->triggerWebhook(); + + if(strlen($this->billing_subscription->webhook_configuration->post_purchase_url) >=1) + return redirect($this->billing_subscription->webhook_configuration->post_purchase_url); + + return redirect('/client/subscription/'.$cs->hashed_id); } public function createInvoice($data): ?\App\Models\Invoice { + $invoice_repo = new InvoiceRepository(); - $data['line_items'] = $this->createLineItems($data); - - /* - If trial_enabled -> return early - - -- what we need to know that we don't already - -- Has a promo code been entered, and does it match - -- Is this a recurring subscription - -- - - 1. Is this a recurring product? - 2. What is the quantity? ie is this a multi seat product ( does this mean we need this value stored in the client sub?) - */ + $data['line_items'] = $this->cleanItems($this->createLineItems($data)); return $invoice_repo->save($data, InvoiceFactory::create($this->billing_subscription->company_id, $this->billing_subscription->user_id)); @@ -92,6 +112,7 @@ class BillingSubscriptionService */ private function createLineItems($data): array { + $line_items = []; $product = $this->billing_subscription->product; @@ -122,6 +143,7 @@ class BillingSubscriptionService $line_items[] = $this->createPromoLine($data); return $line_items; + } /** @@ -164,42 +186,43 @@ class BillingSubscriptionService private function convertInvoiceToRecurring($payment_hash) { //The first invoice is a plain invoice - the second is fired on the recurring schedule. + $invoice = Invoice::find($payment_hash->billing_context->invoice_id); + + if(!$invoice) + throw new \Exception("Could not match an invoice for payment of billing subscription"); + + //todo - need to remove the promo code - if it exists + return InvoiceToRecurringInvoiceFactory::create($invoice); + } public function createClientSubscription($payment_hash) { - //create the client subscription record - //are we in a trial phase? - //has money been paid? //is this a recurring or one off subscription. $cs = new ClientSubscription(); $cs->subscription_id = $this->billing_subscription->id; $cs->company_id = $this->billing_subscription->company_id; - //if is_trial - //$cs->trial_started = time(); - //$cs->trial_duration = time() + duration period in seconds - - //trials will not have any monies paid. - - //if a payment has been made - //$cs->invoice_id = xx + $cs->invoice_id = $payment_hash->billing_context->invoice_id; + $cs->client_id = $payment_hash->billing_context->client_id; + $cs->quantity = $payment_hash->billing_context->quantity; //if is_recurring //create recurring invoice from invoice + if($this->billing_subscription->is_recurring) + { $recurring_invoice = $this->convertInvoiceToRecurring($payment_hash); $recurring_invoice->frequency_id = $this->billing_subscription->frequency_id; $recurring_invoice->next_send_date = $recurring_invoice->nextDateByFrequency(now()->format('Y-m-d')); - //$cs->recurring_invoice_id = $recurring_invoice->id; + $recurring_invoice->save(); + $cs->recurring_invoice_id = $recurring_invoice->id; //?set the recurring invoice as active - set the date here also based on the frequency? + $recurring_invoice->service()->start(); + } - //$cs->quantity = xx - - // client_id - //$cs->client_id = xx $cs->save(); @@ -207,16 +230,14 @@ class BillingSubscriptionService } - public function triggerWebhook($payment_hash) + public function triggerWebhook() { //hit the webhook to after a successful onboarding - //$client = xxxxxxx - //todo webhook - + $body = [ 'billing_subscription' => $this->billing_subscription, 'client_subscription' => $this->client_subscription, - // 'client' => $client->toArray(), + 'client' => $this->client_subscription->client->toArray(), ]; @@ -231,7 +252,7 @@ class BillingSubscriptionService SystemLog::CATEGORY_WEBHOOK, SystemLog::EVENT_WEBHOOK_RESPONSE, SystemLog::TYPE_WEBHOOK_RESPONSE, - //$client, + $this->client_subscription->client, ); } diff --git a/app/Utils/Traits/CleanLineItems.php b/app/Utils/Traits/CleanLineItems.php index b9cb852db1f0..46e02aa15f25 100644 --- a/app/Utils/Traits/CleanLineItems.php +++ b/app/Utils/Traits/CleanLineItems.php @@ -28,7 +28,7 @@ trait CleanLineItems $cleaned_items = []; foreach ($items as $item) { - $cleaned_items[] = $this->cleanLineItem($item); + $cleaned_items[] = $this->cleanLineItem((array)$item); } return $cleaned_items; diff --git a/composer.lock b/composer.lock index ff823c82b0e2..bd215d815783 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "113acad46f6d9eea9f9f5bd4501428d1", + "content-hash": "2307a2f3214da0d1cc772cc1a1405682", "packages": [ { "name": "authorizenet/authorizenet", @@ -55,16 +55,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.173.28", + "version": "3.175.1", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "593baa5930896bb443c437032daf4016e1e3878d" + "reference": "fce65d31f033c39cd3615fd2d3e503e212d81a3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/593baa5930896bb443c437032daf4016e1e3878d", - "reference": "593baa5930896bb443c437032daf4016e1e3878d", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/fce65d31f033c39cd3615fd2d3e503e212d81a3e", + "reference": "fce65d31f033c39cd3615fd2d3e503e212d81a3e", "shasum": "" }, "require": { @@ -139,9 +139,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.173.28" + "source": "https://github.com/aws/aws-sdk-php/tree/3.175.1" }, - "time": "2021-03-12T19:29:55+00:00" + "time": "2021-03-22T18:13:37+00:00" }, { "name": "bacon/bacon-qr-code", @@ -198,16 +198,16 @@ }, { "name": "beganovich/snappdf", - "version": "v1.5.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/beganovich/snappdf.git", - "reference": "63ad3f1a0eec7bffc3a3c85f286769fca9a33fd5" + "reference": "5c0a7e2e2c33441c0dd9d1fcbfc8de71c3cc920c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/beganovich/snappdf/zipball/63ad3f1a0eec7bffc3a3c85f286769fca9a33fd5", - "reference": "63ad3f1a0eec7bffc3a3c85f286769fca9a33fd5", + "url": "https://api.github.com/repos/beganovich/snappdf/zipball/5c0a7e2e2c33441c0dd9d1fcbfc8de71c3cc920c", + "reference": "5c0a7e2e2c33441c0dd9d1fcbfc8de71c3cc920c", "shasum": "" }, "require": { @@ -245,9 +245,9 @@ "description": "Convert webpages or HTML into the PDF file using Chromium or Google Chrome.", "support": { "issues": "https://github.com/beganovich/snappdf/issues", - "source": "https://github.com/beganovich/snappdf/tree/v1.5.0" + "source": "https://github.com/beganovich/snappdf/tree/v1.6.0" }, - "time": "2021-01-10T17:06:47+00:00" + "time": "2021-03-19T21:20:07+00:00" }, { "name": "brick/math", @@ -2010,16 +2010,16 @@ }, { "name": "google/apiclient-services", - "version": "v0.163.0", + "version": "v0.165.0", "source": { "type": "git", "url": "https://github.com/googleapis/google-api-php-client-services.git", - "reference": "8e326f378a1f505064912fddd19fd93bbdcc80fb" + "reference": "c8d7ff2c9cb6cad6e88bc5825491c47b8b2e52fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/8e326f378a1f505064912fddd19fd93bbdcc80fb", - "reference": "8e326f378a1f505064912fddd19fd93bbdcc80fb", + "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/c8d7ff2c9cb6cad6e88bc5825491c47b8b2e52fd", + "reference": "c8d7ff2c9cb6cad6e88bc5825491c47b8b2e52fd", "shasum": "" }, "require": { @@ -2045,9 +2045,9 @@ ], "support": { "issues": "https://github.com/googleapis/google-api-php-client-services/issues", - "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.163.0" + "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.165.0" }, - "time": "2021-03-06T12:20:02+00:00" + "time": "2021-03-21T11:20:02+00:00" }, { "name": "google/auth", @@ -2331,16 +2331,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.7.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3" + "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3", - "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/35ea11d335fd638b5882ff1725228b3d35496ab1", + "reference": "35ea11d335fd638b5882ff1725228b3d35496ab1", "shasum": "" }, "require": { @@ -2400,9 +2400,9 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.7.0" + "source": "https://github.com/guzzle/psr7/tree/1.8.1" }, - "time": "2020-09-30T07:37:11+00:00" + "time": "2021-03-21T16:25:00+00:00" }, { "name": "hashids/hashids", @@ -2783,16 +2783,16 @@ }, { "name": "laravel/framework", - "version": "v8.32.1", + "version": "v8.33.1", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "7c37b64f8153c16b6406f5c28cf37828ebbe8846" + "reference": "354c57b8cb457549114074c500944455a288d6cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/7c37b64f8153c16b6406f5c28cf37828ebbe8846", - "reference": "7c37b64f8153c16b6406f5c28cf37828ebbe8846", + "url": "https://api.github.com/repos/laravel/framework/zipball/354c57b8cb457549114074c500944455a288d6cc", + "reference": "354c57b8cb457549114074c500944455a288d6cc", "shasum": "" }, "require": { @@ -2947,7 +2947,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-03-09T15:37:45+00:00" + "time": "2021-03-16T19:42:32+00:00" }, { "name": "laravel/slack-notification-channel", @@ -3845,16 +3845,16 @@ }, { "name": "livewire/livewire", - "version": "v2.4.0", + "version": "v2.4.1", "source": { "type": "git", "url": "https://github.com/livewire/livewire.git", - "reference": "8055af7730938cd607616fde122825ed960a9b71" + "reference": "b0cb782674673a67ddfd5910d2fcb5308bb32857" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/livewire/livewire/zipball/8055af7730938cd607616fde122825ed960a9b71", - "reference": "8055af7730938cd607616fde122825ed960a9b71", + "url": "https://api.github.com/repos/livewire/livewire/zipball/b0cb782674673a67ddfd5910d2fcb5308bb32857", + "reference": "b0cb782674673a67ddfd5910d2fcb5308bb32857", "shasum": "" }, "require": { @@ -3905,7 +3905,7 @@ "description": "A front-end framework for Laravel.", "support": { "issues": "https://github.com/livewire/livewire/issues", - "source": "https://github.com/livewire/livewire/tree/v2.4.0" + "source": "https://github.com/livewire/livewire/tree/v2.4.1" }, "funding": [ { @@ -3913,7 +3913,7 @@ "type": "github" } ], - "time": "2021-02-23T17:44:50+00:00" + "time": "2021-03-22T14:03:36+00:00" }, { "name": "maennchen/zipstream-php", @@ -6919,16 +6919,16 @@ }, { "name": "stripe/stripe-php", - "version": "v7.75.0", + "version": "v7.76.0", "source": { "type": "git", "url": "https://github.com/stripe/stripe-php.git", - "reference": "d377a667cd789b99ccab768441a5a2160cc4ea80" + "reference": "47e66d4186712be33c593fe820dccf270a04d5d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/stripe/stripe-php/zipball/d377a667cd789b99ccab768441a5a2160cc4ea80", - "reference": "d377a667cd789b99ccab768441a5a2160cc4ea80", + "url": "https://api.github.com/repos/stripe/stripe-php/zipball/47e66d4186712be33c593fe820dccf270a04d5d6", + "reference": "47e66d4186712be33c593fe820dccf270a04d5d6", "shasum": "" }, "require": { @@ -6974,9 +6974,9 @@ ], "support": { "issues": "https://github.com/stripe/stripe-php/issues", - "source": "https://github.com/stripe/stripe-php/tree/v7.75.0" + "source": "https://github.com/stripe/stripe-php/tree/v7.76.0" }, - "time": "2021-02-22T14:31:21+00:00" + "time": "2021-03-22T16:50:21+00:00" }, { "name": "swiftmailer/swiftmailer", @@ -9664,16 +9664,16 @@ }, { "name": "turbo124/beacon", - "version": "1.0.6", + "version": "1.0.7", "source": { "type": "git", "url": "https://github.com/turbo124/beacon.git", - "reference": "2f38612c1bb4c292d154c8fba478bdf8c019fcd9" + "reference": "d48227fdfafc463cce055f36b149f9cb1d9b8f81" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/turbo124/beacon/zipball/2f38612c1bb4c292d154c8fba478bdf8c019fcd9", - "reference": "2f38612c1bb4c292d154c8fba478bdf8c019fcd9", + "url": "https://api.github.com/repos/turbo124/beacon/zipball/d48227fdfafc463cce055f36b149f9cb1d9b8f81", + "reference": "d48227fdfafc463cce055f36b149f9cb1d9b8f81", "shasum": "" }, "require": { @@ -9721,9 +9721,9 @@ "turbo124" ], "support": { - "source": "https://github.com/turbo124/beacon/tree/1.0.6" + "source": "https://github.com/turbo124/beacon/tree/1.0.7" }, - "time": "2021-03-09T09:25:50+00:00" + "time": "2021-03-23T09:54:29+00:00" }, { "name": "vlucas/phpdotenv", @@ -9881,30 +9881,35 @@ }, { "name": "webmozart/assert", - "version": "1.9.1", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0 || ^8.0", + "php": "^7.2 || ^8.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<3.9.1" + "vimeo/psalm": "<4.6.1 || 4.6.2" }, "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" + "phpunit/phpunit": "^8.5.13" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" @@ -9928,9 +9933,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.9.1" + "source": "https://github.com/webmozarts/assert/tree/1.10.0" }, - "time": "2020-07-08T17:02:28+00:00" + "time": "2021-03-09T10:59:23+00:00" }, { "name": "webpatser/laravel-countries", @@ -11079,16 +11084,16 @@ }, { "name": "filp/whoops", - "version": "2.9.2", + "version": "2.11.0", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "df7933820090489623ce0be5e85c7e693638e536" + "reference": "f6e14679f948d8a5cfb866fa7065a30c66bd64d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/df7933820090489623ce0be5e85c7e693638e536", - "reference": "df7933820090489623ce0be5e85c7e693638e536", + "url": "https://api.github.com/repos/filp/whoops/zipball/f6e14679f948d8a5cfb866fa7065a30c66bd64d3", + "reference": "f6e14679f948d8a5cfb866fa7065a30c66bd64d3", "shasum": "" }, "require": { @@ -11138,7 +11143,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.9.2" + "source": "https://github.com/filp/whoops/tree/2.11.0" }, "funding": [ { @@ -11146,20 +11151,20 @@ "type": "github" } ], - "time": "2021-01-24T12:00:00+00:00" + "time": "2021-03-19T12:00:00+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v2.18.3", + "version": "v2.18.4", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "ab99202fccff2a9f97592fbe1b5c76dd06df3513" + "reference": "06f764e3cb6d60822d8f5135205f9d32b5508a31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/ab99202fccff2a9f97592fbe1b5c76dd06df3513", - "reference": "ab99202fccff2a9f97592fbe1b5c76dd06df3513", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/06f764e3cb6d60822d8f5135205f9d32b5508a31", + "reference": "06f764e3cb6d60822d8f5135205f9d32b5508a31", "shasum": "" }, "require": { @@ -11242,7 +11247,7 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", - "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.18.3" + "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.18.4" }, "funding": [ { @@ -11250,7 +11255,7 @@ "type": "github" } ], - "time": "2021-03-10T19:39:05+00:00" + "time": "2021-03-20T14:52:33+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -12016,16 +12021,16 @@ }, { "name": "phpspec/prophecy", - "version": "1.12.2", + "version": "1.13.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "245710e971a030f42e08f4912863805570f23d39" + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/245710e971a030f42e08f4912863805570f23d39", - "reference": "245710e971a030f42e08f4912863805570f23d39", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", "shasum": "" }, "require": { @@ -12077,9 +12082,9 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.12.2" + "source": "https://github.com/phpspec/prophecy/tree/1.13.0" }, - "time": "2020-12-19T10:15:11+00:00" + "time": "2021-03-17T13:42:18+00:00" }, { "name": "phpunit/php-code-coverage", @@ -12401,16 +12406,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.2", + "version": "9.5.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f661659747f2f87f9e72095bb207bceb0f151cb4" + "reference": "c73c6737305e779771147af66c96ca6a7ed8a741" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f661659747f2f87f9e72095bb207bceb0f151cb4", - "reference": "f661659747f2f87f9e72095bb207bceb0f151cb4", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c73c6737305e779771147af66c96ca6a7ed8a741", + "reference": "c73c6737305e779771147af66c96ca6a7ed8a741", "shasum": "" }, "require": { @@ -12488,7 +12493,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.2" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.4" }, "funding": [ { @@ -12500,7 +12505,7 @@ "type": "github" } ], - "time": "2021-02-02T14:45:58+00:00" + "time": "2021-03-23T07:16:29+00:00" }, { "name": "sebastian/cli-parser", @@ -13468,16 +13473,16 @@ }, { "name": "swagger-api/swagger-ui", - "version": "v3.45.0", + "version": "v3.45.1", "source": { "type": "git", "url": "https://github.com/swagger-api/swagger-ui.git", - "reference": "1ba7af074f97c872a64a415e0507c11cf8f3601b" + "reference": "72506e581f860244f3c74de5a2fb9809e53d1876" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swagger-api/swagger-ui/zipball/1ba7af074f97c872a64a415e0507c11cf8f3601b", - "reference": "1ba7af074f97c872a64a415e0507c11cf8f3601b", + "url": "https://api.github.com/repos/swagger-api/swagger-ui/zipball/72506e581f860244f3c74de5a2fb9809e53d1876", + "reference": "72506e581f860244f3c74de5a2fb9809e53d1876", "shasum": "" }, "type": "library", @@ -13523,9 +13528,9 @@ ], "support": { "issues": "https://github.com/swagger-api/swagger-ui/issues", - "source": "https://github.com/swagger-api/swagger-ui/tree/v3.45.0" + "source": "https://github.com/swagger-api/swagger-ui/tree/v3.45.1" }, - "time": "2021-03-11T17:20:14+00:00" + "time": "2021-03-19T17:14:16+00:00" }, { "name": "symfony/debug", @@ -13853,20 +13858,20 @@ }, { "name": "vimeo/psalm", - "version": "4.6.2", + "version": "4.6.4", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "bca09d74adc704c4eaee36a3c3e9d379e290fc3b" + "reference": "97fe86c4e158b5a57c5150aa5055c38b5a809aab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/bca09d74adc704c4eaee36a3c3e9d379e290fc3b", - "reference": "bca09d74adc704c4eaee36a3c3e9d379e290fc3b", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/97fe86c4e158b5a57c5150aa5055c38b5a809aab", + "reference": "97fe86c4e158b5a57c5150aa5055c38b5a809aab", "shasum": "" }, "require": { - "amphp/amp": "^2.1", + "amphp/amp": "^2.4.2", "amphp/byte-stream": "^1.5", "composer/package-versions-deprecated": "^1.8.0", "composer/semver": "^1.4 || ^2.0 || ^3.0", @@ -13892,7 +13897,6 @@ "psalm/psalm": "self.version" }, "require-dev": { - "amphp/amp": "^2.4.2", "bamarni/composer-bin-plugin": "^1.2", "brianium/paratest": "^4.0||^6.0", "ext-curl": "*", @@ -13952,9 +13956,9 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.6.2" + "source": "https://github.com/vimeo/psalm/tree/4.6.4" }, - "time": "2021-02-26T02:24:18+00:00" + "time": "2021-03-16T23:28:18+00:00" }, { "name": "webmozart/path-util", @@ -14092,7 +14096,7 @@ "ext-libxml": "*" }, "platform-dev": { - "php": "^7.4" + "php": "^7.3|^7.4" }, "plugin-api-version": "2.0.0" } diff --git a/config/ninja.php b/config/ninja.php index bb8873be6194..6119b502a178 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -13,7 +13,7 @@ return [ 'require_https' => env('REQUIRE_HTTPS', true), 'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_domain' => env('APP_DOMAIN', ''), - 'app_version' => '5.1.30', + 'app_version' => '5.1.31', 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', false), diff --git a/public/assets/packages/material_design_icons_flutter/lib/fonts/materialdesignicons-webfont.ttf b/public/assets/packages/material_design_icons_flutter/lib/fonts/materialdesignicons-webfont.ttf old mode 100755 new mode 100644 index 55456295b3f1..761dfaf8a6bf Binary files a/public/assets/packages/material_design_icons_flutter/lib/fonts/materialdesignicons-webfont.ttf and b/public/assets/packages/material_design_icons_flutter/lib/fonts/materialdesignicons-webfont.ttf differ diff --git a/routes/api.php b/routes/api.php index 26136e5009ee..7038fa7856ee 100644 --- a/routes/api.php +++ b/routes/api.php @@ -24,6 +24,7 @@ Route::group(['middleware' => ['api_secret_check', 'email_db']], function () { }); Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'api/v1', 'as' => 'api.'], function () { + Route::post('check_subdomain', 'SubdomainController@index')->name('check_subdomain'); Route::get('ping', 'PingController@index')->name('ping'); Route::get('health_check', 'PingController@health')->name('health_check');