symfony
symfony copied to clipboard
[HttpFoundation] Add settable permissions and adopt stricter defaults
Q | A |
---|---|
Branch? | 6.0 |
Bug fix? | no |
New feature? | yes |
Deprecations? | no |
License | MIT |
Doc PR | symfony/symfony-docs#... |
While porting GNU social's TemporaryFile from v2 to v3, we've noticed that Symfony's File component didn't let us set permissions for new directories nor files. In addition, the default permission for directories is 0777.
If this was intended design, we would like to learn why; If not, I'll appreciate guidance on how to properly update the documentation and commit this patch.
Hey!
I see that this is your first PR. That is great! Welcome!
Symfony has a contribution guide which I suggest you to read.
In short:
- Always add tests
- Keep backward compatibility (see https://symfony.com/bc).
- Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
- Features and deprecations must be submitted against the 5.4 branch.
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.
When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.
I am going to sit back now and wait for the reviews.
Cheers!
Carsonbot
Rebased and fixed the issue found by psalm.
Hey!
I think @atailouloute has recently worked with this code. Maybe they can help review this?
Cheers!
Carsonbot