Skip to content

Commit 46a3a45

Browse files
committed
Merge branch 'release/6.0.3'
2 parents 582c8ab + 90d1355 commit 46a3a45

File tree

19 files changed

+1363
-1212
lines changed

19 files changed

+1363
-1212
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ DB_PASSWORD=secret
2323
BROADCAST_DRIVER=log
2424
CACHE_DRIVER=file
2525
QUEUE_CONNECTION=sync
26-
SESSION_DRIVER=cookie
26+
SESSION_DRIVER=file
2727
SESSION_LIFETIME=120
2828
SESSION_ENCRYPT=false
2929

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file.
33

44
## [Unreleased]
55

6+
## [6.0.3] - 2020-02-17
7+
8+
### Changed
9+
10+
- Update to Laravel commit: c78a1d8184f00f8270d8a135cc21590837b6bfbd
11+
- Fix log viewer error
12+
- Rename include_route_files to include_files_in_folder
13+
- Update form-control-file class
14+
615
## [6.0.2] - 2020-01-01
716

817
### Changed
@@ -167,7 +176,8 @@ All notable changes to this project will be documented in this file.
167176
- Fix yarn tests
168177
- Fix: Socially logged in users get assigned the default role
169178

170-
[Unreleased]: https://github.com/rappasoft/laravel-boilerplate/compare/v6.0.2...development
179+
[Unreleased]: https://github.com/rappasoft/laravel-boilerplate/compare/v6.0.3...development
180+
[6.0.3]: https://github.com/rappasoft/laravel-boilerplate/compare/v6.0.2...v6.0.3
171181
[6.0.2]: https://github.com/rappasoft/laravel-boilerplate/compare/v6.0.1...v6.0.2
172182
[6.0.1]: https://github.com/rappasoft/laravel-boilerplate/compare/v6.0.0...v6.0.1
173183
[6.0.0]: https://github.com/rappasoft/laravel-boilerplate/compare/v5.3.8...v6.0.0

app/Helpers/General/TimezoneHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class TimezoneHelper
1515
*
1616
* @return Carbon
1717
*/
18-
public function convertToLocal(Carbon $date, $format = 'D M j G:i:s T Y') : string
18+
public function convertToLocal(Carbon $date, $format = 'D M j G:i:s T Y'): string
1919
{
2020
return $date->setTimezone(auth()->user()->timezone ?? config('app.timezone'))->format($format);
2121
}
@@ -25,7 +25,7 @@ public function convertToLocal(Carbon $date, $format = 'D M j G:i:s T Y') : stri
2525
*
2626
* @return Carbon
2727
*/
28-
public function convertFromLocal($date) : Carbon
28+
public function convertFromLocal($date): Carbon
2929
{
3030
return Carbon::parse($date, auth()->user()->timezone)->setTimezone('UTC');
3131
}

app/Helpers/Global/SystemHelper.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php
22

