diff --git a/app/Http/Controllers/BaseController.php b/app/Http/Controllers/BaseController.php index fc2c783e3102..bad4f90c691b 100644 --- a/app/Http/Controllers/BaseController.php +++ b/app/Http/Controllers/BaseController.php @@ -207,7 +207,7 @@ class BaseController extends Controller $query->whereNotNull('updated_at')->with('documents'); }, 'company.clients' => function ($query) use ($updated_at) { - $query->where('clients.updated_at', '>=', $updated_at)->with('contacts.company', 'gateway_tokens','documents','company'); + $query->where('clients.updated_at', '>=', $updated_at)->with('contacts.company', 'gateway_tokens','documents'); }, 'company.company_gateways' => function ($query) { $query->whereNotNull('updated_at'); diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 7abf9d4f0692..8c754ff78d42 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -52,7 +52,7 @@ class Kernel extends HttpKernel ], 'api' => [ - 'throttle:60,1', + 'throttle:300,1', 'bindings', 'query_logging', \App\Http\Middleware\Cors::class, @@ -74,7 +74,7 @@ class Kernel extends HttpKernel \App\Http\Middleware\QueryLogging::class, ], 'shop' => [ - 'throttle:60,1', + 'throttle:120,1', 'bindings', 'query_logging', ], diff --git a/app/Http/Middleware/QueryLogging.php b/app/Http/Middleware/QueryLogging.php index d0cc13c98f65..bf71e2969221 100644 --- a/app/Http/Middleware/QueryLogging.php +++ b/app/Http/Middleware/QueryLogging.php @@ -54,6 +54,7 @@ class QueryLogging // if($count > 50) // Log::info($queries); + } } diff --git a/app/PaymentDrivers/Authorize/AuthorizeCreditCard.php b/app/PaymentDrivers/Authorize/AuthorizeCreditCard.php index c531d6d82852..38ad15a89400 100644 --- a/app/PaymentDrivers/Authorize/AuthorizeCreditCard.php +++ b/app/PaymentDrivers/Authorize/AuthorizeCreditCard.php @@ -201,7 +201,7 @@ class AuthorizeCreditCard private function processFailedResponse($data, $request) { //dd($data); - info(print_r($data, 1)); +// info(print_r($data, 1)); } private function formatGatewayResponse($data, $vars) diff --git a/app/Services/PdfMaker/PdfMakerUtilities.php b/app/Services/PdfMaker/PdfMakerUtilities.php index 8ffe05594295..17c23d2c737f 100644 --- a/app/Services/PdfMaker/PdfMakerUtilities.php +++ b/app/Services/PdfMaker/PdfMakerUtilities.php @@ -293,7 +293,7 @@ trait PdfMakerUtilities $this->document->getElementById('repeat-content')->appendChild($clone); } - info($this->data['options']); + // info($this->data['options']); if ( $header = $this->document->getElementById('header') && diff --git a/composer.json b/composer.json index 37abcc2c4042..3eb140e72ee2 100644 --- a/composer.json +++ b/composer.json @@ -59,7 +59,6 @@ "spatie/browsershot": "^3.37", "staudenmeir/eloquent-has-many-deep": "^1.11", "stripe/stripe-php": "^7.50", - "swooletw/laravel-swoole": "^2.6", "turbo124/beacon": "^1", "turbo124/laravel-gmail": "^5.0", "webpatser/laravel-countries": "dev-master#75992ad" diff --git a/composer.lock b/composer.lock index 794ca2884d4c..4e7250b8470a 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": "08ae0ebd522fae2599454303710f08b1", + "content-hash": "152c174ecc48f87a2c7fd00335c6fc86", "packages": [ { "name": "asgrim/ofxparser", @@ -3879,16 +3879,16 @@ }, { "name": "nesbot/carbon", - "version": "2.41.3", + "version": "2.41.4", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "e148788eeae9b9b7b87996520358b86faad37b52" + "reference": "6571aec754a648ef476a8d8f57993f7bc965afe4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/e148788eeae9b9b7b87996520358b86faad37b52", - "reference": "e148788eeae9b9b7b87996520358b86faad37b52", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/6571aec754a648ef476a8d8f57993f7bc965afe4", + "reference": "6571aec754a648ef476a8d8f57993f7bc965afe4", "shasum": "" }, "require": { @@ -3964,7 +3964,7 @@ "type": "tidelift" } ], - "time": "2020-10-12T20:36:09+00:00" + "time": "2020-10-22T07:28:05+00:00" }, { "name": "nikic/php-parser", @@ -6497,85 +6497,6 @@ ], "time": "2019-11-12T09:31:26+00:00" }, - { - "name": "swooletw/laravel-swoole", - "version": "v2.6.68", - "source": { - "type": "git", - "url": "https://github.com/swooletw/laravel-swoole.git", - "reference": "4167206bfbaea752264c814cac5c2172e72a400a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/swooletw/laravel-swoole/zipball/4167206bfbaea752264c814cac5c2172e72a400a", - "reference": "4167206bfbaea752264c814cac5c2172e72a400a", - "shasum": "" - }, - "require": { - "illuminate/console": "~5.4|~6.0|~7.0|~8.0", - "illuminate/contracts": "~5.4|~6.0|~7.0|~8.0", - "illuminate/http": "~5.4|~6.0|~7.0|~8.0", - "illuminate/support": "~5.4|~6.0|~7.0|~8.0", - "php": "^7.2", - "predis/predis": "^1.1" - }, - "require-dev": { - "codedungeon/phpunit-result-printer": "^0.14.0", - "laravel/lumen-framework": "~5.4|~6.0|~7.0|~8.0", - "mockery/mockery": "~1.0", - "php-coveralls/php-coveralls": "^2.1", - "php-mock/php-mock": "^2.0", - "phpunit/php-code-coverage": "^6.1", - "phpunit/phpunit": "^7.5", - "swoole/ide-helper": "@dev" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "SwooleTW\\Http\\LaravelServiceProvider" - ], - "aliases": { - "Server": "SwooleTW\\Http\\Server\\Facades\\Server", - "Table": "SwooleTW\\Http\\Server\\Facades\\Table", - "Room": "SwooleTW\\Http\\Websocket\\Facades\\Room", - "Websocket": "SwooleTW\\Http\\Websocket\\Facades\\Websocket" - } - } - }, - "autoload": { - "files": [ - "src/Server/helpers.php" - ], - "psr-4": { - "SwooleTW\\Http\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Albert Chen", - "email": "albert@unisharp.com" - }, - { - "name": "Huang Yi", - "email": "coodeer@163.com" - } - ], - "description": "High performance HTTP server based on Swoole. Speed up your Laravel and Lumen applications.", - "keywords": [ - "http", - "laravel", - "lumen", - "performance", - "server", - "swoole" - ], - "time": "2020-09-21T10:06:50+00:00" - }, { "name": "symfony/console", "version": "v5.1.7", diff --git a/config/app.php b/config/app.php index 89961932a055..c1dd0812a8ef 100644 --- a/config/app.php +++ b/config/app.php @@ -181,7 +181,6 @@ return [ App\Providers\MultiDBProvider::class, App\Providers\ClientPortalServiceProvider::class, App\Providers\NinjaTranslationServiceProvider::class, - SwooleTW\Http\LaravelServiceProvider::class, ], diff --git a/tests/Feature/ActivityApiTest.php b/tests/Feature/ActivityApiTest.php index 70357b0d5110..633d05a95d99 100644 --- a/tests/Feature/ActivityApiTest.php +++ b/tests/Feature/ActivityApiTest.php @@ -14,6 +14,7 @@ use Faker\Factory; use Illuminate\Foundation\Testing\DatabaseTransactions; use Tests\MockAccountData; use Tests\TestCase; +use Illuminate\Routing\Middleware\ThrottleRequests; /** * @test @@ -31,6 +32,11 @@ class ActivityApiTest extends TestCase $this->makeTestData(); + $this->withoutMiddleware( + ThrottleRequests::class + ); + + } public function testActivityGet() diff --git a/tests/Feature/ClientTest.php b/tests/Feature/ClientTest.php index 5a2f51c530c3..a087dac97d66 100644 --- a/tests/Feature/ClientTest.php +++ b/tests/Feature/ClientTest.php @@ -516,7 +516,8 @@ class ClientTest extends TestCase $response->assertStatus(200); $arr = $response->json(); -info($arr); + + $this->client = Client::find($this->decodePrimaryKey($arr['data']['id'])); $this->client->fresh(); diff --git a/tests/Feature/CompanyGatewayResolutionTest.php b/tests/Feature/CompanyGatewayResolutionTest.php index fd2cc0db0f1d..8de3d96a7f9c 100644 --- a/tests/Feature/CompanyGatewayResolutionTest.php +++ b/tests/Feature/CompanyGatewayResolutionTest.php @@ -172,6 +172,6 @@ class CompanyGatewayResolutionTest extends TestCase $this->assertEquals(4, count($this->cg->driver($this->client)->gatewayTypes())); - info(print_r($this->client->getPaymentMethods(10),1)); + // info(print_r($this->client->getPaymentMethods(10),1)); } } diff --git a/tests/Feature/PaymentTermsApiTest.php b/tests/Feature/PaymentTermsApiTest.php index 1662d71c945c..92b0e3577b47 100644 --- a/tests/Feature/PaymentTermsApiTest.php +++ b/tests/Feature/PaymentTermsApiTest.php @@ -29,6 +29,7 @@ use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Session; use Tests\MockAccountData; use Tests\TestCase; +use Illuminate\Routing\Middleware\ThrottleRequests; /** * @test @@ -51,6 +52,11 @@ class PaymentTermsApiTest extends TestCase $this->faker = \Faker\Factory::create(); Model::reguard(); + + $this->withoutMiddleware( + ThrottleRequests::class + ); + } public function testPaymentTermsGet() diff --git a/tests/Feature/PaymentTest.php b/tests/Feature/PaymentTest.php index 48419f546de9..b9f36304697a 100644 --- a/tests/Feature/PaymentTest.php +++ b/tests/Feature/PaymentTest.php @@ -1295,7 +1295,7 @@ $contact = ClientContact::factory()->create([ $payment = Payment::find($this->decodePrimaryKey($payment_id))->first(); - info($payment); + // info($payment); $this->assertNotNull($payment); $this->assertNotNull($payment->invoices()); diff --git a/tests/Feature/PingTest.php b/tests/Feature/PingTest.php index ae808d5d7d01..fa795f716d30 100644 --- a/tests/Feature/PingTest.php +++ b/tests/Feature/PingTest.php @@ -13,6 +13,7 @@ namespace Tests\Feature; use Illuminate\Foundation\Testing\DatabaseTransactions; use Tests\MockAccountData; use Tests\TestCase; +use Illuminate\Routing\Middleware\ThrottleRequests; /** * @test @@ -28,6 +29,11 @@ class PingTest extends TestCase parent::setUp(); $this->makeTestData(); + + $this->withoutMiddleware( + ThrottleRequests::class + ); + } public function testPingEndPoint()