laravel/framework

Bad path for nested enums, created through artisan

クローズ

#60,152 opened on 2026/05/17

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)PHP (11,939 件のフォーク)batch import
help wanted

Repository metrics

Stars
 (34,846 個のスター)
PR merge metrics
 (平均マージ 1d 22h) (30d で 129 merged PRs)

説明

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

コントリビューターガイド