Skip to content

Commit c33fc98

Browse files
committed
Refactor configuration files and improve code consistency across the application
1 parent 6857f0a commit c33fc98

File tree

17 files changed

+55
-29
lines changed

17 files changed

+55
-29
lines changed

app/Console/Commands/SimpedeBackup.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public function handle()
3131
$backupDisks = config('backup.backup.destination.disks', []);
3232

3333
if ($action === 'create') {
34+
$this->call('simpede:clean-temp');
3435
$this->call('action-events:clear');
3536
$this->call('backup:run');
3637
$this->call('backup:clean');

artisan

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env php
22
<?php
33

4+
use Illuminate\Foundation\Application;
45
use Symfony\Component\Console\Input\ArgvInput;
56

67
define('LARAVEL_START', microtime(true));
@@ -9,7 +10,9 @@ define('LARAVEL_START', microtime(true));
910
require __DIR__.'/vendor/autoload.php';
1011

1112
// Bootstrap Laravel and handle the command...
12-
$status = (require_once __DIR__.'/bootstrap/app.php')
13-
->handleCommand(new ArgvInput);
13+
/** @var Application $app */
14+
$app = require_once __DIR__.'/bootstrap/app.php';
15+
16+
$status = $app->handleCommand(new ArgvInput);
1417

1518
exit($status);

bootstrap/app.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
commands: __DIR__.'/../routes/console.php',
1111
health: '/up',
1212
)
13-
->withMiddleware(function (Middleware $middleware) {
13+
->withMiddleware(function (Middleware $middleware): void {
1414
//
1515
})
16-
->withExceptions(function (Exceptions $exceptions) {
16+
->withExceptions(function (Exceptions $exceptions): void {
1717
//
1818
})->create();

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,6 @@
106106
},
107107
"minimum-stability": "dev",
108108
"prefer-stable": true,
109-
"version": "2.15.0"
109+
"version": "2.15.0",
110+
"laravel": "12.3.1"
110111
}

config/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103

104104
'previous_keys' => [
105105
...array_filter(
106-
explode(',', env('APP_PREVIOUS_KEYS', ''))
106+
explode(',', (string) env('APP_PREVIOUS_KEYS', ''))
107107
),
108108
],
109109

config/auth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
| Password Confirmation Timeout
105105
|--------------------------------------------------------------------------
106106
|
107-
| Here you may define the amount of seconds before a password confirmation
107+
| Here you may define the number of seconds before a password confirmation
108108
| window expires and users are asked to re-enter their password via the
109109
| confirmation screen. By default, the timeout lasts for three hours.
110110
|

config/cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,6 @@
103103
|
104104
*/
105105

106-
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'),
106+
'prefix' => env('CACHE_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-cache-'),
107107

108108
];

config/database.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
'database' => env('DB_DATABASE', database_path('database.sqlite')),
3838
'prefix' => '',
3939
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
40+
'busy_timeout' => null,
41+
'journal_mode' => null,
42+
'synchronous' => null,
4043
],
4144

4245
'mysql' => [
@@ -144,7 +147,8 @@
144147

145148
'options' => [
146149
'cluster' => env('REDIS_CLUSTER', 'redis'),
147-
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
150+
'prefix' => env('REDIS_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-database-'),
151+
'persistent' => env('REDIS_PERSISTENT', false),
148152
],
149153

150154
'default' => [

config/filesystems.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@
3333
'local' => [
3434
'driver' => 'local',
3535
'root' => storage_path('app'),
36+
'serve' => true,
3637
'throw' => false,
38+
'report' => false,
3739
],
3840

3941
'public' => [
@@ -42,6 +44,7 @@
4244
'url' => env('APP_URL').'/storage',
4345
'visibility' => 'public',
4446
'throw' => false,
47+
'report' => false,
4548
],
4649

4750
'avatars' => [
@@ -50,6 +53,7 @@
5053
'url' => env('APP_URL').'/storage/avatars',
5154
'visibility' => 'public',
5255
'throw' => false,
56+
'report' => false,
5357
],
5458

5559
'arsip' => [
@@ -58,6 +62,7 @@
5862
'url' => env('APP_URL').'/storage/arsip',
5963
'visibility' => 'public',
6064
'throw' => false,
65+
'report' => false,
6166
],
6267

6368
'images' => [
@@ -66,6 +71,7 @@
6671
'url' => env('APP_URL').'/storage/images',
6772
'visibility' => 'public',
6873
'throw' => false,
74+
'report' => false,
6975
],
7076

7177
'naskah' => [
@@ -74,6 +80,7 @@
7480
'url' => env('APP_URL').'/storage/naskah',
7581
'visibility' => 'public',
7682
'throw' => false,
83+
'report' => false,
7784
],
7885

7986
'announcement' => [
@@ -82,6 +89,7 @@
8289
'url' => env('APP_URL').'/storage/announcement',
8390
'visibility' => 'public',
8491
'throw' => false,
92+
'report' => false,
8593
],
8694

8795
'template_naskah' => [
@@ -90,6 +98,7 @@
9098
'url' => env('APP_URL').'/storage/templates/naskah',
9199
'visibility' => 'public',
92100
'throw' => false,
101+
'report' => false,
93102
],
94103

95104
'templates' => [
@@ -98,6 +107,7 @@
98107
'url' => env('APP_URL').'/storage/templates',
99108
'visibility' => 'public',
100109
'throw' => false,
110+
'report' => false,
101111
],
102112

103113
'izin_keluar' => [
@@ -106,6 +116,7 @@
106116
'url' => env('APP_URL').'/storage/izinkeluar',
107117
'visibility' => 'public',
108118
'throw' => false,
119+
'report' => false,
109120
],
110121

111122
'pulsa' => [
@@ -114,6 +125,7 @@
114125
'url' => env('APP_URL').'/storage/pulsa',
115126
'visibility' => 'public',
116127
'throw' => false,
128+
'report' => false,
117129
],
118130

119131
'dokumentasi' => [
@@ -130,6 +142,7 @@
130142
'url' => env('APP_URL').'/storage/sakip',
131143
'visibility' => 'public',
132144
'throw' => false,
145+
'report' => false,
133146
],
134147

135148
'temp' => [
@@ -138,6 +151,7 @@
138151
'url' => env('APP_URL').'/storage/.temp',
139152
'visibility' => 'public',
140153
'throw' => false,
154+
'report' => false,
141155
],
142156

143157
's3' => [
@@ -150,6 +164,7 @@
150164
'endpoint' => env('AWS_ENDPOINT'),
151165
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
152166
'throw' => false,
167+
'report' => false,
153168
],
154169
'google' => [
155170
'driver' => 'google',

config/logging.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
'stack' => [
5656
'driver' => 'stack',
57-
'channels' => explode(',', env('LOG_STACK', 'single')),
57+
'channels' => explode(',', (string) env('LOG_STACK', 'single')),
5858
'ignore_exceptions' => false,
5959
],
6060

0 commit comments

Comments
 (0)