3-
if (! function_exists('include_route_files')) {
3+
if (! function_exists('include_files_in_folder')) {
44
/**
55
* Loops through a folder and requires all PHP files
66
* Searches sub-directories as well.
77
*
88
* @param $folder
99
*/
10-
function include_route_files($folder)
10+
function include_files_in_folder($folder)
1111
{
1212
try {
1313
$rdi = new RecursiveDirectoryIterator($folder);
@@ -25,3 +25,16 @@ function include_route_files($folder)
2525
}
2626
}
2727
}
28+
29+
if (! function_exists('include_route_files')) {
30+
/**
31+
* Loops through a folder and requires all PHP files
32+
* Searches sub-directories as well.
33+
*
34+
* @param $folder
35+
*/
36+
function include_route_files($folder)
37+
{
38+
include_files_in_folder($folder);
39+
}
40+
}

app/Models/Auth/Traits/Attribute/UserAttribute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ trait UserAttribute
1212
/**
1313
* @param $password
1414
*/
15-
public function setPasswordAttribute($password) : void
15+
public function setPasswordAttribute($password): void
1616
{
1717
// If password was accidentally passed in already hashed, try not to double hash it
1818
if (

app/Observers/User/UserObserver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class UserObserver
1414
*
1515
* @param \App\Models\Auth\User $user
1616
*/
17-
public function created(User $user) : void
17+
public function created(User $user): void
1818
{
1919
$this->logPasswordHistory($user);
2020
}
@@ -24,7 +24,7 @@ public function created(User $user) : void
2424
*
2525
* @param \App\Models\Auth\User $user
2626
*/
27-
public function updated(User $user) : void
27+
public function updated(User $user): void
2828
{
2929
// Only log password history on update if the password actually changed
3030
if ($user->isDirty('password')) {
@@ -35,7 +35,7 @@ public function updated(User $user) : void
3535
/**
3636
* @param User $user
3737
*/
38-
private function logPasswordHistory(User $user) : void
38+
private function logPasswordHistory(User $user): void
3939
{
4040
if (config('access.users.password_history')) {
4141
$user->passwordHistories()->create([

app/Repositories/Backend/Auth/RoleRepository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct(Role $model)
3131
* @throws \Throwable
3232
* @return Role
3333
*/
34-
public function create(array $data) : Role
34+
public function create(array $data): Role
3535
{
3636
// Make sure it doesn't already exist
3737
if ($this->roleExists($data['name'])) {
@@ -112,7 +112,7 @@ public function update(Role $role, array $data)
112112
*
113113
* @return bool
114114
*/
115-
protected function roleExists($name) : bool
115+
protected function roleExists($name): bool
116116
{
117117
return $this->model
118118
->where('name', strtolower($name))

app/Repositories/Backend/Auth/UserRepository.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct(User $model)
3737
/**
3838
* @return mixed
3939
*/
40-
public function getUnconfirmedCount() : int
40+
public function getUnconfirmedCount(): int
4141
{
4242
return $this->model
4343
->where('confirmed', false)
@@ -51,7 +51,7 @@ public function getUnconfirmedCount() : int
5151
*
5252
* @return mixed
5353
*/
54-
public function getActivePaginated($paged = 25, $orderBy = 'created_at', $sort = 'desc') : LengthAwarePaginator
54+
public function getActivePaginated($paged = 25, $orderBy = 'created_at', $sort = 'desc'): LengthAwarePaginator
5555
{
5656
return $this->model
5757
->with('roles', 'permissions', 'providers')
@@ -67,7 +67,7 @@ public function getActivePaginated($paged = 25, $orderBy = 'created_at', $sort =
6767
*
6868
* @return LengthAwarePaginator
6969
*/
70-
public function getInactivePaginated($paged = 25, $orderBy = 'created_at', $sort = 'desc') : LengthAwarePaginator
70+
public function getInactivePaginated($paged = 25, $orderBy = 'created_at', $sort = 'desc'): LengthAwarePaginator
7171
{
7272
return $this->model
7373
->with('roles', 'permissions', 'providers')
@@ -83,7 +83,7 @@ public function getInactivePaginated($paged = 25, $orderBy = 'created_at', $sort
8383
*
8484
* @return LengthAwarePaginator
8585
*/
86-
public function getDeletedPaginated($paged = 25, $orderBy = 'created_at', $sort = 'desc') : LengthAwarePaginator
86+
public function getDeletedPaginated($paged = 25, $orderBy = 'created_at', $sort = 'desc'): LengthAwarePaginator
8787
{
8888
return $this->model
8989
->with('roles', 'permissions', 'providers')
@@ -99,7 +99,7 @@ public function getDeletedPaginated($paged = 25, $orderBy = 'created_at', $sort
9999
* @throws \Throwable
100100
* @return User
101101
*/
102-
public function create(array $data) : User
102+
public function create(array $data): User
103103
{
104104
return DB::transaction(function () use ($data) {
105105
$user = $this->model::create([
@@ -150,7 +150,7 @@ public function create(array $data) : User
150150
* @throws \Throwable
151151
* @return User
152152
*/
153-
public function update(User $user, array $data) : User
153+
public function update(User $user, array $data): User
154154
{
155155
$this->checkUserByEmail($user, $data['email']);
156156

@@ -185,7 +185,7 @@ public function update(User $user, array $data) : User
185185
* @throws GeneralException
186186
* @return User
187187
*/
188-
public function updatePassword(User $user, $input) : User
188+
public function updatePassword(User $user, $input): User
189189
{
190190
if ($user->update(['password' => $input['password']])) {
191191
event(new UserPasswordChanged($user));
@@ -203,7 +203,7 @@ public function updatePassword(User $user, $input) : User
203203
* @throws GeneralException
204204
* @return User
205205
*/
206-
public function mark(User $user, $status) : User
206+
public function mark(User $user, $status): User
207207
{
208208
if ($status === 0 && auth()->id() === $user->id) {
209209
throw new GeneralException(__('exceptions.backend.access.users.cant_deactivate_self'));
@@ -233,7 +233,7 @@ public function mark(User $user, $status) : User
233233
* @throws GeneralException
234234
* @return User
235235
*/
236-
public function confirm(User $user) : User
236+
public function confirm(User $user): User
237237
{
238238
if ($user->confirmed) {
239239
throw new GeneralException(__('exceptions.backend.access.users.already_confirmed'));
@@ -262,7 +262,7 @@ public function confirm(User $user) : User
262262
* @throws GeneralException
263263
* @return User
264264
*/
265-
public function unconfirm(User $user) : User
265+
public function unconfirm(User $user): User
266266
{
267267
if (! $user->confirmed) {
268268
throw new GeneralException(__('exceptions.backend.access.users.not_confirmed'));
@@ -298,7 +298,7 @@ public function unconfirm(User $user) : User
298298
* @throws \Throwable
299299
* @return User
300300
*/
301-
public function forceDelete(User $user) : User
301+
public function forceDelete(User $user): User
302302
{
303303
if ($user->deleted_at === null) {
304304
throw new GeneralException(__('exceptions.backend.access.users.delete_first'));
@@ -325,7 +325,7 @@ public function forceDelete(User $user) : User
325325
* @throws GeneralException
326326
* @return User
327327
*/
328-
public function restore(User $user) : User
328+
public function restore(User $user): User
329329
{
330330
if ($user->deleted_at === null) {
331331
throw new GeneralException(__('exceptions.backend.access.users.cant_restore'));

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"facade/ignition-self-diagnosis": "^1.0",
3535
"facade/ignition-tinker-tab": "^1.0",
3636
"friendsofphp/php-cs-fixer": "^2.14",
37-
"fzaninotto/faker": "^1.4",
37+
"fzaninotto/faker": "^1.9.1",
3838
"mockery/mockery": "^1.0",
3939
"nunomaduro/collision": "^3.0",
4040
"phpunit/phpunit": "^8.0",

0 commit comments

Comments
 (0)