-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Description
What is the issue?
When the validation.exceptions.not_found translation is removed and an entity is generated (e.g., by running php artisan make:entity Blank ), the lang/en/validation.php file becomes broken. This happens because a duplicated exceptions key is added instead of adding the not_found key inside the existing exceptions key.
Expected Behavior
What should happen instead?
The new not_found key should be added inside the existing exceptions key of the lang/en/validation.php file without duplicating the exceptions key.
Steps to Reproduce
How can we replicate the issue?
1. Remove the validation.exceptions.not_found translation.
2. Run entity generation, for example: php artisan make:entity Blank .
Impact
What is the impact of the bug?
The lang/en/validation.php file becomes broken due to duplicated exceptions keys, which likely causes errors or incorrect behavior in translations.
Solution
The solution should use winter/laravel-config-writer to check if the translation does not exist, and then add it properly inside the existing exceptions key only if it is missing.