-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
Description
I18nExtractCommand creates files with permissions of 664, but directories (e.g., resources/locales if it doesn't already exist) with permissions of 770.
I tried looking at the I18nExtractCommand::_writeFiles() method: the method calls Filesystem::dumpFile(), which in turn should call mkdir() (which defaults to 755, as I'd expect).
But this doesn't happen, because the I18nExtractCommand::_isPathUsable() method intervenes first, called by execute(), which creates the directory if it doesn't exist.
This isn't a big problem, but it's given me a few headaches more than once in the last few years, because some localizations wouldn't work, and I spent a lot of time investigating the domain name and filenames or other possible problems.
I don't open a PR directly, I know it would be enough to change I18nExtractCommand::_isPathUsable(), but I wonder:
- if there is an explicit reason for choosing 770 (but all the other features, such as bake's, don't do that);
- if there is a reason for not delegating to
Filesystem.
CakePHP Version
5.2
PHP Version
No response