Skip to content

Commit 0bf8dab

Browse files
authored
[9.x] Lumen v9 prep (#1218)
* Update validation lang file * Skeleton changes
1 parent 93e0224 commit 0bf8dab

File tree

7 files changed

+55
-41
lines changed

7 files changed

+55
-41
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"phpunit/phpunit": "^9.5.8"
5757
},
5858
"suggest": {
59-
"laravel/tinker": "Required to use the tinker console command (^2.0).",
59+
"laravel/tinker": "Required to use the tinker console command (^2.7).",
6060
"nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).",
6161
"symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0)."
6262
},

config/cache.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
'database' => [
4444
'driver' => 'database',
4545
'table' => env('CACHE_DATABASE_TABLE', 'cache'),
46-
'connection' => env('CACHE_DATABASE_CONNECTION', null),
46+
'connection' => env('CACHE_DATABASE_CONNECTION'),
4747
],
4848

4949
'file' => [

config/database.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
5454
'prefix' => env('DB_PREFIX', ''),
5555
'strict' => env('DB_STRICT_MODE', true),
56-
'engine' => env('DB_ENGINE', null),
56+
'engine' => env('DB_ENGINE'),
5757
'timezone' => env('DB_TIMEZONE', '+00:00'),
5858
],
5959

@@ -66,7 +66,7 @@
6666
'password' => env('DB_PASSWORD', ''),
6767
'charset' => env('DB_CHARSET', 'utf8'),
6868
'prefix' => env('DB_PREFIX', ''),
69-
'schema' => env('DB_SCHEMA', 'public'),
69+
'search_path' => env('DB_SCHEMA', 'public'),
7070
'sslmode' => env('DB_SSL_MODE', 'prefer'),
7171
],
7272

@@ -119,15 +119,15 @@
119119
'default' => [
120120
'url' => env('REDIS_URL'),
121121
'host' => env('REDIS_HOST', '127.0.0.1'),
122-
'password' => env('REDIS_PASSWORD', null),
122+
'password' => env('REDIS_PASSWORD'),
123123
'port' => env('REDIS_PORT', '6379'),
124124
'database' => env('REDIS_DB', '0'),
125125
],
126126

127127
'cache' => [
128128
'url' => env('REDIS_URL'),
129129
'host' => env('REDIS_HOST', '127.0.0.1'),
130-
'password' => env('REDIS_PASSWORD', null),
130+
'password' => env('REDIS_PASSWORD'),
131131
'port' => env('REDIS_PORT', '6379'),
132132
'database' => env('REDIS_CACHE_DB', '1'),
133133
],

config/filesystems.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
|
1414
*/
1515

16-
'default' => env('FILESYSTEM_DRIVER', 'local'),
16+
'default' => env('FILESYSTEM_DISK', 'local'),
1717

1818
/*
1919
|--------------------------------------------------------------------------

config/logging.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,11 @@
7777
'papertrail' => [
7878
'driver' => 'monolog',
7979
'level' => 'debug',
80-
'handler' => SyslogUdpHandler::class,
80+
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
8181
'handler_with' => [
8282
'host' => env('PAPERTRAIL_URL'),
8383
'port' => env('PAPERTRAIL_PORT'),
84+
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
8485
],
8586
],
8687

resources/lang/en/validation.php

+45-32
Original file line numberDiff line numberDiff line change
@@ -14,47 +14,52 @@
1414
*/
1515

1616
'accepted' => 'The :attribute must be accepted.',
17+
'accepted_if' => 'The :attribute must be accepted when :other is :value.',
1718
'active_url' => 'The :attribute is not a valid URL.',
1819
'after' => 'The :attribute must be a date after :date.',
1920
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
20-
'alpha' => 'The :attribute may only contain letters.',
21-
'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
22-
'alpha_num' => 'The :attribute may only contain letters and numbers.',
21+
'alpha' => 'The :attribute must only contain letters.',
22+
'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.',
23+
'alpha_num' => 'The :attribute must only contain letters and numbers.',
2324
'array' => 'The :attribute must be an array.',
2425
'before' => 'The :attribute must be a date before :date.',
2526
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
2627
'between' => [
27-
'numeric' => 'The :attribute must be between :min and :max.',
28+
'array' => 'The :attribute must have between :min and :max items.',
2829
'file' => 'The :attribute must be between :min and :max kilobytes.',
30+
'numeric' => 'The :attribute must be between :min and :max.',
2931
'string' => 'The :attribute must be between :min and :max characters.',
30-
'array' => 'The :attribute must have between :min and :max items.',
3132
],
3233
'boolean' => 'The :attribute field must be true or false.',
3334
'confirmed' => 'The :attribute confirmation does not match.',
35+
'current_password' => 'The password is incorrect.',
3436
'date' => 'The :attribute is not a valid date.',
3537
'date_equals' => 'The :attribute must be a date equal to :date.',
3638
'date_format' => 'The :attribute does not match the format :format.',
39+
'declined' => 'The :attribute must be declined.',
40+
'declined_if' => 'The :attribute must be declined when :other is :value.',
3741
'different' => 'The :attribute and :other must be different.',
3842
'digits' => 'The :attribute must be :digits digits.',
3943
'digits_between' => 'The :attribute must be between :min and :max digits.',
4044
'dimensions' => 'The :attribute has invalid image dimensions.',
4145
'distinct' => 'The :attribute field has a duplicate value.',
4246
'email' => 'The :attribute must be a valid email address.',
43-
'ends_with' => 'The :attribute must end with one of the following: :values',
47+
'ends_with' => 'The :attribute must end with one of the following: :values.',
48+
'enum' => 'The selected :attribute is invalid.',
4449
'exists' => 'The selected :attribute is invalid.',
4550
'file' => 'The :attribute must be a file.',
46-
'filled' => 'The :attribute field is required.',
51+
'filled' => 'The :attribute field must have a value.',
4752
'gt' => [
48-
'numeric' => 'The :attribute must be greater than :value.',
53+
'array' => 'The :attribute must have more than :value items.',
4954
'file' => 'The :attribute must be greater than :value kilobytes.',
55+
'numeric' => 'The :attribute must be greater than :value.',
5056
'string' => 'The :attribute must be greater than :value characters.',
51-
'array' => 'The :attribute must have more than :value items.',
5257
],
5358
'gte' => [
54-
'numeric' => 'The :attribute must be greater than or equal :value.',
55-
'file' => 'The :attribute must be greater than or equal :value kilobytes.',
56-
'string' => 'The :attribute must be greater than or equal :value characters.',
5759
'array' => 'The :attribute must have :value items or more.',
60+
'file' => 'The :attribute must be greater than or equal to :value kilobytes.',
61+
'numeric' => 'The :attribute must be greater than or equal to :value.',
62+
'string' => 'The :attribute must be greater than or equal to :value characters.',
5863
],
5964
'image' => 'The :attribute must be an image.',
6065
'in' => 'The selected :attribute is invalid.',
@@ -65,56 +70,64 @@
6570
'ipv6' => 'The :attribute must be a valid IPv6 address.',
6671
'json' => 'The :attribute must be a valid JSON string.',
6772
'lt' => [
68-
'numeric' => 'The :attribute must be less than :value.',
73+
'array' => 'The :attribute must have less than :value items.',
6974
'file' => 'The :attribute must be less than :value kilobytes.',
75+
'numeric' => 'The :attribute must be less than :value.',
7076
'string' => 'The :attribute must be less than :value characters.',
71-
'array' => 'The :attribute must have less than :value items.',
7277
],
7378
'lte' => [
74-
'numeric' => 'The :attribute must be less than or equal :value.',
75-
'file' => 'The :attribute must be less than or equal :value kilobytes.',
76-
'string' => 'The :attribute must be less than or equal :value characters.',
7779
'array' => 'The :attribute must not have more than :value items.',
80+
'file' => 'The :attribute must be less than or equal to :value kilobytes.',
81+
'numeric' => 'The :attribute must be less than or equal to :value.',
82+
'string' => 'The :attribute must be less than or equal to :value characters.',
7883
],
84+
'mac_address' => 'The :attribute must be a valid MAC address.',
7985
'max' => [
80-
'numeric' => 'The :attribute may not be greater than :max.',
81-
'file' => 'The :attribute may not be greater than :max kilobytes.',
82-
'string' => 'The :attribute may not be greater than :max characters.',
83-
'array' => 'The :attribute may not have more than :max items.',
86+
'array' => 'The :attribute must not have more than :max items.',
87+
'file' => 'The :attribute must not be greater than :max kilobytes.',
88+
'numeric' => 'The :attribute must not be greater than :max.',
89+
'string' => 'The :attribute must not be greater than :max characters.',
8490
],
8591
'mimes' => 'The :attribute must be a file of type: :values.',
8692
'mimetypes' => 'The :attribute must be a file of type: :values.',
8793
'min' => [
88-
'numeric' => 'The :attribute must be at least :min.',
94+
'array' => 'The :attribute must have at least :min items.',
8995
'file' => 'The :attribute must be at least :min kilobytes.',
96+
'numeric' => 'The :attribute must be at least :min.',
9097
'string' => 'The :attribute must be at least :min characters.',
91-
'array' => 'The :attribute must have at least :min items.',
9298
],
99+
'multiple_of' => 'The :attribute must be a multiple of :value.',
93100
'not_in' => 'The selected :attribute is invalid.',
94101
'not_regex' => 'The :attribute format is invalid.',
95102
'numeric' => 'The :attribute must be a number.',
103+
'password' => 'The password is incorrect.',
96104
'present' => 'The :attribute field must be present.',
105+
'prohibited' => 'The :attribute field is prohibited.',
106+
'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
107+
'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.',
108+
'prohibits' => 'The :attribute field prohibits :other from being present.',
97109
'regex' => 'The :attribute format is invalid.',
98110
'required' => 'The :attribute field is required.',
111+
'required_array_keys' => 'The :attribute field must contain entries for: :values.',
99112
'required_if' => 'The :attribute field is required when :other is :value.',
100113
'required_unless' => 'The :attribute field is required unless :other is in :values.',
101114
'required_with' => 'The :attribute field is required when :values is present.',
102-
'required_with_all' => 'The :attribute field is required when :values is present.',
115+
'required_with_all' => 'The :attribute field is required when :values are present.',
103116
'required_without' => 'The :attribute field is required when :values is not present.',
104117
'required_without_all' => 'The :attribute field is required when none of :values are present.',
105118
'same' => 'The :attribute and :other must match.',
106119
'size' => [
107-
'numeric' => 'The :attribute must be :size.',
120+
'array' => 'The :attribute must contain :size items.',
108121
'file' => 'The :attribute must be :size kilobytes.',
122+
'numeric' => 'The :attribute must be :size.',
109123
'string' => 'The :attribute must be :size characters.',
110-
'array' => 'The :attribute must contain :size items.',
111124
],
112-
'starts_with' => 'The :attribute must start with one of the following: :values',
125+
'starts_with' => 'The :attribute must start with one of the following: :values.',
113126
'string' => 'The :attribute must be a string.',
114-
'timezone' => 'The :attribute must be a valid zone.',
127+
'timezone' => 'The :attribute must be a valid timezone.',
115128
'unique' => 'The :attribute has already been taken.',
116129
'uploaded' => 'The :attribute failed to upload.',
117-
'url' => 'The :attribute format is invalid.',
130+
'url' => 'The :attribute must be a valid URL.',
118131
'uuid' => 'The :attribute must be a valid UUID.',
119132

120133
/*
@@ -139,9 +152,9 @@
139152
| Custom Validation Attributes
140153
|--------------------------------------------------------------------------
141154
|
142-
| The following language lines are used to swap attribute place-holders
143-
| with something more reader friendly such as E-Mail Address instead
144-
| of "email". This simply helps us make messages a little cleaner.
155+
| The following language lines are used to swap our attribute placeholder
156+
| with something more reader friendly such as "E-Mail Address" instead
157+
| of "email". This simply helps us make our message more expressive.
145158
|
146159
*/
147160

src/Http/Request.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function fingerprint()
7272
* @param string $offset
7373
* @return bool
7474
*/
75-
public function offsetExists($offset)
75+
public function offsetExists($offset): bool
7676
{
7777
return Arr::has(
7878
$this->all() + $this->route()[2],

0 commit comments

Comments
 (0)