laravel/framework

Bad path for nested enums, created through artisan

已關閉

#60,152 建立於 2026年5月17日

 (1 則留言) (0 個反應) (0 位負責人)PHP (11,939 個分叉)batch import
help wanted

倉庫指標

星標
 (34,846 顆星)
PR 合併指標
 (平均合併 1天 22小時) (30 天內合併 129 個 PR)

描述

Laravel Version

13.9.0

PHP Version

8.4.1

Database Driver & Version

10.11.14-MariaDB-0+deb12u2 - Debian 12

Description

Creation enums by artisan command generates bad path for multiple results, except first one, if there is no Top-level folder in filesystem (In my case it is Enums folder).

If you execute php artisan make:enum Enums/Profile/HairColor, it will create Enums/Profile/HairColor.php as expected. But when you execute next command, like php artisan make:enum Enums/Profile/EyeColor, it will generate the file in folder Enums/Enums/Profile/HairColor.php.

Steps To Reproduce

php artisan make:enum Enums/Profile/HairColor php artisan make:enum Enums/Profile/EyeColor php artisan make:enum Enums/Profile/Ethnicity

貢獻者指南