Add all root project env files to ImportantFiles#9289
Add all root project env files to ImportantFiles#9289haidubogdan wants to merge 1 commit intoapache:masterfrom
Conversation
|
Just checking if the mime update is too extensive, and if it's ok for you to have all env files under ImportantFiles for web projects. |
mbien
left a comment
There was a problem hiding this comment.
looks good to me but I have limited experience regarding php.
maybe @matthiasblaesing could take a quick look
matthiasblaesing
left a comment
There was a problem hiding this comment.
The matching is too broad. For example "test.env.js" or "test.env.ini" will also be matched and instead of being correctly handled as their correct mimetype env will occupy them.
I think it would be good to split the two different problems into different PRs. The change to the grammar makes sense to me. The broad mime type squatting does not.
| @MIMEResolver.ExtensionRegistration( | ||
| extension = {"env", "Env"}, | ||
| displayName = "Env", | ||
| mimeType = MIME_TYPE, | ||
| position = 193 | ||
| ) |
There was a problem hiding this comment.
Shouldn't this be covered by resources/mime-resolver.xml?
|
Thank you @matthiasblaesing . |
Not sure that I get what you mean. The problem with .env files from my POV is, that they are an ad-hoc solution combined with a bad naming convention. From my POV it would much more sense to call the shown .env files What might be acceptable for the substring matcher would be to move the mimetype mapping far down and let it be considered last/late. That might need adjustment to other modules (the LSP integrations currently have a very high position, so this might need to be lowered). |
|
The existing My issue was with ".test" file extensions, I noticed that there are Symfony php Projects which use I agree it is a bad naming convention, a bit confusing to find a pattern, but maybe we can find a balanced solution that can work for most of the IDE users. |
a33a91f to
3ec3cce
Compare
Closes apache#9229 - additional coloring lexer fix for single quoted string with slash - adjust env file resolver to match files starting in ".env." - exclude files with lexer and errors extension from env mime type
3ec3cce to
3752cca
Compare
Closes #9229
Coloring fix for single quoted string
There was a escape done on slash inside strings, which created a small coloring issue.
Before:
After:
File association
Before:
.env.testand.env.local.demowere not under env mime typeAfter:
^Add meaningful description above
Click to collapse/expand PR instructions
By opening a pull request you confirm that, unless explicitly stated otherwise, the changes -
Please make sure (eg.
git log) that all commits have a valid name and email address for you in the Author field.If you're a first time contributor, see the Contributing guidelines for more information.
If you're a committer, please label the PR before pressing "Create pull request" so that the right test jobs can run.
PR approval and merge checklist:
If this PR targets the delivery branch: don't merge. (full wiki article)