From 5637d2855cb346404d003bd9096a7dab9f85feb2 Mon Sep 17 00:00:00 2001 From: Dominik Hebeler <dominik@suma-ev.de> Date: Mon, 26 Nov 2018 10:38:21 +0100 Subject: [PATCH] Updated Laravel to 5.6.39 --- composer.json | 33 ++++++++++---------- config/app.php | 2 -- config/hashing.php | 44 ++++++++++++++++++++++++++ config/logging.php | 68 +++++++++++++++++++++++++++++++++++++++++ config/trustedproxy.php | 36 +++++++++++----------- 5 files changed, 147 insertions(+), 36 deletions(-) create mode 100644 config/hashing.php create mode 100644 config/logging.php diff --git a/composer.json b/composer.json index 5b1cb2d31..6b8bf26d3 100644 --- a/composer.json +++ b/composer.json @@ -8,23 +8,22 @@ "license": "MIT", "type": "project", "require": { - "php": ">=5.6.4", - "fideloper/proxy": "^3.1", - "guzzlehttp/guzzle": "^6.2", - "jenssegers/agent": "^2.3", - "laravel/framework": "5.5.*", - "laravelcollective/html": "^5.2.0", - "mcamara/laravel-localization": "^1.1", + "php": "^7.1.3", + "fideloper/proxy": "^4.0", + "jenssegers/agent": "^2.6", + "laravel/framework": "5.6.*", + "laravel/tinker": "^1.0", + "mcamara/laravel-localization": "^1.3", "mews/captcha": "^2.2", - "predis/predis": "^1.1" + "predis/predis": "^1.1", + "symfony/dom-crawler": "^4.1" }, "require-dev": { - "fzaninotto/faker": "~1.4", - "mockery/mockery": "~1.0", - "phpunit/phpunit": "~6.0", - "symfony/css-selector": "3.1.*", - "symfony/dom-crawler": "3.1.*", - "filp/whoops": "~2.0" + "filp/whoops": "^2.0", + "fzaninotto/faker": "^1.4", + "mockery/mockery": "^1.0", + "nunomaduro/collision": "^2.0", + "phpunit/phpunit": "^7.0" }, "autoload": { "classmap": [ @@ -61,5 +60,7 @@ "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true - } -} \ No newline at end of file + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/config/app.php b/config/app.php index a060739ed..47828b33d 100644 --- a/config/app.php +++ b/config/app.php @@ -181,7 +181,6 @@ return [ App\Providers\MetaGerProvider::class, Jenssegers\Agent\AgentServiceProvider::class, Fideloper\Proxy\TrustedProxyServiceProvider::class, - Collective\Html\HtmlServiceProvider::class, Mews\Captcha\CaptchaServiceProvider::class, ], @@ -233,7 +232,6 @@ return [ 'LaravelLocalization' => Mcamara\LaravelLocalization\Facades\LaravelLocalization::class, 'Agent' => Jenssegers\Agent\Facades\Agent::class, 'Form' => Collective\Html\FormFacade::class, - 'HTML' => Collective\Html\HtmlFacade::class, 'Captcha' => Mews\Captcha\Facades\Captcha::class, 'Carbon' => Carbon\Carbon::class, ], diff --git a/config/hashing.php b/config/hashing.php new file mode 100644 index 000000000..15bc860df --- /dev/null +++ b/config/hashing.php @@ -0,0 +1,44 @@ +<?php +return [ + /* + |-------------------------------------------------------------------------- + | Default Hash Driver + |-------------------------------------------------------------------------- + | + | This option controls the default hash driver that will be used to hash + | passwords for your application. By default, the bcrypt algorithm is + | used; however, you remain free to modify this option if you wish. + | + | Supported: "bcrypt", "argon" + | + */ + 'driver' => 'bcrypt', + /* + |-------------------------------------------------------------------------- + | Bcrypt Options + |-------------------------------------------------------------------------- + | + | Here you may specify the configuration options that should be used when + | passwords are hashed using the Bcrypt algorithm. This will allow you + | to control the amount of time it takes to hash the given password. + | + */ + 'bcrypt' => [ + 'rounds' => env('BCRYPT_ROUNDS', 10), + ], + /* + |-------------------------------------------------------------------------- + | Argon Options + |-------------------------------------------------------------------------- + | + | Here you may specify the configuration options that should be used when + | passwords are hashed using the Argon algorithm. These will allow you + | to control the amount of time it takes to hash the given password. + | + */ + 'argon' => [ + 'memory' => 1024, + 'threads' => 2, + 'time' => 2, + ], +]; \ No newline at end of file diff --git a/config/logging.php b/config/logging.php new file mode 100644 index 000000000..739c0b6c3 --- /dev/null +++ b/config/logging.php @@ -0,0 +1,68 @@ +<?php +use Monolog\Handler\StreamHandler; +return [ + /* + |-------------------------------------------------------------------------- + | Default Log Channel + |-------------------------------------------------------------------------- + | + | This option defines the default log channel that gets used when writing + | messages to the logs. The name specified in this option should match + | one of the channels defined in the "channels" configuration array. + | + */ + 'default' => env('LOG_CHANNEL', 'stack'), + /* + |-------------------------------------------------------------------------- + | Log Channels + |-------------------------------------------------------------------------- + | + | Here you may configure the log channels for your application. Out of + | the box, Laravel uses the Monolog PHP logging library. This gives + | you a variety of powerful log handlers / formatters to utilize. + | + | Available Drivers: "single", "daily", "slack", "syslog", + | "errorlog", "monolog", + | "custom", "stack" + | + */ + 'channels' => [ + 'stack' => [ + 'driver' => 'stack', + 'channels' => ['single'], + ], + 'single' => [ + 'driver' => 'single', + 'path' => storage_path('logs/laravel.log'), + 'level' => 'debug', + ], + 'daily' => [ + 'driver' => 'daily', + 'path' => storage_path('logs/laravel.log'), + 'level' => 'debug', + 'days' => 7, + ], + 'slack' => [ + 'driver' => 'slack', + 'url' => env('LOG_SLACK_WEBHOOK_URL'), + 'username' => 'Laravel Log', + 'emoji' => ':boom:', + 'level' => 'critical', + ], + 'stderr' => [ + 'driver' => 'monolog', + 'handler' => StreamHandler::class, + 'with' => [ + 'stream' => 'php://stderr', + ], + ], + 'syslog' => [ + 'driver' => 'syslog', + 'level' => 'debug', + ], + 'errorlog' => [ + 'driver' => 'errorlog', + 'level' => 'debug', + ], + ], +]; \ No newline at end of file diff --git a/config/trustedproxy.php b/config/trustedproxy.php index 8b347fe8d..699f5afcb 100644 --- a/config/trustedproxy.php +++ b/config/trustedproxy.php @@ -21,26 +21,26 @@ return [ ], /* - * Or, to trust all proxies, uncomment this: + * To trust one or more specific proxies that connect + * directly to your server, use an array of IP addresses: */ - # 'proxies' => '*', + # 'proxies' => ['192.168.1.1'], /* - * Default Header Names - * - * Change these if the proxy does - * not send the default header names. - * - * Note that headers such as X-Forwarded-For - * are transformed to HTTP_X_FORWARDED_FOR format. - * - * The following are Symfony defaults, found in - * \Symfony\Component\HttpFoundation\Request::$trustedHeaders + * Or, to trust all proxies that connect + * directly to your server, use a "*" */ - 'headers' => [ - \Illuminate\Http\Request::HEADER_CLIENT_IP => 'X_FORWARDED_FOR', - \Illuminate\Http\Request::HEADER_CLIENT_HOST => 'X_FORWARDED_HOST', - \Illuminate\Http\Request::HEADER_CLIENT_PROTO => 'X_FORWARDED_PROTO', - \Illuminate\Http\Request::HEADER_CLIENT_PORT => 'X_FORWARDED_PORT', - ], + # 'proxies' => '*', + + /* + * Which headers to use to detect proxy related data (For, Host, Proto, Port) + * + * Options include: + * + * - Illuminate\Http\Request::HEADER_X_FORWARDED_ALL (use all x-forwarded-* headers to establish trust) + * - Illuminate\Http\Request::HEADER_FORWARDED (use the FORWARDED header to establish trust) + * + * @link https://symfony.com/doc/current/deployment/proxies.html + */ + 'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL, ]; -- GitLab