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

[Serializer] Add CsvEncoder tests for PHP 7.4#32051

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

Merged
fabpot merged 1 commit intosymfony:3.4fromro0NL:csv
Sep 30, 2019
Merged

[Serializer] Add CsvEncoder tests for PHP 7.4#32051

fabpot merged 1 commit intosymfony:3.4fromro0NL:csv
Sep 30, 2019

Conversation

@ro0NL
Copy link
Contributor

QA
Branch?3.4
Bug fix?no
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#...
LicenseMIT
Doc PRsymfony/symfony-docs#...

Some CSV encoder tests to show the broken behavior of a trailing slash. Spotted in#31867, not sure what to do with it :)

@Simperfit
Copy link
Contributor

cc@dunglas

@nicolas-grekasnicolas-grekas added this to the3.4 milestoneJun 15, 2019
@nicolas-grekas
Copy link
Member

What should we do with this PR?

@ro0NL
Copy link
ContributorAuthor

we could merge as-is, maybe add the expected output using comments. Utimately this is broken in PHP:https://3v4l.org/reb5N

however we may want to look at

as well

@ro0NL
Copy link
ContributorAuthor

Oh, and here's the interesting part: as of 7.4 this seems fixed at the escape level:

https://3v4l.org/fkQDt

@ro0NLro0NL closed thisJul 18, 2019
@ro0NLro0NL reopened thisJul 18, 2019
@ro0NL
Copy link
ContributorAuthor

Im not sure what the point of$escape_char is

The optional escape_char parameter sets the escape character (at most one character). An empty string ("") disables the proprietary escape mechanism.

7.4.0 | The escape_char parameter now also accepts an empty string to disable the proprietary escape mechanism.

@nicolas-grekas
Copy link
Member

I'm not for merging a PR that proves a PHP bug...

@fabpot
Copy link
Member

I agree with@nicolas-grekas

@ro0NL
Copy link
ContributorAuthor

I think the solution is to change the default escape char from\ to an empty string and see what current tests do.

after#32289, we can test targeting php 7.4 as well.

I'll look into this 👍

@ro0NL
Copy link
ContributorAuthor

Right, we cant use 'empty string' on older PHP versions :)

If an enclosure character is contained in a field, it will be escaped by doubling it, unless it is immediately preceded by an escape_char. (https://php.net/fputcsv)

we always hit the issue if the last char in a cell value is the escaping character

https://3v4l.org/3NIb6 (fixes trailing slash by using tilde as escape char)
https://3v4l.org/YE3ht (breaks again with trailing tilde)

So i think the only way is to update the escape char in master for php 7.4 to an empty string.

dunglas reacted with thumbs up emoji

@nicolas-grekas
Copy link
Member

Why not 3.4? PHP 7.4 will be supported there too.

ro0NL and dunglas reacted with thumbs up emoji

@fabpot
Copy link
Member

What's the status here?

@ro0NLro0NL changed the title[Serializer] Add CsvEncoder tests[Serializer] Add CsvEncoder tests for PHP 7.4Sep 28, 2019
@ro0NL
Copy link
ContributorAuthor

@fabpot@nicolas-grekas all good 👍

@ro0NL
Copy link
ContributorAuthor

note merging this in 4.3 requires a bit more work, let me know if you want a PR for that.

@fabpot
Copy link
Member

Thank you@ro0NL.

fabpot added a commit that referenced this pull requestSep 30, 2019
This PR was squashed before being merged into the 3.4 branch (closes#32051).Discussion----------[Serializer] Add CsvEncoder tests for PHP 7.4| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | no| New feature?  | no| 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 -->Some CSV encoder tests to show the broken behavior of a trailing slash. Spotted in#31867, not sure what to do with it :)Commits-------760354d [Serializer] Add CsvEncoder tests for PHP 7.4
@fabpotfabpot merged commit760354d intosymfony:3.4Sep 30, 2019
nicolas-grekas added a commit that referenced this pull requestOct 2, 2019
…0NL)This PR was merged into the 4.3 branch.Discussion----------[DI] Add CSV env var processor tests / support PHP 7.4| Q             | A| ------------- | ---| Branch?       | 4.3| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", if any -->| License       | MIT| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->Similar as#32051Commits-------82f3418 [DI] Add CSV env var processor tests
@ro0NLro0NL deleted the csv branchOctober 2, 2019 13:12
This was referencedOct 7, 2019
hultberg pushed a commit to hultberg/symfony that referenced this pull requestSep 17, 2021
This PR was squashed before being merged into the 3.4 branch (closessymfony#32051).Discussion----------[Serializer] Add CsvEncoder tests for PHP 7.4| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | no| New feature?  | no| 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 -->Some CSV encoder tests to show the broken behavior of a trailing slash. Spotted insymfony#31867, not sure what to do with it :)Commits-------760354d [Serializer] Add CsvEncoder tests for PHP 7.4
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@dunglasdunglasdunglas approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

+1 more reviewer

@maxheliasmaxheliasmaxhelias approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

7 participants

@ro0NL@Simperfit@nicolas-grekas@fabpot@dunglas@maxhelias@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp