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:
|
||||
- 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 CheckBalanceCest.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 InvoiceCest.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 --debug acceptance PaymentCest.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 APICest.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 CreditCest.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 acceptance OnlinePaymentCest.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 TaxRatesCest.php
|
||||
|
||||
#- sed -i 's/NINJA_DEV=true/NINJA_PROD=true/g' .env
|
||||
#- php ./vendor/codeception/codeception/codecept run acceptance GoProCest.php
|
||||
|
@ -243,6 +243,7 @@ class AppController extends BaseController
|
||||
if (!Utils::isNinjaProd()) {
|
||||
try {
|
||||
set_time_limit(60 * 5);
|
||||
Artisan::call('optimize', array('--force' => true));
|
||||
Cache::flush();
|
||||
Session::flush();
|
||||
Artisan::call('migrate', array('--force' => true));
|
||||
@ -254,7 +255,6 @@ class AppController extends BaseController
|
||||
] as $seeder) {
|
||||
Artisan::call('db:seed', array('--force' => true, '--class' => "{$seeder}Seeder"));
|
||||
}
|
||||
Artisan::call('optimize', array('--force' => true));
|
||||
Event::fire(new UserSettingsChanged());
|
||||
Session::flash('message', trans('texts.processed_updates'));
|
||||
} catch (Exception $e) {
|
||||
|
@ -10,8 +10,6 @@ use App\Events\UserLoggedIn;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Ninja\Repositories\AccountRepository;
|
||||
use App\Services\AuthService;
|
||||
use Illuminate\Contracts\Auth\Guard;
|
||||
use Illuminate\Contracts\Auth\Registrar;
|
||||
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
|
||||
|
||||
class AuthController extends Controller {
|
||||
@ -41,16 +39,38 @@ class AuthController extends Controller {
|
||||
* @param \Illuminate\Contracts\Auth\Registrar $registrar
|
||||
* @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->authService = $authService;
|
||||
|
||||
//$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)
|
||||
{
|
||||
return $this->authService->execute($provider, $request->has('code'));
|
||||
|
@ -1,8 +1,6 @@
|
||||
<?php namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Contracts\Auth\Guard;
|
||||
use Illuminate\Contracts\Auth\PasswordBroker;
|
||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||
|
||||
class PasswordController extends Controller {
|
||||
@ -29,11 +27,8 @@ class PasswordController extends Controller {
|
||||
* @param \Illuminate\Contracts\Auth\PasswordBroker $passwords
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Guard $auth, PasswordBroker $passwords)
|
||||
public function __construct()
|
||||
{
|
||||
$this->auth = $auth;
|
||||
$this->passwords = $passwords;
|
||||
|
||||
$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))
|
||||
{
|
||||
|
@ -14,7 +14,7 @@
|
||||
"omnipay/2checkout": "dev-master#e9c079c2dde0d7ba461903b3b7bd5caf6dee1248",
|
||||
"omnipay/gocardless": "dev-master",
|
||||
"omnipay/stripe": "2.3.0",
|
||||
"laravel/framework": "5.0.*",
|
||||
"laravel/framework": "5.1.*",
|
||||
"patricktalmadge/bootstrapper": "5.5.x",
|
||||
"anahkiasen/former": "4.0.*@dev",
|
||||
"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,6 +137,7 @@ return [
|
||||
'Illuminate\Translation\TranslationServiceProvider',
|
||||
'Illuminate\Validation\ValidationServiceProvider',
|
||||
'Illuminate\View\ViewServiceProvider',
|
||||
'Illuminate\Broadcasting\BroadcastServiceProvider',
|
||||
|
||||
/*
|
||||
* Additional Providers
|
||||
|
Loading…
x
Reference in New Issue
Block a user