mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Upgraded to Laravel 5.1
This commit is contained in:
parent
313c35ae5a
commit
105321bdbb
20
.travis.yml
20
.travis.yml
@ -64,16 +64,16 @@ before_script:
|
|||||||
|
|
||||||
script:
|
script:
|
||||||
- php ./vendor/codeception/codeception/codecept run --debug acceptance AllPagesCept.php
|
- php ./vendor/codeception/codeception/codecept run --debug acceptance AllPagesCept.php
|
||||||
#- php ./vendor/codeception/codeception/codecept run --debug acceptance APICest.php
|
- php ./vendor/codeception/codeception/codecept run --debug acceptance APICest.php
|
||||||
#- php ./vendor/codeception/codeception/codecept run --debug acceptance CheckBalanceCest.php
|
- php ./vendor/codeception/codeception/codecept run --debug acceptance CheckBalanceCest.php
|
||||||
#- php ./vendor/codeception/codeception/codecept run --debug acceptance ClientCest.php
|
- php ./vendor/codeception/codeception/codecept run --debug acceptance ClientCest.php
|
||||||
#- php ./vendor/codeception/codeception/codecept run --debug acceptance CreditCest.php
|
- php ./vendor/codeception/codeception/codecept run --debug acceptance CreditCest.php
|
||||||
#- php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceCest.php
|
- php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceCest.php
|
||||||
#- php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceDesignCest.php
|
- php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceDesignCest.php
|
||||||
#- php ./vendor/codeception/codeception/codecept run acceptance OnlinePaymentCest.php
|
- php ./vendor/codeception/codeception/codecept run acceptance OnlinePaymentCest.php
|
||||||
#- php ./vendor/codeception/codeception/codecept run --debug acceptance PaymentCest.php
|
- php ./vendor/codeception/codeception/codecept run --debug acceptance PaymentCest.php
|
||||||
#- php ./vendor/codeception/codeception/codecept run --debug acceptance TaskCest.php
|
- php ./vendor/codeception/codeception/codecept run --debug acceptance TaskCest.php
|
||||||
#- php ./vendor/codeception/codeception/codecept run --debug acceptance TaxRatesCest.php
|
- php ./vendor/codeception/codeception/codecept run --debug acceptance TaxRatesCest.php
|
||||||
|
|
||||||
#- sed -i 's/NINJA_DEV=true/NINJA_PROD=true/g' .env
|
#- sed -i 's/NINJA_DEV=true/NINJA_PROD=true/g' .env
|
||||||
#- php ./vendor/codeception/codeception/codecept run acceptance GoProCest.php
|
#- php ./vendor/codeception/codeception/codecept run acceptance GoProCest.php
|
||||||
|
@ -243,6 +243,7 @@ class AppController extends BaseController
|
|||||||
if (!Utils::isNinjaProd()) {
|
if (!Utils::isNinjaProd()) {
|
||||||
try {
|
try {
|
||||||
set_time_limit(60 * 5);
|
set_time_limit(60 * 5);
|
||||||
|
Artisan::call('optimize', array('--force' => true));
|
||||||
Cache::flush();
|
Cache::flush();
|
||||||
Session::flush();
|
Session::flush();
|
||||||
Artisan::call('migrate', array('--force' => true));
|
Artisan::call('migrate', array('--force' => true));
|
||||||
@ -254,7 +255,6 @@ class AppController extends BaseController
|
|||||||
] as $seeder) {
|
] as $seeder) {
|
||||||
Artisan::call('db:seed', array('--force' => true, '--class' => "{$seeder}Seeder"));
|
Artisan::call('db:seed', array('--force' => true, '--class' => "{$seeder}Seeder"));
|
||||||
}
|
}
|
||||||
Artisan::call('optimize', array('--force' => true));
|
|
||||||
Event::fire(new UserSettingsChanged());
|
Event::fire(new UserSettingsChanged());
|
||||||
Session::flash('message', trans('texts.processed_updates'));
|
Session::flash('message', trans('texts.processed_updates'));
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
@ -10,8 +10,6 @@ use App\Events\UserLoggedIn;
|
|||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Ninja\Repositories\AccountRepository;
|
use App\Ninja\Repositories\AccountRepository;
|
||||||
use App\Services\AuthService;
|
use App\Services\AuthService;
|
||||||
use Illuminate\Contracts\Auth\Guard;
|
|
||||||
use Illuminate\Contracts\Auth\Registrar;
|
|
||||||
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
|
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
|
||||||
|
|
||||||
class AuthController extends Controller {
|
class AuthController extends Controller {
|
||||||
@ -41,16 +39,38 @@ class AuthController extends Controller {
|
|||||||
* @param \Illuminate\Contracts\Auth\Registrar $registrar
|
* @param \Illuminate\Contracts\Auth\Registrar $registrar
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct(Guard $auth, Registrar $registrar, AccountRepository $repo, AuthService $authService)
|
public function __construct(AccountRepository $repo, AuthService $authService)
|
||||||
{
|
{
|
||||||
$this->auth = $auth;
|
|
||||||
$this->registrar = $registrar;
|
|
||||||
$this->accountRepo = $repo;
|
$this->accountRepo = $repo;
|
||||||
$this->authService = $authService;
|
$this->authService = $authService;
|
||||||
|
|
||||||
//$this->middleware('guest', ['except' => 'getLogout']);
|
//$this->middleware('guest', ['except' => 'getLogout']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function validator(array $data)
|
||||||
|
{
|
||||||
|
return Validator::make($data, [
|
||||||
|
'name' => 'required|max:255',
|
||||||
|
'email' => 'required|email|max:255|unique:users',
|
||||||
|
'password' => 'required|confirmed|min:6',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new user instance after a valid registration.
|
||||||
|
*
|
||||||
|
* @param array $data
|
||||||
|
* @return User
|
||||||
|
*/
|
||||||
|
public function create(array $data)
|
||||||
|
{
|
||||||
|
return User::create([
|
||||||
|
'name' => $data['name'],
|
||||||
|
'email' => $data['email'],
|
||||||
|
'password' => bcrypt($data['password']),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
public function authLogin($provider, Request $request)
|
public function authLogin($provider, Request $request)
|
||||||
{
|
{
|
||||||
return $this->authService->execute($provider, $request->has('code'));
|
return $this->authService->execute($provider, $request->has('code'));
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
<?php namespace App\Http\Controllers\Auth;
|
<?php namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Illuminate\Contracts\Auth\Guard;
|
|
||||||
use Illuminate\Contracts\Auth\PasswordBroker;
|
|
||||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||||
|
|
||||||
class PasswordController extends Controller {
|
class PasswordController extends Controller {
|
||||||
@ -29,11 +27,8 @@ class PasswordController extends Controller {
|
|||||||
* @param \Illuminate\Contracts\Auth\PasswordBroker $passwords
|
* @param \Illuminate\Contracts\Auth\PasswordBroker $passwords
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct(Guard $auth, PasswordBroker $passwords)
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->auth = $auth;
|
|
||||||
$this->passwords = $passwords;
|
|
||||||
|
|
||||||
$this->middleware('guest');
|
$this->middleware('guest');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
<?php namespace App\Services;
|
|
||||||
|
|
||||||
use App\Model\User;
|
|
||||||
use Validator;
|
|
||||||
use Illuminate\Contracts\Auth\Registrar as RegistrarContract;
|
|
||||||
|
|
||||||
class Registrar implements RegistrarContract {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a validator for an incoming registration request.
|
|
||||||
*
|
|
||||||
* @param array $data
|
|
||||||
* @return \Illuminate\Contracts\Validation\Validator
|
|
||||||
*/
|
|
||||||
public function validator(array $data)
|
|
||||||
{
|
|
||||||
return Validator::make($data, [
|
|
||||||
'name' => 'required|max:255',
|
|
||||||
'email' => 'required|email|max:255|unique:users',
|
|
||||||
'password' => 'required|confirmed|min:6',
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new user instance after a valid registration.
|
|
||||||
*
|
|
||||||
* @param array $data
|
|
||||||
* @return User
|
|
||||||
*/
|
|
||||||
public function create(array $data)
|
|
||||||
{
|
|
||||||
return User::create([
|
|
||||||
'name' => $data['name'],
|
|
||||||
'email' => $data['email'],
|
|
||||||
'password' => bcrypt($data['password']),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -30,7 +30,7 @@ require __DIR__.'/../vendor/autoload.php';
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$compiledPath = __DIR__.'/../vendor/compiled.php';
|
$compiledPath = __DIR__.'/cache/compiled.php';
|
||||||
|
|
||||||
if (file_exists($compiledPath))
|
if (file_exists($compiledPath))
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
"omnipay/2checkout": "dev-master#e9c079c2dde0d7ba461903b3b7bd5caf6dee1248",
|
"omnipay/2checkout": "dev-master#e9c079c2dde0d7ba461903b3b7bd5caf6dee1248",
|
||||||
"omnipay/gocardless": "dev-master",
|
"omnipay/gocardless": "dev-master",
|
||||||
"omnipay/stripe": "2.3.0",
|
"omnipay/stripe": "2.3.0",
|
||||||
"laravel/framework": "5.0.*",
|
"laravel/framework": "5.1.*",
|
||||||
"patricktalmadge/bootstrapper": "5.5.x",
|
"patricktalmadge/bootstrapper": "5.5.x",
|
||||||
"anahkiasen/former": "4.0.*@dev",
|
"anahkiasen/former": "4.0.*@dev",
|
||||||
"barryvdh/laravel-debugbar": "~2.0.2",
|
"barryvdh/laravel-debugbar": "~2.0.2",
|
||||||
|
793
composer.lock
generated
793
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -137,7 +137,8 @@ return [
|
|||||||
'Illuminate\Translation\TranslationServiceProvider',
|
'Illuminate\Translation\TranslationServiceProvider',
|
||||||
'Illuminate\Validation\ValidationServiceProvider',
|
'Illuminate\Validation\ValidationServiceProvider',
|
||||||
'Illuminate\View\ViewServiceProvider',
|
'Illuminate\View\ViewServiceProvider',
|
||||||
|
'Illuminate\Broadcasting\BroadcastServiceProvider',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Additional Providers
|
* Additional Providers
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user