Skip to content

Conversation

@ogizanagi
Copy link
Contributor

@ogizanagi ogizanagi commented Feb 1, 2017

Q A
Branch? 2.7
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? no
Fixed tickets N/A
License MIT
Doc PR N/A

I'm suggesting this one, because I recently pushed some changes to the descriptors, and of course, I'm not editing expected output fixtures by hand, but by dumping the real output to fixture files. But it's tiring to get false positive diffs when reviewing it. Descriptor tests already are painful enough 😅

This PR respects the way elements are actually output. If it's ok to you, I'll submit some other PRs to upper branches, because there are more issues regarding this (items order for instance).

If it causes too much troubles getting this in sync with upper branches, let's close this and never talk about it anymore 😄

@stof
Copy link
Member

stof commented Feb 1, 2017

AFAIK, the pretty-printing of empty arrays depends on the PHP version

@ogizanagi
Copy link
Contributor Author

I tried myself with both PHP 5.6, 7.0 and 7.1.

@ogizanagi
Copy link
Contributor Author

ogizanagi commented Feb 1, 2017

A quick test on https://3v4l.org/uLA1g seems to confirm there is no difference regarding empty arrays between PHP versions (at least those ones). :)

nicolas-grekas added a commit that referenced this pull request Feb 2, 2017
…nal output (ogizanagi)

This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle][Console] JsonDescriptor: Respect original output

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

I'm suggesting this one, because I recently pushed some changes to the descriptors, and of course, I'm not editing expected output fixtures by hand, but by dumping the real output to fixture files. But it's tiring to get false positive diffs when reviewing it. Descriptor tests already are painful enough 😅

This PR respects the way elements are actually output. If it's ok to you, I'll submit some other PRs to upper branches, because there are more issues regarding this (items order for instance).

If it causes too much troubles getting this in sync with upper branches, let's close this and never talk about it anymore 😄

Commits
-------

08dd70b [FrameworkBundle][Console] JsonDescriptor: Respect original output
@nicolas-grekas nicolas-grekas merged commit 08dd70b into symfony:2.7 Feb 2, 2017
@ogizanagi ogizanagi deleted the fix/2.7/json_descr/respect_original_output branch February 2, 2017 13:49
@nicolas-grekas
Copy link
Member

merged up to master, cleaned. thanks @ogizanagi

nicolas-grekas added a commit that referenced this pull request Feb 3, 2017
…nal output (ogizanagi)

This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle][Console] JsonDescriptor: Respect original output

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

Follows up #21501.

This one fixes the keys order (preserved from the order those keys are added from the `JsonDescriptor`), as for the previous mentioned PR, in order to slightly improve the situation when updating the descriptors fixtures.

@nicolas-grekas : Thanks for taking care of the previous one. There are two other PRs required to me in order to fix everything on every branches, but I wonder if it wouldn't be easier (and reduce noise) to apply the following patches while merging this in upper branches instead:

- 3.2: ogizanagi@51a0a1c
- master: ogizanagi@b35a244

WDYT?

Commits
-------

bf71776 [FrameworkBundle][Console] JsonDescriptor: Respect original output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants