8000 [Config] Fix (Yaml|Xml)ReferenceDumper for nested prototypes by ogizanagi · Pull Request #19480 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Config] Fix (Yaml|Xml)ReferenceDumper for nested prototypes #19480

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

Merged
merged 1 commit into from
Sep 16, 2016
Merged

[Config] Fix (Yaml|Xml)ReferenceDumper for nested prototypes #19480

merged 1 commit into from
Sep 16, 2016

Conversation

ogizanagi
Copy link
Contributor
@ogizanagi ogizanagi commented Jul 29, 2016
Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

This tries to fix the nested prototypes case for the YamlReferenceDumper and XmlReferenceDumper.

Before

cms_pages:

    # Prototype
    page:                 []

After

cms_pages:

    # Prototype
    page:

        # Prototype
        locale:
            title:                ~ # Required
            path:                 ~ # Required

However, the YamlReferenceDumperTest::testDumper is marked as skipped, due to another unsupported prototype usage, but that's another issue (the connections key). Thus, the bug fix must be tested manually :/ (I'd recommend to merge #19570 first)

@ogizanagi ogizanagi changed the title [Config] Fix YamlReferenceDumper for nested prototypes [Config] Fix (Yaml|Xml)ReferenceDumper for nested prototypes Jul 31, 2016
fabpot added a commit that referenced this pull request Sep 14, 2016
…ort (ogizanagi)

This PR was merged into the 3.2-dev branch.

Discussion
----------

[Config] Fix YamlReferenceDumper prototyped array support

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

Also related to #19480 which fixes another prototype issue, but cannot be tested properly on Travis because marked as skipped by this missing implementation.

Previous output was:

```yaml
    [...]
    parameters:

        # Prototype
        name:                 ~
    connections:
        user:                 ~
        pass:                 ~
```

instead of:

```yaml
    [...]
    parameters:

        # Prototype
        name:                 ~
    connections:

        # Prototype
        -
            user:                 ~
            pass:                 ~
```

Commits
-------

063a980 [Config] Fix YamlReferenceDumper prototyped array support
@ogizanagi ogizanagi changed the base branch from 2.7 to master September 15, 2016 14:07
@ogizanagi
Copy link
Contributor Author

@fabpot : Branch rebased on master and target changed. As #19570, I think this may rather be considered as a new feature than a bug fix. None of the dumpers were supporting it until now.

@fabpot
Copy link
Member
fabpot commented Sep 16, 2016

Thank you @ogizanagi.

@fabpot fabpot merged commit 1e80510 into symfony:master Sep 16, 2016
fabpot added a commit that referenced this pull request Sep 16, 2016
…otypes (ogizanagi)

This PR was merged into the 3.2-dev branch.

Discussion
----------

[Config] Fix (Yaml|Xml)ReferenceDumper for nested prototypes

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

This tries to fix the nested prototypes case for the `YamlReferenceDumper` and `XmlReferenceDumper`.

### Before
```yml
cms_pages:

    # Prototype
    page:                 []
```

### After

```yml
cms_pages:

    # Prototype
    page:

        # Prototype
        locale:
            title:                ~ # Required
            path:                 ~ # Required
```

~~However, the `YamlReferenceDumperTest::testDumper` is marked as skipped, due to another unsupported prototype usage, but that's another issue (the `connections` key). Thus, the bug fix must be tested manually :/ (I'd recommend to merge #19570 first)~~

Commits
-------

1e80510 [Config] Fix YamlReferenceDumper for nested prototypes
@ogizanagi ogizanagi deleted the config/fix_prototyped_prototype branch September 16, 2016 15:56
@fabpot fabpot mentioned this pull request Oct 27, 2016
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.

3 participants
0