mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-26 23:07:59 +01:00
Merge pull request #146 from Poniverse/shift-40768
This commit is contained in:
commit
2c3a3cd42c
242 changed files with 108 additions and 43 deletions
|
@ -61,4 +61,19 @@ class Kernel extends HttpKernel
|
||||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||||
'cors' => \Barryvdh\Cors\HandleCors::class,
|
'cors' => \Barryvdh\Cors\HandleCors::class,
|
||||||
];
|
];
|
||||||
|
/**
|
||||||
|
* The priority-sorted list of middleware.
|
||||||
|
*
|
||||||
|
* This forces non-global middleware to always be in the given order.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $middlewarePriority = [
|
||||||
|
\Illuminate\Session\Middleware\StartSession::class,
|
||||||
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||||
|
\App\Http\Middleware\Authenticate::class,
|
||||||
|
\Illuminate\Session\Middleware\AuthenticateSession::class,
|
||||||
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||||
|
\Illuminate\Auth\Middleware\Authorize::class,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,13 @@ use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
|
||||||
|
|
||||||
class VerifyCsrfToken extends Middleware
|
class VerifyCsrfToken extends Middleware
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Indicates whether the XSRF-TOKEN cookie should be set on the response.
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
protected $addHttpCookie = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The URIs that should be excluded from CSRF verification.
|
* The URIs that should be excluded from CSRF verification.
|
||||||
*
|
*
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$app = new Illuminate\Foundation\Application(
|
$app = new Illuminate\Foundation\Application(
|
||||||
realpath(__DIR__.'/../')
|
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.1.3",
|
"php": "^7.1.3",
|
||||||
"laravel/framework": "5.6.*",
|
"laravel/framework": "5.7.*",
|
||||||
"codescale/ffmpeg-php": "2.7.0",
|
"codescale/ffmpeg-php": "2.7.0",
|
||||||
"barryvdh/laravel-ide-helper": "v2.8.0",
|
"barryvdh/laravel-ide-helper": "v2.8.0",
|
||||||
"guzzlehttp/guzzle": "~6.0",
|
"guzzlehttp/guzzle": "~6.0",
|
||||||
|
@ -31,10 +31,11 @@
|
||||||
"doctrine/collections": "v1.4.*",
|
"doctrine/collections": "v1.4.*",
|
||||||
"doctrine/annotations": "v1.4.*",
|
"doctrine/annotations": "v1.4.*",
|
||||||
"doctrine/cache": "v1.6.*",
|
"doctrine/cache": "v1.6.*",
|
||||||
"doctrine/instantiator": "1.0.*"
|
"doctrine/instantiator": "1.0.*",
|
||||||
|
"fideloper/proxy": "^4.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"fzaninotto/faker": "~1.4",
|
"fzaninotto/faker": "^1.4",
|
||||||
"mockery/mockery": "^1.0",
|
"mockery/mockery": "^1.0",
|
||||||
"phpunit/phpunit": "^7.0",
|
"phpunit/phpunit": "^7.0",
|
||||||
"filp/whoops": "^2.0",
|
"filp/whoops": "^2.0",
|
||||||
|
@ -42,7 +43,8 @@
|
||||||
"symfony/css-selector": "~3.1",
|
"symfony/css-selector": "~3.1",
|
||||||
"laravel/browser-kit-testing": "2.*",
|
"laravel/browser-kit-testing": "2.*",
|
||||||
"nategood/httpful": "^0.2.20",
|
"nategood/httpful": "^0.2.20",
|
||||||
"nunomaduro/collision": "^2.0"
|
"nunomaduro/collision": "^2.0",
|
||||||
|
"beyondcode/laravel-dump-server": "^1.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"classmap": [
|
"classmap": [
|
||||||
|
@ -65,14 +67,14 @@
|
||||||
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||||
],
|
],
|
||||||
"post-create-project-cmd": [
|
"post-create-project-cmd": [
|
||||||
"@php artisan key:generate"
|
"@php artisan key:generate --ansi"
|
||||||
],
|
],
|
||||||
"post-update-cmd": [
|
"post-update-cmd": [
|
||||||
"php artisan ide-helper:generate"
|
"php artisan ide-helper:generate"
|
||||||
],
|
],
|
||||||
"post-autoload-dump": [
|
"post-autoload-dump": [
|
||||||
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||||
"@php artisan package:discover"
|
"@php artisan package:discover --ansi"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -57,7 +59,7 @@ return [
|
||||||
env('MEMCACHED_PASSWORD'),
|
env('MEMCACHED_PASSWORD'),
|
||||||
],
|
],
|
||||||
'options' => [
|
'options' => [
|
||||||
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
||||||
],
|
],
|
||||||
'servers' => [
|
'servers' => [
|
||||||
[
|
[
|
||||||
|
@ -70,7 +72,7 @@ return [
|
||||||
|
|
||||||
'redis' => [
|
'redis' => [
|
||||||
'driver' => 'redis',
|
'driver' => 'redis',
|
||||||
'connection' => 'default',
|
'connection' => 'cache',
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
@ -86,9 +88,6 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'prefix' => env(
|
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
|
||||||
'CACHE_PREFIX',
|
|
||||||
str_slug(env('APP_NAME', 'laravel'), '_').'_cache'
|
|
||||||
),
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -13,7 +13,7 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'default' => env('DB_CONNECTION', 'pgsql'),
|
'default' => env('DB_CONNECTION', 'mysql'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -37,12 +37,7 @@ return [
|
||||||
'driver' => 'sqlite',
|
'driver' => 'sqlite',
|
||||||
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
],
|
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
|
||||||
|
|
||||||
'memory' => [
|
|
||||||
'driver' => 'sqlite',
|
|
||||||
'database' => ':memory:',
|
|
||||||
'prefix' => '',
|
|
||||||
],
|
],
|
||||||
|
|
||||||
'mysql' => [
|
'mysql' => [
|
||||||
|
@ -56,19 +51,21 @@ return [
|
||||||
'charset' => 'utf8mb4',
|
'charset' => 'utf8mb4',
|
||||||
'collation' => 'utf8mb4_unicode_ci',
|
'collation' => 'utf8mb4_unicode_ci',
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
|
'prefix_indexes' => true,
|
||||||
'strict' => true,
|
'strict' => true,
|
||||||
'engine' => null,
|
'engine' => null,
|
||||||
],
|
],
|
||||||
|
|
||||||
'pgsql' => [
|
'pgsql' => [
|
||||||
'driver' => 'pgsql',
|
'driver' => 'pgsql',
|
||||||
'host' => env('POSTGRESQL_DB_HOST', '127.0.0.1'),
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
'port' => env('POSTGRESQL_DB_PORT', '5432'),
|
'port' => env('DB_PORT', '5432'),
|
||||||
'database' => env('POSTGRESQL_DB_DATABASE', 'forge'),
|
'database' => env('DB_DATABASE', 'forge'),
|
||||||
'username' => env('POSTGRESQL_DB_USERNAME', 'forge'),
|
'username' => env('DB_USERNAME', 'forge'),
|
||||||
'password' => env('POSTGRESQL_DB_PASSWORD', ''),
|
'password' => env('DB_PASSWORD', ''),
|
||||||
'charset' => 'utf8',
|
'charset' => 'utf8',
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
|
'prefix_indexes' => true,
|
||||||
'schema' => 'public',
|
'schema' => 'public',
|
||||||
'sslmode' => 'prefer',
|
'sslmode' => 'prefer',
|
||||||
],
|
],
|
||||||
|
@ -82,6 +79,7 @@ return [
|
||||||
'password' => env('DB_PASSWORD', ''),
|
'password' => env('DB_PASSWORD', ''),
|
||||||
'charset' => 'utf8',
|
'charset' => 'utf8',
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
|
'prefix_indexes' => true,
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
@ -105,7 +103,7 @@ return [
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Redis is an open source, fast, and advanced key-value store that also
|
| Redis is an open source, fast, and advanced key-value store that also
|
||||||
| provides a richer set of commands than a typical key-value systems
|
| provides a richer body of commands than a typical key-value system
|
||||||
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
@ -118,7 +116,14 @@ return [
|
||||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||||
'password' => env('REDIS_PASSWORD', null),
|
'password' => env('REDIS_PASSWORD', null),
|
||||||
'port' => env('REDIS_PORT', 6379),
|
'port' => env('REDIS_PORT', 6379),
|
||||||
'database' => 0,
|
'database' => env('REDIS_DB', 0),
|
||||||
|
],
|
||||||
|
|
||||||
|
'cache' => [
|
||||||
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||||
|
'password' => env('REDIS_PASSWORD', null),
|
||||||
|
'port' => env('REDIS_PORT', 6379),
|
||||||
|
'database' => env('REDIS_CACHE_DB', 1),
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
|
@ -11,7 +11,7 @@ return [
|
||||||
| passwords for your application. By default, the bcrypt algorithm is
|
| passwords for your application. By default, the bcrypt algorithm is
|
||||||
| used; however, you remain free to modify this option if you wish.
|
| used; however, you remain free to modify this option if you wish.
|
||||||
|
|
|
|
||||||
| Supported: "bcrypt", "argon"
|
| Supported: "bcrypt", "argon", "argon2id"
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Monolog\Handler\StreamHandler;
|
use Monolog\Handler\StreamHandler;
|
||||||
|
use Monolog\Handler\SyslogUdpHandler;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
|
@ -35,7 +36,8 @@ return [
|
||||||
'channels' => [
|
'channels' => [
|
||||||
'stack' => [
|
'stack' => [
|
||||||
'driver' => 'stack',
|
'driver' => 'stack',
|
||||||
'channels' => ['single'],
|
'channels' => ['daily'],
|
||||||
|
'ignore_exceptions' => false,
|
||||||
],
|
],
|
||||||
|
|
||||||
'single' => [
|
'single' => [
|
||||||
|
@ -48,7 +50,7 @@ return [
|
||||||
'driver' => 'daily',
|
'driver' => 'daily',
|
||||||
'path' => storage_path('logs/laravel.log'),
|
'path' => storage_path('logs/laravel.log'),
|
||||||
'level' => 'debug',
|
'level' => 'debug',
|
||||||
'days' => 7,
|
'days' => 14,
|
||||||
],
|
],
|
||||||
|
|
||||||
'slack' => [
|
'slack' => [
|
||||||
|
@ -59,9 +61,20 @@ return [
|
||||||
'level' => 'critical',
|
'level' => 'critical',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'papertrail' => [
|
||||||
|
'driver' => 'monolog',
|
||||||
|
'level' => 'debug',
|
||||||
|
'handler' => SyslogUdpHandler::class,
|
||||||
|
'handler_with' => [
|
||||||
|
'host' => env('PAPERTRAIL_URL'),
|
||||||
|
'port' => env('PAPERTRAIL_PORT'),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
'stderr' => [
|
'stderr' => [
|
||||||
'driver' => 'monolog',
|
'driver' => 'monolog',
|
||||||
'handler' => StreamHandler::class,
|
'handler' => StreamHandler::class,
|
||||||
|
'formatter' => env('LOG_STDERR_FORMATTER'),
|
||||||
'with' => [
|
'with' => [
|
||||||
'stream' => 'php://stderr',
|
'stream' => 'php://stderr',
|
||||||
],
|
],
|
||||||
|
|
|
@ -56,8 +56,8 @@ return [
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'from' => [
|
'from' => [
|
||||||
'address' => env('MAIL_FROM_ADDRESS', 'hello@pony.fm'),
|
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
|
||||||
'name' => env('MAIL_FROM_NAME', 'Pony.fm'),
|
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -120,4 +120,17 @@ return [
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Log Channel
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If you are using the "log" driver, you may specify the logging channel
|
||||||
|
| if you prefer to keep mail messages separate from other log entries
|
||||||
|
| for simpler reading. Otherwise, the default channel will be used.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'log_channel' => env('MAIL_LOG_CHANNEL'),
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -13,7 +13,7 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'default' => env('QUEUE_DRIVER', 'sync'),
|
'default' => env('QUEUE_CONNECTION', 'sync'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -60,7 +60,7 @@ return [
|
||||||
'redis' => [
|
'redis' => [
|
||||||
'driver' => 'redis',
|
'driver' => 'redis',
|
||||||
'connection' => 'default',
|
'connection' => 'default',
|
||||||
'queue' => 'default',
|
'queue' => env('REDIS_QUEUE', 'default'),
|
||||||
'retry_after' => 90,
|
'retry_after' => 90,
|
||||||
'block_for' => null,
|
'block_for' => null,
|
||||||
],
|
],
|
||||||
|
@ -79,7 +79,7 @@ return [
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'failed' => [
|
'failed' => [
|
||||||
'database' => env('DB_CONNECTION', 'pgsql'),
|
'database' => env('DB_CONNECTION', 'mysql'),
|
||||||
'table' => 'failed_jobs',
|
'table' => 'failed_jobs',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ return [
|
||||||
'mailgun' => [
|
'mailgun' => [
|
||||||
'domain' => env('MAILGUN_DOMAIN'),
|
'domain' => env('MAILGUN_DOMAIN'),
|
||||||
'secret' => env('MAILGUN_SECRET'),
|
'secret' => env('MAILGUN_SECRET'),
|
||||||
|
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'ses' => [
|
'ses' => [
|
||||||
|
@ -33,6 +34,10 @@ return [
|
||||||
'model' => App\Models\User::class,
|
'model' => App\Models\User::class,
|
||||||
'key' => env('STRIPE_KEY'),
|
'key' => env('STRIPE_KEY'),
|
||||||
'secret' => env('STRIPE_SECRET'),
|
'secret' => env('STRIPE_SECRET'),
|
||||||
|
'webhook' => [
|
||||||
|
'secret' => env('STRIPE_WEBHOOK_SECRET'),
|
||||||
|
'tolerance' => env('STRIPE_WEBHOOK_TOLERANCE', 300),
|
||||||
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -70,7 +72,7 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'connection' => null,
|
'connection' => env('SESSION_CONNECTION', null),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -96,7 +98,7 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'store' => null,
|
'store' => env('SESSION_STORE', null),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -124,7 +126,7 @@ return [
|
||||||
|
|
||||||
'cookie' => env(
|
'cookie' => env(
|
||||||
'SESSION_COOKIE',
|
'SESSION_COOKIE',
|
||||||
str_slug(env('APP_NAME', 'laravel'), '_').'_session'
|
Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
|
||||||
),
|
),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -28,6 +28,9 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'compiled' => realpath(storage_path('framework/views')),
|
'compiled' => env(
|
||||||
|
'VIEW_COMPILED_PATH',
|
||||||
|
realpath(storage_path('framework/views'))
|
||||||
|
),
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -25,9 +25,10 @@
|
||||||
<env name="BCRYPT_ROUNDS" value="4"/>
|
<env name="BCRYPT_ROUNDS" value="4"/>
|
||||||
<env name="CACHE_DRIVER" value="array"/>
|
<env name="CACHE_DRIVER" value="array"/>
|
||||||
<env name="SESSION_DRIVER" value="array"/>
|
<env name="SESSION_DRIVER" value="array"/>
|
||||||
<env name="QUEUE_DRIVER" value="sync"/>
|
<env name="QUEUE_CONNECTION" value="sync"/>
|
||||||
<env name="APP_URL" value="http://ponyfm-dev.poni"/>
|
<env name="APP_URL" value="http://ponyfm-dev.poni"/>
|
||||||
<env name="DB_CONNECTION" value="memory"/>
|
<env name="DB_CONNECTION" value="sqlite"/>
|
||||||
|
<env name="DB_DATABASE" value=":memory:"/>
|
||||||
<env name="PONYFM_DATASTORE" value="/vagrant/storage/app/testing-datastore"/>
|
<env name="PONYFM_DATASTORE" value="/vagrant/storage/app/testing-datastore"/>
|
||||||
</php>
|
</php>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|
|
@ -11,7 +11,7 @@ DB_PASSWORD=secret
|
||||||
ELASTICSEARCH_HOSTS=localhost
|
ELASTICSEARCH_HOSTS=localhost
|
||||||
|
|
||||||
SESSION_HTTPS_ONLY=false
|
SESSION_HTTPS_ONLY=false
|
||||||
QUEUE_DRIVER=beanstalkd
|
QUEUE_CONNECTION=beanstalkd
|
||||||
|
|
||||||
MAIL_DRIVER=smtp
|
MAIL_DRIVER=smtp
|
||||||
MAIL_HOST=mailtrap.io
|
MAIL_HOST=mailtrap.io
|
||||||
|
|
|
@ -11,7 +11,7 @@ DB_PASSWORD=secret
|
||||||
ELASTICSEARCH_HOSTS=localhost
|
ELASTICSEARCH_HOSTS=localhost
|
||||||
|
|
||||||
SESSION_HTTPS_ONLY=false
|
SESSION_HTTPS_ONLY=false
|
||||||
QUEUE_DRIVER=beanstalkd
|
QUEUE_CONNECTION=beanstalkd
|
||||||
|
|
||||||
MAIL_DRIVER=smtp
|
MAIL_DRIVER=smtp
|
||||||
MAIL_HOST=mailtrap.io
|
MAIL_HOST=mailtrap.io
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue