Creation of dynamic property Config\Validation::$users is deprecated
kenjis opened this issue · comments
kenjis commented
Bonfire2 does not work with PHP 8.2.
kenjis commented
The following patch fixes the errors.
Is the validation rule used actually?
--- a/src/Config/Registrar.php
+++ b/src/Config/Registrar.php
@@ -80,12 +80,12 @@ class Registrar
PasswordRules::class,
UserRules::class,
],
- 'users' => [
- 'email' => 'required|valid_email|unique_email[{id}]',
- 'username' => 'required|string|is_unique[users.username,id,{id}]',
- 'first_name' => 'permit_empty|string|min_length[3]',
- 'last_name' => 'permit_empty|string|min_length[3]',
- ],
+// 'users' => [
+// 'email' => 'required|valid_email|unique_email[{id}]',
+// 'username' => 'required|string|is_unique[users.username,id,{id}]',
+// 'first_name' => 'permit_empty|string|min_length[3]',
+// 'last_name' => 'permit_empty|string|min_length[3]',
+// ],
];
}
Donatas Glodenis commented
It does seem that these rules are not used; UserController class uses config directly (line 141: $rules = config('Users')->validation;