Upgrade to laravel 5.2

This commit is contained in:
Graham Campbell 2015-12-24 15:44:06 +00:00
parent 3951f0116a
commit cdc107fcb2
9 changed files with 104 additions and 76 deletions

View File

@ -56,7 +56,7 @@ class StatusPageComposer
$scheduledMaintenance = Incident::scheduled()->orderBy('scheduled_at')->get();
// Component & Component Group lists.
$usedComponentGroups = Component::enabled()->where('group_id', '>', 0)->groupBy('group_id')->lists('group_id');
$usedComponentGroups = Component::enabled()->where('group_id', '>', 0)->groupBy('group_id')->pluck('group_id');
$componentGroups = ComponentGroup::whereIn('id', $usedComponentGroups)->orderBy('order')->get();
$ungroupedComponents = Component::enabled()->where('group_id', 0)->orderBy('order')->orderBy('created_at')->get();

View File

@ -52,7 +52,7 @@ class Repository
public function get($name, $default = null)
{
if (!$this->settings) {
$this->settings = $this->model->all()->lists('value', 'name');
$this->settings = $this->model->all()->pluck('value', 'name');
}
if (!empty($this->settings[$name])) {

View File

@ -11,8 +11,8 @@
namespace CachetHQ\Cachet\Foundation\Providers;
use AltThree\Bus\Dispatcher;
use CachetHQ\Cachet\Dates\DateFactory;
use Illuminate\Bus\Dispatcher;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Str;
@ -21,7 +21,7 @@ class AppServiceProvider extends ServiceProvider
/**
* Boot the service provider.
*
* @param \Illuminate\Bus\Dispatcher $dispatcher
* @param \AltThree\Bus\Dispatcher $dispatcher
*/
public function boot(Dispatcher $dispatcher)
{

View File

@ -20,10 +20,12 @@
],
"require": {
"php": ">=5.5.9",
"laravel/framework": "~5.1.28",
"laravel/framework": "~5.2.5",
"alt-three/bus": "^1.0",
"alt-three/emoji": "^2.1",
"alt-three/validator": "^1.4",
"barryvdh/laravel-cors": "^0.7",
"asm89/stack-cors": "dev-master as 0.2.2",
"barryvdh/laravel-cors": "^0.7.3",
"doctrine/dbal": "^2.5",
"fideloper/proxy": "^3.1",
"graham-campbell/binput": "^3.3",
@ -34,8 +36,8 @@
"guzzlehttp/guzzle": "^6.1",
"jenssegers/date": "^3.1",
"mccool/laravel-auto-presenter": "^4.2",
"pragmarx/google2fa": "^0.7",
"rcrowe/twigbridge": "^0.9",
"pragmarx/google2fa": "^0.7.1",
"rcrowe/twigbridge": "^0.9.1",
"roumen/feed": "^2.9.8"
},
"require-dev": {
@ -44,7 +46,9 @@
"fzaninotto/faker": "^1.5",
"graham-campbell/testbench-core": "^1.1",
"mockery/mockery": "0.9.4",
"phpunit/phpunit": "4.8.21"
"phpunit/phpunit": "4.8.21",
"symfony/css-selector": "^3.0",
"symfony/dom-crawler": "^3.0"
},
"autoload": {
"classmap": [

View File

@ -11,6 +11,19 @@
return [
/*
|--------------------------------------------------------------------------
| Application Environment
|--------------------------------------------------------------------------
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services your application utilizes. Set this in your ".env" file.
|
*/
'env' => env('APP_ENV', 'production'),
/*
|--------------------------------------------------------------------------
| Application Debug Mode
@ -87,7 +100,7 @@ return [
|
*/
'key' => env('APP_KEY', 'SomeRandomString'),
'key' => env('APP_KEY'),
'cipher' => 'AES-256-CBC',
@ -122,13 +135,11 @@ return [
/*
* Laravel Framework Service Providers...
*/
'Illuminate\Foundation\Providers\ArtisanServiceProvider',
'Illuminate\Auth\AuthServiceProvider',
'Illuminate\Broadcasting\BroadcastServiceProvider',
'Illuminate\Bus\BusServiceProvider',
'AltThree\Bus\BusServiceProvider',
'Illuminate\Cache\CacheServiceProvider',
'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider',
'Illuminate\Routing\ControllerServiceProvider',
'Illuminate\Cookie\CookieServiceProvider',
'Illuminate\Database\DatabaseServiceProvider',
'Illuminate\Encryption\EncryptionServiceProvider',

View File

@ -13,64 +13,99 @@ return [
/*
|--------------------------------------------------------------------------
| Default Authentication Driver
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the authentication driver that will be utilized.
| This driver manages the retrieval and authentication of the users
| attempting to get access to protected areas of your application.
| This option controls the default authentication "guard" and password
| reset options for your application. You may change these defaults
| as required, but they're a perfect start for most applications.
|
*/
'defaults' => [
'guard' => 'web',
'passwords' => 'users',
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| here which uses session storage and the Eloquent user provider.
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| Supported: "session", "token"
|
*/
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
'driver' => 'token',
'provider' => 'users',
],
],
/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| If you have multiple user tables or models you may configure multiple
| sources which represent each model / table. These sources may then
| be assigned to any extra authentication guards you have defined.
|
| Supported: "database", "eloquent"
|
*/
'driver' => 'eloquent',
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => 'CachetHQ\Cachet\Models\User',
],
],
/*
|--------------------------------------------------------------------------
| Authentication Model
|--------------------------------------------------------------------------
|
| When using the "Eloquent" authentication driver, we need to know which
| Eloquent model should be used to retrieve your users. Of course, it
| is often just the "User" model but you may use whatever you like.
|
*/
'model' => 'CachetHQ\Cachet\Models\User',
/*
|--------------------------------------------------------------------------
| Authentication Table
|--------------------------------------------------------------------------
|
| When using the "Database" authentication driver, we need to know which
| table should be used to retrieve your users. We have chosen a basic
| default value but you may easily change it to any table you like.
|
*/
'table' => 'users',
/*
|--------------------------------------------------------------------------
| Password Reset Settings
| Resetting Passwords
|--------------------------------------------------------------------------
|
| Here you may set the options for resetting passwords including the view
| that is your password reset e-mail. You can also set the name of the
| that is your password reset e-mail. You may also set the name of the
| table that maintains all of the reset tokens for your application.
|
| You may specify multiple password reset configurations if you have more
| than one user table or model in the application and you want to have
| separate password reset settings based on the specific user types.
|
| The expire time is the number of minutes that the reset token should be
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
*/
'password' => [
'email' => 'emails.password',
'table' => 'password_resets',
'expire' => 60,
'passwords' => [
'users' => [
'provider' => 'users',
'email' => 'auth.emails.password',
'table' => 'password_resets',
'expire' => 60,
],
],
];

View File

@ -117,17 +117,4 @@ return [
'sendmail' => '/usr/sbin/sendmail -bs',
/*
|--------------------------------------------------------------------------
| Mail "Pretend"
|--------------------------------------------------------------------------
|
| When this option is enabled, e-mail will not actually be sent over the
| web and will instead be written to your application's logs files so
| you may inspect the message. This is great for local development.
|
*/
'pretend' => false,
];

View File

@ -20,8 +20,7 @@ return [
| API, giving you convenient access to each back-end using the same
| syntax for each one. Here you may set the default queue driver.
|
| Supported: "null", "sync", "database", "beanstalkd",
| "sqs", "iron", "redis"
| Supported: "null", "sync", "database", "beanstalkd", "sqs", "redis"
|
*/
@ -62,19 +61,11 @@ return [
'driver' => 'sqs',
'key' => 'your-public-key',
'secret' => 'your-secret-key',
'queue' => 'your-queue-url',
'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
'queue' => 'your-queue-name',
'region' => 'us-east-1',
],
'iron' => [
'driver' => 'iron',
'host' => 'mq-aws-us-east-1.iron.io',
'token' => 'your-token',
'project' => 'your-project-id',
'queue' => 'your-queue-name',
'encrypt' => true,
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',

View File

@ -75,7 +75,7 @@
</div>
<div class="form-group">
<label>{{ trans('forms.setup.site_domain') }}</label>
<input type="text" name="settings[app_domain]" class="form-control" placeholder="{{ trans('forms.setup.site_domain') }}" value="{{ Binput::old('settings.app_domain', url()) }}" required>
<input type="text" name="settings[app_domain]" class="form-control" placeholder="{{ trans('forms.setup.site_domain') }}" value="{{ Binput::old('settings.app_domain', url('/')) }}" required>
@if($errors->has('settings.app_domain'))
<span class="text-danger">{{ $errors->first('settings.app_domain') }}</span>
@endif