Skip to content
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

Add support for newlines in identity() #1104

Merged
merged 1 commit into from
Jul 1, 2022

Conversation

julienfalque
Copy link
Contributor

This PR allows writing complex <identity()> expressions in a more readable way, e.g.:

Foo:
  foo:
    __construct: <(new Some(new Very(new Complex(new Expression(), new With(), new Many(), new Arguments())))>

can become

Foo:
  foo:
    __construct: |
      <(new Some(
        new Very(
          new Complex(
            new Expression(),
          ),
          new With(),
          new Many(),
          new Arguments(),
        ),
      ))>

I focused on <identity()>. Are there other kind of values I overlooked that would conflict with this? Or that could benefit from newlines support as well?

@theofidry
Copy link
Member

Are there other kind of values I overlooked that would conflict with this? Or that could benefit from newlines support as well?

No idea :) The PR looks good though. Is there anything else or can that be merged?

@julienfalque
Copy link
Contributor Author

I'm not very confident this won't break things, maybe worth try it in some projects? Otherwise this can be merged IMO.

@julienfalque julienfalque marked this pull request as ready for review February 4, 2022 17:15
@theofidry theofidry merged commit d523af2 into nelmio:master Jul 1, 2022
@theofidry
Copy link
Member

Sorry for the delay, thank you @julienfalque :)

@julienfalque julienfalque deleted the identity-newlines branch July 1, 2022 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants