statamic / ideas

💡Discussions on ideas and feature requests for Statamic
https://statamic.dev
30 stars 1 forks source link

Statamic does not read `.yml`, but only `.yaml` #1091

Open tobimori opened 6 months ago

tobimori commented 6 months ago

Bug description

.yml is commonly used as alias for .yaml, although Statamic doesn't support this extension.

Yes, this is probably not an issue for most people, because the CP always uses .yaml.

I commonly use .yml when editing those files by hand and just came across this. Feel free to close this issue if it's too hard to fix, although I believe this is probably just editing a one-liner to make the a optional.

How to reproduce

Create a valid fieldset file with .yml in resources/fieldsets - it won't show up in Statamic.

Logs

No response

Environment

Statamic 4.38.0
Laravel 10.34.2

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

None

Additional details

No response

jackmcdade commented 6 months ago

Alas, this would require changing 90+ php files and over 450 references to an explicit ".yaml", not to mention error checking edge cases like what if there's a "file.yaml" and a "file.yml" in the same directory, and so on. It's just a really big undertaking to ensure we don't destabilize core features. I'm going to transfer this to the ideas repo because this just isn't something I see us tackling anytime soon, though I understand how it would make sense in a perfect world to have it work this way.

tobimori commented 6 months ago

thanks for checking in!