diff --git a/app/Console/Cron/Hourly.php b/app/Console/Cron/Hourly.php new file mode 100644 index 00000000..d90437c2 --- /dev/null +++ b/app/Console/Cron/Hourly.php @@ -0,0 +1,27 @@ +redirectLoggingToStdout('cron'); + event(new CronHourly()); + } +} \ No newline at end of file diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index f1ac46a0..0e56bb88 100755 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -2,6 +2,7 @@ namespace App\Console; +use App\Console\Cron\Hourly; use App\Console\Cron\Monthly; use App\Console\Cron\Nightly; use App\Console\Cron\Weekly; @@ -34,6 +35,7 @@ class Kernel extends ConsoleKernel $schedule->command(Nightly::class)->dailyAt('01:00'); $schedule->command(Weekly::class)->weeklyOn(0); $schedule->command(Monthly::class)->monthlyOn(1); + $schedule->command(Hourly::class)->hourly(); } /** diff --git a/app/Cron/Hourly/RemoveExpiredBids.php b/app/Cron/Hourly/RemoveExpiredBids.php new file mode 100644 index 00000000..dd8876e2 --- /dev/null +++ b/app/Cron/Hourly/RemoveExpiredBids.php @@ -0,0 +1,30 @@ +subHours(setting('bids.expire_time')); + Bid::whereDate('created_at', '<', $date)->delete(); + } +} \ No newline at end of file diff --git a/app/Events/CronHourly.php b/app/Events/CronHourly.php new file mode 100644 index 00000000..d9a7cc09 --- /dev/null +++ b/app/Events/CronHourly.php @@ -0,0 +1,23 @@ + [ \App\Cron\Monthly\ApplyExpenses::class ], + + CronHourly::class => [ + \App\Cron\Hourly\RemoveExpiredBids::class + ], ]; } diff --git a/composer.json b/composer.json index 75450141..d6d23de8 100755 --- a/composer.json +++ b/composer.json @@ -52,7 +52,8 @@ "nunomaduro/collision": "^2.0", "phpstan/phpstan": "^0.9.2", "weebly/phpstan-laravel": "^1.1", - "codedungeon/phpunit-result-printer": "^0.13.0" + "codedungeon/phpunit-result-printer": "^0.13.0", + "barryvdh/laravel-debugbar": "^3.1" }, "autoload": { "classmap": [ diff --git a/composer.lock b/composer.lock index abd91952..41d046aa 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "1c9830cc5b142394ecd3a80cd2e1dc9c", + "content-hash": "65637d77694e68aa106afd92650fde71", "packages": [ { "name": "akaunting/money", @@ -69,16 +69,16 @@ }, { "name": "anhskohbo/no-captcha", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/anhskohbo/no-captcha.git", - "reference": "f6c3a006b8c74f692d232d861c3e104621f50dcc" + "reference": "821a256c692392941ab165893bb642557f94f918" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/anhskohbo/no-captcha/zipball/f6c3a006b8c74f692d232d861c3e104621f50dcc", - "reference": "f6c3a006b8c74f692d232d861c3e104621f50dcc", + "url": "https://api.github.com/repos/anhskohbo/no-captcha/zipball/821a256c692392941ab165893bb642557f94f918", + "reference": "821a256c692392941ab165893bb642557f94f918", "shasum": "" }, "require": { @@ -124,7 +124,7 @@ "no-captcha", "recaptcha" ], - "time": "2018-02-09T02:04:49+00:00" + "time": "2018-08-10T11:44:19+00:00" }, { "name": "arrilot/laravel-widgets", @@ -1498,16 +1498,16 @@ }, { "name": "laravel/framework", - "version": "v5.6.33", + "version": "v5.6.34", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "8a708b989adc320c451ee639d812af81f884666b" + "reference": "66c9cf8119b422b71273271db1f12e20d74ad49b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/8a708b989adc320c451ee639d812af81f884666b", - "reference": "8a708b989adc320c451ee639d812af81f884666b", + "url": "https://api.github.com/repos/laravel/framework/zipball/66c9cf8119b422b71273271db1f12e20d74ad49b", + "reference": "66c9cf8119b422b71273271db1f12e20d74ad49b", "shasum": "" }, "require": { @@ -1633,7 +1633,7 @@ "framework", "laravel" ], - "time": "2018-08-09T20:36:39+00:00" + "time": "2018-08-21T13:44:37+00:00" }, { "name": "laravelcollective/html", @@ -1772,16 +1772,16 @@ }, { "name": "league/flysystem", - "version": "1.0.45", + "version": "1.0.46", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "a99f94e63b512d75f851b181afcdf0ee9ebef7e6" + "reference": "f3e0d925c18b92cf3ce84ea5cc58d62a1762a2b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/a99f94e63b512d75f851b181afcdf0ee9ebef7e6", - "reference": "a99f94e63b512d75f851b181afcdf0ee9ebef7e6", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f3e0d925c18b92cf3ce84ea5cc58d62a1762a2b2", + "reference": "f3e0d925c18b92cf3ce84ea5cc58d62a1762a2b2", "shasum": "" }, "require": { @@ -1793,7 +1793,7 @@ "require-dev": { "ext-fileinfo": "*", "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7" + "phpunit/phpunit": "^5.7.10" }, "suggest": { "ext-fileinfo": "Required for MimeType", @@ -1852,7 +1852,7 @@ "sftp", "storage" ], - "time": "2018-05-07T08:44:23+00:00" + "time": "2018-08-22T07:45:22+00:00" }, { "name": "league/geotools", @@ -5040,6 +5040,74 @@ } ], "packages-dev": [ + { + "name": "barryvdh/laravel-debugbar", + "version": "v3.1.5", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-debugbar.git", + "reference": "d3cdca2ad6cc6e67735b4a63e7551c690a497f5f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/d3cdca2ad6cc6e67735b4a63e7551c690a497f5f", + "reference": "d3cdca2ad6cc6e67735b4a63e7551c690a497f5f", + "shasum": "" + }, + "require": { + "illuminate/routing": "5.5.x|5.6.x", + "illuminate/session": "5.5.x|5.6.x", + "illuminate/support": "5.5.x|5.6.x", + "maximebf/debugbar": "~1.15.0", + "php": ">=7.0", + "symfony/debug": "^3|^4", + "symfony/finder": "^3|^4" + }, + "require-dev": { + "illuminate/framework": "5.5.x" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\Debugbar\\ServiceProvider" + ], + "aliases": { + "Debugbar": "Barryvdh\\Debugbar\\Facade" + } + } + }, + "autoload": { + "psr-4": { + "Barryvdh\\Debugbar\\": "src/" + }, + "files": [ + "src/helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "PHP Debugbar integration for Laravel", + "keywords": [ + "debug", + "debugbar", + "laravel", + "profiler", + "webprofiler" + ], + "time": "2018-05-03T18:27:04+00:00" + }, { "name": "barryvdh/laravel-ide-helper", "version": "v2.4.3", @@ -5663,6 +5731,67 @@ ], "time": "2018-06-13T13:22:40+00:00" }, + { + "name": "maximebf/debugbar", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/maximebf/php-debugbar.git", + "reference": "30e7d60937ee5f1320975ca9bc7bcdd44d500f07" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/30e7d60937ee5f1320975ca9bc7bcdd44d500f07", + "reference": "30e7d60937ee5f1320975ca9bc7bcdd44d500f07", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/log": "^1.0", + "symfony/var-dumper": "^2.6|^3.0|^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0|^5.0" + }, + "suggest": { + "kriswallsmith/assetic": "The best way to manage assets", + "monolog/monolog": "Log using Monolog", + "predis/predis": "Redis storage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.14-dev" + } + }, + "autoload": { + "psr-4": { + "DebugBar\\": "src/DebugBar/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maxime Bouroumeau-Fuseau", + "email": "maxime.bouroumeau@gmail.com", + "homepage": "http://maximebf.com" + }, + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Debug bar in the browser for php application", + "homepage": "https://github.com/maximebf/php-debugbar", + "keywords": [ + "debug", + "debugbar" + ], + "time": "2017-12-15T11:13:46+00:00" + }, { "name": "mockery/mockery", "version": "0.9.9", @@ -7041,16 +7170,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.3.1", + "version": "7.3.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f9b14c17860eccb440a0352a117a81eb754cff5a" + "reference": "34705f81bddc3f505b9599a2ef96e2b4315ba9b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f9b14c17860eccb440a0352a117a81eb754cff5a", - "reference": "f9b14c17860eccb440a0352a117a81eb754cff5a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/34705f81bddc3f505b9599a2ef96e2b4315ba9b8", + "reference": "34705f81bddc3f505b9599a2ef96e2b4315ba9b8", "shasum": "" }, "require": { @@ -7121,7 +7250,7 @@ "testing", "xunit" ], - "time": "2018-08-07T06:44:28+00:00" + "time": "2018-08-22T06:39:21+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", diff --git a/storage/debugbar/.gitignore b/storage/debugbar/.gitignore new file mode 100644 index 00000000..d6b7ef32 --- /dev/null +++ b/storage/debugbar/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore