Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[HttpFoundation] Fix the build on windows (with mbstring extension missing)#18029

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

Closed

Conversation

@jakzal
Copy link
Contributor

QA
Branch2.3
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PR-

An alternative approach to#16656 that works without the mbstring extension. If we tried to follow the current approach and make it work without mbstring it would make code quite more complex.

@jakzal
Copy link
ContributorAuthor

Hm.. the issue is not fully fixed just yet.

Before the build was failing with two errors:

Testing src/Symfony/Component/HttpFoundation..............................E..Fatal error: Call to undefined function Symfony\Component\HttpFoundation\mb_detect_encoding() in C:\projects\symfony\src\Symfony\Component\HttpFoundation\BinaryFileResponse.php on line 164PHP Fatal error:  Call to undefined function Symfony\Component\HttpFoundation\mb_detect_encoding() in C:\projects\symfony\src\Symfony\Component\HttpFoundation\BinaryFileResponse.php on line 164KO src/Symfony/Component/HttpFoundation
1) Symfony\Component\HttpFoundation\Tests\BinaryFileResponseTest::testConstructWithNonAsciiFilenameSymfony\Component\HttpFoundation\File\Exception\FileNotFoundException: The file "C:\projects\symfony\src\Symfony\Component\HttpFoundation\Tests/Fixtures/föö.html" does not existC:\projects\symfony\src\Symfony\Component\HttpFoundation\File\File.php:37C:\projects\symfony\src\Symfony\Component\HttpFoundation\BinaryFileResponse.php:93C:\projects\symfony\src\Symfony\Component\HttpFoundation\BinaryFileResponse.php:52C:\projects\symfony\src\Symfony\Component\HttpFoundation\Tests\BinaryFileResponseTest.php:39

With this PR it only fails with the second one.

@xabbuh I'm not sure why it was earlier implemented with a loop through all the characters. Perhaps you could give some more insights?

@wouterj
Copy link
Member

Any reason not to usehttps://github.com/symfony/polyfill-mbstring as it provides a polyfill for the mb functions used here?

@jakzal
Copy link
ContributorAuthor

@wouterj that's an option indeed

A file with non-ascii characters in the name needs to be created from PHPin order for it to be read properly on all platforms.
@jakzal
Copy link
ContributorAuthor

Tests fixed. Just bare in mind this is an alternative to#18030.

status: needs review

@jakzal
Copy link
ContributorAuthor

Actually, this will only work with unicode, while the existing solution supports all available encodings.

@jakzaljakzal closed thisMar 6, 2016
@jakzaljakzal deleted the binary-file-response-windows-tests branchMarch 6, 2016 18:07
nicolas-grekas added a commit that referenced this pull requestMar 7, 2016
…ll (jakzal)This PR was squashed before being merged into the 2.3 branch (closes#18030).Discussion----------[HttpFoundation] Add a dependency on the mbstring polyfill| Q             | A| ------------- | ---| Branch        | 2.3| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? |no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -Alternative for#18029.Commits-------59b9f15 [HttpFoundation] Add a dependency on the mbstring polyfill
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@jakzal@wouterj@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp