-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.8] Fix exception: The filename fallback must only contain ASCII characters. #28551
[5.8] Fix exception: The filename fallback must only contain ASCII characters. #28551
Conversation
@driesvints thanks, I improved the test! |
|
@taylorotwell thank you, I did not think about it. I fix it! |
@@ -138,7 +138,8 @@ public function response($path, $name = null, array $headers = [], $disposition | |||
{ | |||
$response = new StreamedResponse; | |||
|
|||
$disposition = $response->headers->makeDisposition($disposition, $name ?? basename($path)); | |||
$target_name = $name ?? basename($path); |
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.
$target_name
camelCase 😃
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.
@fragkp continuous-integration/styleci/pr
says that everything is ok. camelCase is this private requirement?
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'm wondering why stylci is not failing. camelCase is the default for variable names in laravel. You could check this in all other files.
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.
StyleCI cannot fail for those cases, because it is not possible to fix such cases without breaking dynamic code. There are also various special cases where snake case is needed.
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.
Okay, I fixed it.
But need to fix the automatic codestyle verification.
External developers don't know your local codestyle rules.
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.
But need to fix the automatic codestyle verification.
As I said, it is not broken. It is inherently not possible to safely rename variables.
Generate and pass
$filenameFallback
param to\Symfony\Component\HttpFoundation\HeaderUtils::makeDisposition()
.Problem: downloading files with Cyrillic names does not work. Test complete.
\Illuminate\Tests\Filesystem\FilesystemAdapterTest::testDownloadNonAsciiFilename()