Skip to content

Commit 964e2fe

Browse files
committed
updated for laravel 5.1
1 parent fda0abe commit 964e2fe

File tree

7 files changed

+17
-6
lines changed

7 files changed

+17
-6
lines changed

app/Authentication/Controllers/UserController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public function editProfile()
183183
{
184184
$user_profile = new UserProfile(["user_id" => $user_id]);
185185
}
186-
$custom_profile_repo = App::make('custom_profile_repository', $user_profile->id);
186+
$custom_profile_repo = App::make('custom_profile_repository', [$user_profile->id]);
187187

188188
return View::make('laravel-authentication-acl::admin.user.profile')->with([
189189
'user_profile' => $user_profile,
@@ -215,7 +215,7 @@ public function editOwnProfile()
215215
{
216216
$logged_user = $this->auth->getLoggedUser();
217217

218-
$custom_profile_repo = App::make('custom_profile_repository', $logged_user->user_profile()->first()->id);
218+
$custom_profile_repo = App::make('custom_profile_repository', [$logged_user->user_profile()->first()->id]);
219219

220220
return View::make('laravel-authentication-acl::admin.user.self-profile')
221221
->with([

app/Authentication/Services/UserProfileService.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* @author jacopo beschi jacopo@jacopobeschi.com
77
*/
88
use App;
9-
use Illuminate\Database\Eloquent\ModelNotFoundException;
109
use Illuminate\Support\MessageBag;
1110
use LaravelAcl\Authentication\Exceptions\PermissionException;
1211
use LaravelAcl\Authentication\Validators\UserProfileUserValidator;
@@ -123,7 +122,7 @@ public function getErrors()
123122
*/
124123
protected function saveCustomProfileFields($input, $user_profile)
125124
{
126-
$custom_profile_repository = App::make('custom_profile_repository', $user_profile->id);
125+
$custom_profile_repository = App::make('custom_profile_repository', [$user_profile->id]);
127126
foreach($input as $input_key => $value)
128127
{
129128
if(($profile_field_type_id_position = $this->isCustomFieldKey($input_key)) !== false)

bootstrap/autoload.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
|
2828
*/
2929

30-
$compiledPath = __DIR__.'/../storage/framework/compiled.php';
30+
//$compiledPath = __DIR__.'/../storage/framework/compiled.php';
31+
// Laravel 5.1 upgrade
32+
$compiledPath = __DIR__.'/cache/compiled.php';
3133

3234
if (file_exists($compiledPath))
3335
{

bootstrap/cache/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

config/app.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@
136136
'Illuminate\Validation\ValidationServiceProvider',
137137
'Illuminate\View\ViewServiceProvider',
138138

139+
// Laravel 5.1 upgrade
140+
//'Illuminate\Broadcasting\BroadcastServiceProvider',
141+
139142
/*
140143
* Application Service Providers...
141144
*/

tests/unit/AuthControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private function mockAuthenticationFails($email, $password, $remember)
143143

144144
/**
145145
* @test
146-
* TODO fix this when try to send mail
146+
* @jtodoIMP TODO fix this when try to send mail
147147
**/
148148
public function it_process_recovery_data_and_redirect_with_success()
149149
{

tests/unit/TestCase.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php namespace LaravelAcl\Authentication\Tests\Unit;
22

33
use Carbon\Carbon;
4+
use Illuminate\Queue\NullQueue;
45
use Illuminate\Support\Facades\Mail;
56
use LaravelAcl\Authentication\Tests\Unit\Stubs\NullLogger;
67
use Illuminate\Config\EnvironmentVariables;
@@ -14,11 +15,15 @@
1415
class TestCase extends LaravelTestCase {
1516

1617
protected $custom_environment;
18+
// Laravel 5.1 upgrade
19+
protected $baseUrl = 'http://localhost';
1720

1821
public function setUp()
1922
{
2023
parent::setUp();
2124
$this->useNullLogger();
25+
// increase nesting level for swiftmailer send call stack
26+
ini_set('xdebug.max_nesting_level', 150);
2227
}
2328

2429
public function useNullLogger()

0 commit comments

Comments
 (0)