Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[HttpFoundation] Make ResponseHeaderBag::makeDisposition static#28807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
fabpot commentedOct 10, 2018
| Q | A |
|---|---|
| Branch? | master |
| Bug fix? | no |
| New feature? | yes-ish |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #27851 |
| License | MIT |
| Doc PR | n/a |
0dbb78a to4c4ad02Compare| * @see RFC 6266 | ||
| * @see HeaderUtils::makeDisposition() | ||
| */ | ||
| publicfunctionmakeDisposition($disposition,$filename,$filenameFallback ='') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
shall we deprecate then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
not sure it's worth it.
| * | ||
| * @see RFC 6266 | ||
| */ | ||
| publicstaticfunctionmakeDisposition($disposition,$filename,$filenameFallback ='') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
why not usingnull as default here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I've just moved the code and don't want to make other changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Makes sense 👍
Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
IMO new code should have type declarations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
done
| * | ||
| * @param string $disposition One of "inline" or "attachment" | ||
| * @param string $filename A unicode string | ||
| * @param string $filenameFallback A string containing only ASCII characters that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
IMO$fallback would be enough in this context
javiereguiluz left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Totally unrelated to this PR, but I always find hard to understand what does "disposition attachment" and "disposition inline" mean. Normal people call this "download file" and "display file". Maybe we should add some helpers somewhere?
Uh oh!
There was an error while loading.Please reload this page.
4c4ad02 to03471a3Compare03471a3 tod29b410Compare…on static (fabpot)This PR was merged into the 4.2-dev branch.Discussion----------[HttpFoundation] Make ResponseHeaderBag::makeDisposition static| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes-ish| BC breaks? | no| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tests pass? | yes| Fixed tickets |#27851| License | MIT| Doc PR | n/a<!--Write a short README entry for your feature/bugfix here (replace this comment block.)This will help people understand your PR and can be used as a start of the Doc PR.Additionally: - Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the master branch.-->Commits-------d29b410 [HttpFoundation] made ResponseHeaderBag::makeDisposition static
This PR was merged into the 4.2-dev branch.Discussion----------[HttpFoundation] Publicify new consts| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no <!-- seehttps://symfony.com/bc -->| Deprecations? | no| Tests pass? | yes <!-- please add some, will be required by reviewers -->| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->| License | MIT| Doc PR | symfony/symfony-docs#... <!-- required for new features -->Continuation of#28807I think it's reasonable to enforce visibility for new consts, ideally solved by PHP-CS-Fixer. This makes it explicit for the consts to be consumed as part of public API.Commits-------ce95d0d [HttpFoundation] Publicify new consts